Skip to content

Commit b10c8b6

Browse files
committed
---
yaml --- r: 952 b: refs/heads/master c: 96540ef h: refs/heads/master v: v3
1 parent bedea18 commit b10c8b6

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: e2f9f746ea5adcede229b5c9c14450a0057ed13b
2+
refs/heads/master: 96540ef0bb649f4bd5c90ff2b524e763b3b5db85

trunk/src/comp/middle/trans.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,17 @@ impure fn trans_cast(@block_ctxt cx, &ast.expr e, &ast.ann ann) -> result {
966966
ret e_res;
967967
}
968968

969+
impure fn trans_call(@block_ctxt cx, &ast.expr f,
970+
vec[@ast.expr] args) -> result {
971+
auto f_res = trans_lval(cx, f);
972+
check (! f_res._1);
973+
auto args_res = trans_exprs(f_res._0.bcx, args);
974+
auto llargs = vec(cx.fcx.lltaskptr);
975+
llargs += args_res._1;
976+
ret res(args_res._0,
977+
args_res._0.build.FastCall(f_res._0.val, llargs));
978+
}
979+
969980
impure fn trans_expr(@block_ctxt cx, &ast.expr e) -> result {
970981
alt (e.node) {
971982
case (ast.expr_lit(?lit, _)) {
@@ -1022,14 +1033,7 @@ impure fn trans_expr(@block_ctxt cx, &ast.expr e) -> result {
10221033
}
10231034

10241035
case (ast.expr_call(?f, ?args, _)) {
1025-
auto f_res = trans_lval(cx, *f);
1026-
check (! f_res._1);
1027-
1028-
auto args_res = trans_exprs(f_res._0.bcx, args);
1029-
auto llargs = vec(cx.fcx.lltaskptr);
1030-
llargs += args_res._1;
1031-
ret res(args_res._0,
1032-
args_res._0.build.FastCall(f_res._0.val, llargs));
1036+
ret trans_call(cx, *f, args);
10331037
}
10341038

10351039
case (ast.expr_cast(?e, _, ?ann)) {

0 commit comments

Comments
 (0)