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...@@ -4428,6 +4428,7 @@ static LLVMValueRef ir_render_call(CodeGen *g, IrExecutableGen *executable, IrIn
4428 gen_assign_raw(g, arg_ptr, get_pointer_to_type(g, gen_param_types.at(arg_i), true),4428 gen_assign_raw(g, arg_ptr, get_pointer_to_type(g, gen_param_types.at(arg_i), true),
4429 gen_param_values.at(arg_i));4429 gen_param_values.at(arg_i));
4430 }4430 }
4431 gen_param_types.deinit();
44314432
4432 if (instruction->modifier == CallModifierAsync) {4433 if (instruction->modifier == CallModifierAsync) {
4433 gen_resume(g, fn_val, frame_result_loc, ResumeIdCall);4434 gen_resume(g, fn_val, frame_result_loc, ResumeIdCall);
...@@ -4505,6 +4506,8 @@ static LLVMValueRef ir_render_call(CodeGen *g, IrExecutableGen *executable, IrIn...@@ -4505,6 +4506,8 @@ static LLVMValueRef ir_render_call(CodeGen *g, IrExecutableGen *executable, IrIn
4505 LLVMValueRef result_ptr = LLVMBuildStructGEP(g->builder, frame_result_loc, frame_ret_start + 2, "");4506 LLVMValueRef result_ptr = LLVMBuildStructGEP(g->builder, frame_result_loc, frame_ret_start + 2, "");
4506 return LLVMBuildLoad(g->builder, result_ptr, "");4507 return LLVMBuildLoad(g->builder, result_ptr, "");
4507 }4508 }
4509 } else {
4510 gen_param_types.deinit();
4508 }4511 }
45094512
4510 if (instruction->new_stack == nullptr || instruction->is_async_call_builtin) {4513 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...@@ -9606,6 +9606,7 @@ static IrInstSrc *ir_gen_continue(IrBuilderSrc *irb, Scope *continue_scope, AstN
9606 ScopeRuntime *scope_runtime = runtime_scopes.at(i);9606 ScopeRuntime *scope_runtime = runtime_scopes.at(i);
9607 ir_mark_gen(ir_build_check_runtime_scope(irb, continue_scope, node, scope_runtime->is_comptime, is_comptime));9607 ir_mark_gen(ir_build_check_runtime_scope(irb, continue_scope, node, scope_runtime->is_comptime, is_comptime));
9608 }9608 }
9609 runtime_scopes.deinit();
96099610
9610 IrBasicBlockSrc *dest_block = loop_scope->continue_block;9611 IrBasicBlockSrc *dest_block = loop_scope->continue_block;
9611 if (!ir_gen_defers_for_block(irb, continue_scope, dest_block->scope, nullptr, nullptr))9612 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...@@ -21526,6 +21527,7 @@ static IrInstGen *ir_analyze_instruction_phi(IrAnalyze *ira, IrInstSrcPhi *phi_i
21526 predecessor->instruction_list.append(instrs_to_move.pop());21527 predecessor->instruction_list.append(instrs_to_move.pop());
21527 }21528 }
21528 predecessor->instruction_list.append(branch_instruction);21529 predecessor->instruction_list.append(branch_instruction);
21530 instrs_to_move.deinit();
21529 }21531 }
21530 }21532 }
2153121533
...@@ -21576,7 +21578,10 @@ static IrInstGen *ir_analyze_instruction_phi(IrAnalyze *ira, IrInstSrcPhi *phi_i...@@ -21576,7 +21578,10 @@ static IrInstGen *ir_analyze_instruction_phi(IrAnalyze *ira, IrInstSrcPhi *phi_i
21576 }21578 }
2157721579
21578 if (new_incoming_blocks.length == 1) {21580 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;
21580 }21585 }
2158121586
21582 ZigType *resolved_type = nullptr;21587 ZigType *resolved_type = nullptr;
...@@ -24154,6 +24159,7 @@ static IrInstGen *ir_analyze_container_init_fields(IrAnalyze *ira, IrInst *sourc...@@ -24154,6 +24159,7 @@ static IrInstGen *ir_analyze_container_init_fields(IrAnalyze *ira, IrInst *sourc
24154 }24159 }
24155 }24160 }
2415624161
24162 const_ptrs.deinit();
24157 IrInstGen *result = ir_get_deref(ira, source_instr, result_loc, nullptr);24163 IrInstGen *result = ir_get_deref(ira, source_instr, result_loc, nullptr);
2415824164
24159 if (is_comptime && !instr_is_comptime(result)) {24165 if (is_comptime && !instr_is_comptime(result)) {