Skip to content

Commit d9002cf

Browse files
authored
Merge pull request #23671 from JuliaLang/kf/vastack
Remove unused `vaStack` ctx field
2 parents 53a1304 + fdff5b4 commit d9002cf

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/codegen.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,6 @@ class jl_codectx_t {
555555
Value *argCount = NULL;
556556
std::string funcName;
557557
int vaSlot = -1; // name of vararg argument
558-
bool vaStack = false; // varargs stack-allocated
559558
bool has_sret = false;
560559
int nReqArgs = 0;
561560
int nargs = 0;
@@ -2337,7 +2336,7 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f,
23372336
}
23382337

23392338
else if (f == jl_builtin__apply && nargs == 2 && ctx.vaSlot > 0) {
2340-
// turn Core._apply(f, Tuple) ==> f(Tuple...) using the jlcall calling convention if Tuple is the vaStack allocation
2339+
// turn Core._apply(f, Tuple) ==> f(Tuple...) using the jlcall calling convention if Tuple is the va allocation
23412340
if (LoadInst *load = dyn_cast_or_null<LoadInst>(argv[2].V)) {
23422341
if (load->getPointerOperand() == ctx.slots[ctx.vaSlot].boxroot) {
23432342
Value *theF = maybe_decay_untracked(boxed(ctx, argv[1]));
@@ -3267,7 +3266,6 @@ static jl_cgval_t emit_local(jl_codectx_t &ctx, jl_value_t *slotload)
32673266
{
32683267
size_t sl = jl_slot_number(slotload) - 1;
32693268
jl_varinfo_t &vi = ctx.slots[sl];
3270-
assert(!(ctx.vaStack && (int)sl == ctx.vaSlot && "error in escape analysis"));
32713269
jl_sym_t *sym = slot_symbol(ctx, sl);
32723270
jl_value_t *typ;
32733271
if (jl_typeis(slotload, jl_typedslot_type)) {
@@ -4760,7 +4758,6 @@ static std::unique_ptr<Module> emit_function(
47604758
ctx.world = world;
47614759
ctx.name = jl_symbol_name(jl_is_method(lam->def.method) ? lam->def.method->name : anonymous_sym);
47624760
ctx.funcName = ctx.name;
4763-
ctx.vaStack = false;
47644761
ctx.params = params;
47654762
ctx.spvals_ptr = NULL;
47664763
ctx.nargs = jl_is_method(lam->def.method) ? lam->def.method->nargs : 0;

0 commit comments

Comments
 (0)