Compare commits
1 Commits
c7056f2520
...
03aa714a51
Author | SHA1 | Date | |
---|---|---|---|
03aa714a51 |
@ -10699,7 +10699,7 @@ analyze_type = fn (module: &Module, value: &Value, expected_type: &Type, analysi
|
||||
|
||||
>current_function = get_current_function(module);
|
||||
>old_alloca_insertion_point = current_function.variable.storage.content.function.llvm.alloca_insertion_point;
|
||||
current_function.variable.storage.content.function.llvm.alloca_insertion_point = LLVMBuildAlloca(module.llvm.builder, u32_type.llvm.abi, "alloca_insertion_point");
|
||||
current_function.variable.storage.content.function.llvm.alloca_insertion_point = LLVMBuildAlloca(module.llvm.builder, u32_type.llvm.abi, "alloca.insertion.point");
|
||||
|
||||
>alloca = create_alloca(module, {
|
||||
.type = string_type,
|
||||
@ -11927,7 +11927,7 @@ analyze_type = fn (module: &Module, value: &Value, expected_type: &Type, analysi
|
||||
>u32_type = uint32(module);
|
||||
resolve_type_in_place(module, u32_type);
|
||||
|
||||
current_function.variable.storage.content.function.llvm.alloca_insertion_point = LLVMBuildAlloca(module.llvm.builder, u32_type.llvm.abi, "alloca_insertion_point");
|
||||
current_function.variable.storage.content.function.llvm.alloca_insertion_point = LLVMBuildAlloca(module.llvm.builder, u32_type.llvm.abi, "alloca.insertion.point");
|
||||
|
||||
>arguments: [2]&LLVMValue = undefined;
|
||||
LLVMGetParams(llvm_function, &arguments[0]);
|
||||
@ -17575,7 +17575,7 @@ emit = fn (module: &Module) void
|
||||
>u32_type = uint32(module);
|
||||
resolve_type_in_place(module, u32_type);
|
||||
|
||||
global.variable.storage.content.function.llvm.alloca_insertion_point = LLVMBuildAlloca(module.llvm.builder, u32_type.llvm.abi, "alloca_insertion_point");
|
||||
global.variable.storage.content.function.llvm.alloca_insertion_point = LLVMBuildAlloca(module.llvm.builder, u32_type.llvm.abi, "alloca.insertion.point");
|
||||
|
||||
>return_abi = &function_type.abi.return_abi;
|
||||
switch (return_abi.flags.kind)
|
||||
|
@ -2809,6 +2809,7 @@ fn Type* get_build_mode_enum(Module* module)
|
||||
string_literal("aggressively_optimize_for_speed"),
|
||||
string_literal("aggressively_optimize_for_size"),
|
||||
};
|
||||
static_assert(array_length(enum_names) == (u64)BuildMode::count);
|
||||
|
||||
auto enum_fields = arena_allocate<EnumField>(module->arena, array_length(enum_names));
|
||||
|
||||
@ -2823,7 +2824,7 @@ fn Type* get_build_mode_enum(Module* module)
|
||||
field_value += 1;
|
||||
}
|
||||
|
||||
auto backing_type = integer_type(module, { .bit_count = array_length(enum_names) - 1, .is_signed = false });
|
||||
auto backing_type = integer_type(module, { .bit_count = (u32)BuildMode::count, .is_signed = false });
|
||||
|
||||
result = type_allocate_init(module, {
|
||||
.enumerator = {
|
||||
@ -3093,7 +3094,7 @@ fn void analyze_type(Module* module, Value* value, Type* expected_type, TypeAnal
|
||||
resolve_type_in_place(module, u32_type);
|
||||
auto current_function = get_current_function(module);
|
||||
auto old_alloca_insertion_point = current_function->variable.storage->function.llvm.alloca_insertion_point;
|
||||
current_function->variable.storage->function.llvm.alloca_insertion_point = LLVMBuildAlloca(module->llvm.builder, u32_type->llvm.abi, "alloca_insert_point");
|
||||
current_function->variable.storage->function.llvm.alloca_insertion_point = LLVMBuildAlloca(module->llvm.builder, u32_type->llvm.abi, "alloca.insertion.point");
|
||||
|
||||
auto alloca = create_alloca(module, {
|
||||
.type = string_type,
|
||||
@ -4303,7 +4304,7 @@ fn void analyze_type(Module* module, Value* value, Type* expected_type, TypeAnal
|
||||
auto old_alloca_insertion_point = current_function->variable.storage->function.llvm.alloca_insertion_point;
|
||||
auto u32_type = uint32(module);
|
||||
resolve_type_in_place(module, u32_type);
|
||||
current_function->variable.storage->function.llvm.alloca_insertion_point = LLVMBuildAlloca(module->llvm.builder, u32_type->llvm.abi, "alloca_insert_point");
|
||||
current_function->variable.storage->function.llvm.alloca_insertion_point = LLVMBuildAlloca(module->llvm.builder, u32_type->llvm.abi, "alloca.insertion.point");
|
||||
|
||||
LLVMValueRef arguments[2];
|
||||
LLVMGetParams(llvm_function, arguments);
|
||||
@ -7700,11 +7701,6 @@ fn void emit_value(Module* module, Value* value, TypeKind type_kind, bool expect
|
||||
{
|
||||
auto enum_type = array_type->enum_array.enum_type;
|
||||
assert(enum_type->id == TypeId::enumerator);
|
||||
auto enumerator_size = get_bit_size(enum_type->enumerator.backing_type);
|
||||
if (enumerator_size != 64)
|
||||
{
|
||||
llvm_index = LLVMBuildIntCast2(module->llvm.builder, llvm_index, u64_llvm, false, "");
|
||||
}
|
||||
element_type = array_type->enum_array.element_type;
|
||||
} break;
|
||||
default: unreachable();
|
||||
@ -9607,7 +9603,7 @@ void emit(Module* module)
|
||||
|
||||
auto u32_type = uint32(module);
|
||||
resolve_type_in_place(module, u32_type);
|
||||
global->variable.storage->function.llvm.alloca_insertion_point = LLVMBuildAlloca(module->llvm.builder, u32_type->llvm.abi, "alloca_insert_point");
|
||||
global->variable.storage->function.llvm.alloca_insertion_point = LLVMBuildAlloca(module->llvm.builder, u32_type->llvm.abi, "alloca.insertion.point");
|
||||
|
||||
auto return_abi_kind = function_type->abi.return_abi.flags.kind;
|
||||
switch (return_abi_kind)
|
||||
|
Loading…
x
Reference in New Issue
Block a user