authorgravatar for alex_naskos@hotmail.comAlexandros Naskos <alex_naskos@hotmail.com> 2020-09-30 17:09:18+03:00
committergravatar for alex_naskos@hotmail.comAlexandros Naskos <alex_naskos@hotmail.com> 2020-09-30 17:09:18+03:00
logcb5d290f33d28ca3921d5a341be48a6d8099ce57
tree5d49f8d0d4a02cac3891553f28d453647f42855f
parentfe117d9961c3622fda5c359733d01de686509af0

Added a few ZigList deinit calls


2 files changed, 10 insertions(+), 1 deletions(-)

src/stage1/codegen.cpp+3
......@@ -4428,6 +4428,7 @@ static LLVMValueRef ir_render_call(CodeGen *g, IrExecutableGen *executable, IrIn
44284428 gen_assign_raw(g, arg_ptr, get_pointer_to_type(g, gen_param_types.at(arg_i), true),
44294429 gen_param_values.at(arg_i));
44304430 }
4431 gen_param_types.deinit();
44314432
44324433 if (instruction->modifier == CallModifierAsync) {
44334434 gen_resume(g, fn_val, frame_result_loc, ResumeIdCall);
......@@ -4505,6 +4506,8 @@ static LLVMValueRef ir_render_call(CodeGen *g, IrExecutableGen *executable, IrIn
45054506 LLVMValueRef result_ptr = LLVMBuildStructGEP(g->builder, frame_result_loc, frame_ret_start + 2, "");
45064507 return LLVMBuildLoad(g->builder, result_ptr, "");
45074508 }
4509 } else {
4510 gen_param_types.deinit();
45084511 }
45094512
45104513 if (instruction->new_stack == nullptr || instruction->is_async_call_builtin) {
src/stage1/ir.cpp+7-1
......@@ -9606,6 +9606,7 @@ static IrInstSrc *ir_gen_continue(IrBuilderSrc *irb, Scope *continue_scope, AstN
96069606 ScopeRuntime *scope_runtime = runtime_scopes.at(i);
96079607 ir_mark_gen(ir_build_check_runtime_scope(irb, continue_scope, node, scope_runtime->is_comptime, is_comptime));
96089608 }
9609 runtime_scopes.deinit();
96099610
96109611 IrBasicBlockSrc *dest_block = loop_scope->continue_block;
96119612 if (!ir_gen_defers_for_block(irb, continue_scope, dest_block->scope, nullptr, nullptr))
......@@ -21526,6 +21527,7 @@ static IrInstGen *ir_analyze_instruction_phi(IrAnalyze *ira, IrInstSrcPhi *phi_i
2152621527 predecessor->instruction_list.append(instrs_to_move.pop());
2152721528 }
2152821529 predecessor->instruction_list.append(branch_instruction);
21530 instrs_to_move.deinit();
2152921531 }
2153021532 }
2153121533
......@@ -21576,7 +21578,10 @@ static IrInstGen *ir_analyze_instruction_phi(IrAnalyze *ira, IrInstSrcPhi *phi_i
2157621578 }
2157721579
2157821580 if (new_incoming_blocks.length == 1) {
21579 return new_incoming_values.at(0);
21581 IrInstGen *incoming_value = new_incoming_values.at(0);
21582 new_incoming_blocks.deinit();
21583 new_incoming_values.deinit();
21584 return incoming_value;
2158021585 }
2158121586
2158221587 ZigType *resolved_type = nullptr;
......@@ -24154,6 +24159,7 @@ static IrInstGen *ir_analyze_container_init_fields(IrAnalyze *ira, IrInst *sourc
2415424159 }
2415524160 }
2415624161
24162 const_ptrs.deinit();
2415724163 IrInstGen *result = ir_get_deref(ira, source_instr, result_loc, nullptr);
2415824164
2415924165 if (is_comptime && !instr_is_comptime(result)) {