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:
parent
35c962e9a1
commit
b24f978011
8 changed files with 125 additions and 147 deletions
|
@ -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. {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue