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.
This commit is contained in:
@@ -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. {
|
||||
|
||||
Reference in New Issue
Block a user