@@ -497,10 +497,8 @@ CompileExpr::visit (HIR::CallExpr &expr)
497
497
498
498
// must be a call to a function
499
499
auto fn_address = CompileExpr::Compile (expr.get_fnexpr (), ctx);
500
- auto fncontext = ctx->peek_fn ();
501
- translated
502
- = ctx->get_backend ()->call_expression (fncontext.fndecl , fn_address, args,
503
- nullptr , expr.get_locus ());
500
+ translated = ctx->get_backend ()->call_expression (fn_address, args, nullptr ,
501
+ expr.get_locus ());
504
502
}
505
503
506
504
void
@@ -610,10 +608,8 @@ CompileExpr::visit (HIR::MethodCallExpr &expr)
610
608
args.push_back (rvalue);
611
609
}
612
610
613
- auto fncontext = ctx->peek_fn ();
614
- translated
615
- = ctx->get_backend ()->call_expression (fncontext.fndecl , fn_expr, args,
616
- nullptr , expr.get_locus ());
611
+ translated = ctx->get_backend ()->call_expression (fn_expr, args, nullptr ,
612
+ expr.get_locus ());
617
613
}
618
614
619
615
tree
@@ -696,8 +692,8 @@ CompileExpr::compile_dyn_dispatch_call (const TyTy::DynamicObjectType *dyn,
696
692
tree fn_expr
697
693
= ctx->get_backend ()->var_expression (fn_convert_expr_tmp, expr_locus);
698
694
699
- return ctx->get_backend ()->call_expression (fnctx. fndecl , fn_expr, args,
700
- nullptr , expr_locus);
695
+ return ctx->get_backend ()->call_expression (fn_expr, args, nullptr ,
696
+ expr_locus);
701
697
}
702
698
703
699
tree
@@ -866,9 +862,8 @@ CompileExpr::resolve_operator_overload (
866
862
if (rhs != nullptr ) // can be null for negation_expr (unary ones)
867
863
args.push_back (rhs);
868
864
869
- auto fncontext = ctx->peek_fn ();
870
- return ctx->get_backend ()->call_expression (fncontext.fndecl , fn_expr, args,
871
- nullptr , expr.get_locus ());
865
+ return ctx->get_backend ()->call_expression (fn_expr, args, nullptr ,
866
+ expr.get_locus ());
872
867
}
873
868
874
869
tree
@@ -1289,10 +1284,8 @@ HIRCompileBase::resolve_deref_adjustment (Resolver::Adjustment &adjustment,
1289
1284
}
1290
1285
1291
1286
// make the call
1292
- auto fncontext = ctx->peek_fn ();
1293
- return ctx->get_backend ()->call_expression (fncontext.fndecl , fn_address,
1294
- {adjusted_argument}, nullptr ,
1295
- locus);
1287
+ return ctx->get_backend ()->call_expression (fn_address, {adjusted_argument},
1288
+ nullptr , locus);
1296
1289
}
1297
1290
1298
1291
tree
0 commit comments