@@ -2435,7 +2435,7 @@ static bool emit_builtin_call(jl_cgval_t *ret, jl_value_t *f, jl_value_t **args,
2435
2435
emit_expr (args[2 ], ctx);
2436
2436
}
2437
2437
else {
2438
- jl_cgval_t v = (ety == ( jl_value_t *)jl_any_type ? emit_expr (args[2 ], ctx) : emit_expr (args[ 2 ], ctx) );
2438
+ jl_cgval_t v = emit_expr (args[2 ], ctx);
2439
2439
PHINode *data_owner = NULL ; // owner object against which the write barrier must check
2440
2440
if (isboxed) { // if not boxed we don't need a write barrier
2441
2441
assert (ary.isboxed );
@@ -2477,7 +2477,8 @@ static bool emit_builtin_call(jl_cgval_t *ret, jl_value_t *f, jl_value_t **args,
2477
2477
data_owner->addIncoming (own_ptr, ownedBB);
2478
2478
}
2479
2479
typed_store (emit_arrayptr (ary,args[1 ],ctx), idx, v,
2480
- ety, ctx, tbaa_user, data_owner);
2480
+ ety, ctx, tbaa_user, data_owner, 0 ,
2481
+ false ); // don't need to root the box if we had to make one since it's being stored in the array immediatly
2481
2482
}
2482
2483
*ret = ary;
2483
2484
JL_GC_POP ();
@@ -2977,7 +2978,8 @@ static jl_cgval_t emit_local(int sl, jl_codectx_t *ctx)
2977
2978
Value *bp = vi.memloc ;
2978
2979
if (vi.isArgument || !vi.usedUndef ) { // arguments are always defined
2979
2980
Instruction *v = builder.CreateLoad (bp, vi.isVolatile );
2980
- return mark_julia_type (v, true , vi.value .typ , ctx);
2981
+ return mark_julia_type (v, true , vi.value .typ , ctx,
2982
+ vi.isAssigned ); // means it's an argument so don't need an additional root
2981
2983
}
2982
2984
else {
2983
2985
jl_cgval_t v = emit_checked_var (bp, sym, ctx, vi.isVolatile );
0 commit comments