about summary refs log tree commit diff
path: root/src/comp/syntax/parse
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-08-19 14:34:45 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-08-22 10:16:09 +0200
commitb24f97801138cb675fbb9e9151d189b6527c4ef5 (patch)
treeba9c5a3fe56dd18c5e14a742b150cf240037eb67 /src/comp/syntax/parse
parent35c962e9a18e1fc73939990865bfc799e485c23b (diff)
downloadrust-b24f97801138cb675fbb9e9151d189b6527c4ef5.tar.gz
rust-b24f97801138cb675fbb9e9151d189b6527c4ef5.zip
Drop arguments on the caller side, not the callee
This makes it easier for the caller to optimize the take/drop away for
temporary values, and opens up new possibilities for alias handling.

Breaks tail calls.
Diffstat (limited to 'src/comp/syntax/parse')
-rw-r--r--src/comp/syntax/parse/parser.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 8cf53edbc9d..d20f345b3af 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -1081,7 +1081,8 @@ fn parse_dot_or_call_expr_with(p: &parser, e: @ast::expr) -> @ast::expr {
                     parse_seq(token::LPAREN, token::RPAREN,
                               some(token::COMMA), parse_expr, p);
                 hi = es.span.hi;
-                e = mk_expr(p, lo, hi, ast::expr_call(e, es.node));
+                let nd = ast::expr_call(e, es.node);
+                e = mk_expr(p, lo, hi, nd);
             }
           }
           token::LBRACKET. {