From fb8fa5217d4a5081dacc0a74a786cd2efc964fdb Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 13 Sep 2021 00:58:39 +0100 Subject: Begin minimize `Type` size by replacing `Array` with `Slice` etc --- src/llvm_backend.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/llvm_backend.cpp') diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index 5fff3c486..3e8498776 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -761,7 +761,7 @@ lbProcedure *lb_create_main_procedure(lbModule *m, lbProcedure *startup_runtime) if (build_context.metrics.os == TargetOs_windows && build_context.build_mode == BuildMode_DynamicLibrary) { is_dll_main = true; name = str_lit("DllMain"); - array_init(¶ms->Tuple.variables, permanent_allocator(), 3); + slice_init(¶ms->Tuple.variables, permanent_allocator(), 3); params->Tuple.variables[0] = alloc_entity_param(nullptr, make_token_ident("hinstDLL"), t_rawptr, false, true); params->Tuple.variables[1] = alloc_entity_param(nullptr, make_token_ident("fdwReason"), t_u32, false, true); params->Tuple.variables[2] = alloc_entity_param(nullptr, make_token_ident("lpReserved"), t_rawptr, false, true); @@ -769,12 +769,12 @@ lbProcedure *lb_create_main_procedure(lbModule *m, lbProcedure *startup_runtime) name = str_lit("mainCRTStartup"); } else { has_args = true; - array_init(¶ms->Tuple.variables, permanent_allocator(), 2); + slice_init(¶ms->Tuple.variables, permanent_allocator(), 2); params->Tuple.variables[0] = alloc_entity_param(nullptr, make_token_ident("argc"), t_i32, false, true); params->Tuple.variables[1] = alloc_entity_param(nullptr, make_token_ident("argv"), t_ptr_cstring, false, true); } - array_init(&results->Tuple.variables, permanent_allocator(), 1); + slice_init(&results->Tuple.variables, permanent_allocator(), 1); results->Tuple.variables[0] = alloc_entity_param(nullptr, blank_token, t_i32, false, true); Type *proc_type = alloc_type_proc(nullptr, -- cgit v1.2.3