|
@@ -781,8 +781,6 @@ void lb_emit_store_union_variant(lbProcedure *p, lbValue parent, lbValue variant
|
|
|
|
|
|
|
|
|
void lb_clone_struct_type(LLVMTypeRef dst, LLVMTypeRef src) {
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
-
|
|
|
unsigned field_count = LLVMCountStructElementTypes(src);
|
|
|
LLVMTypeRef *fields = gb_alloc_array(temporary_allocator(), LLVMTypeRef, field_count);
|
|
|
LLVMGetStructElementTypes(src, fields);
|
|
@@ -1279,8 +1277,6 @@ LLVMTypeRef lb_type_internal(lbModule *m, Type *type) {
|
|
|
m->internal_type_level += 1;
|
|
|
defer (m->internal_type_level -= 1);
|
|
|
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
-
|
|
|
unsigned field_count = cast(unsigned)(type->Struct.fields.count + offset);
|
|
|
LLVMTypeRef *fields = gb_alloc_array(temporary_allocator(), LLVMTypeRef, field_count);
|
|
|
|
|
@@ -1341,8 +1337,6 @@ LLVMTypeRef lb_type_internal(lbModule *m, Type *type) {
|
|
|
if (type->Tuple.variables.count == 1) {
|
|
|
return lb_type(m, type->Tuple.variables[0]->type);
|
|
|
} else {
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
-
|
|
|
unsigned field_count = cast(unsigned)(type->Tuple.variables.count);
|
|
|
LLVMTypeRef *fields = gb_alloc_array(temporary_allocator(), LLVMTypeRef, field_count);
|
|
|
|
|
@@ -1442,8 +1436,6 @@ LLVMTypeRef lb_type_internal(lbModule *m, Type *type) {
|
|
|
extra_param_count += 1;
|
|
|
}
|
|
|
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
-
|
|
|
isize param_count = type->Proc.abi_compat_params.count + extra_param_count;
|
|
|
auto param_types = array_make<LLVMTypeRef>(temporary_allocator(), 0, param_count);
|
|
|
|
|
@@ -1490,8 +1482,6 @@ LLVMTypeRef lb_type_internal(lbModule *m, Type *type) {
|
|
|
{
|
|
|
LLVMTypeRef internal_type = nullptr;
|
|
|
{
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
-
|
|
|
GB_ASSERT(type->BitField.fields.count == type->BitField.sizes.count);
|
|
|
unsigned field_count = cast(unsigned)type->BitField.fields.count;
|
|
|
LLVMTypeRef *fields = gb_alloc_array(temporary_allocator(), LLVMTypeRef, field_count);
|
|
@@ -5288,8 +5278,6 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
|
|
|
return lb_const_nil(m, original_type);
|
|
|
}
|
|
|
if (cl->elems[0]->kind == Ast_FieldValue) {
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
-
|
|
|
// TODO(bill): This is O(N*M) and will be quite slow; it should probably be sorted before hand
|
|
|
LLVMValueRef *values = gb_alloc_array(temporary_allocator(), LLVMValueRef, type->Array.count);
|
|
|
|
|
@@ -5348,7 +5336,6 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
|
|
|
} else {
|
|
|
GB_ASSERT_MSG(elem_count == type->Array.count, "%td != %td", elem_count, type->Array.count);
|
|
|
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
LLVMValueRef *values = gb_alloc_array(temporary_allocator(), LLVMValueRef, type->Array.count);
|
|
|
|
|
|
for (isize i = 0; i < elem_count; i++) {
|
|
@@ -5371,7 +5358,6 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
|
|
|
return lb_const_nil(m, original_type);
|
|
|
}
|
|
|
if (cl->elems[0]->kind == Ast_FieldValue) {
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
// TODO(bill): This is O(N*M) and will be quite slow; it should probably be sorted before hand
|
|
|
LLVMValueRef *values = gb_alloc_array(temporary_allocator(), LLVMValueRef, type->EnumeratedArray.count);
|
|
|
|
|
@@ -5434,7 +5420,6 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
|
|
|
} else {
|
|
|
GB_ASSERT_MSG(elem_count == type->EnumeratedArray.count, "%td != %td", elem_count, type->EnumeratedArray.count);
|
|
|
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
LLVMValueRef *values = gb_alloc_array(temporary_allocator(), LLVMValueRef, type->EnumeratedArray.count);
|
|
|
|
|
|
for (isize i = 0; i < elem_count; i++) {
|
|
@@ -5459,8 +5444,6 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
|
|
|
}
|
|
|
GB_ASSERT(elem_type_can_be_constant(elem_type));
|
|
|
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
-
|
|
|
isize total_elem_count = type->SimdVector.count;
|
|
|
LLVMValueRef *values = gb_alloc_array(temporary_allocator(), LLVMValueRef, total_elem_count);
|
|
|
|
|
@@ -5487,13 +5470,10 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
|
|
|
offset = 1;
|
|
|
}
|
|
|
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
-
|
|
|
isize value_count = type->Struct.fields.count + offset;
|
|
|
LLVMValueRef *values = gb_alloc_array(temporary_allocator(), LLVMValueRef, value_count);
|
|
|
bool *visited = gb_alloc_array(temporary_allocator(), bool, value_count);
|
|
|
|
|
|
-
|
|
|
if (cl->elems.count > 0) {
|
|
|
if (cl->elems[0]->kind == Ast_FieldValue) {
|
|
|
isize elem_count = cl->elems.count;
|
|
@@ -10896,7 +10876,6 @@ lbAddr lb_build_addr(lbProcedure *p, Ast *expr) {
|
|
|
if (cl->elems.count > 0) {
|
|
|
lb_addr_store(p, v, lb_const_value(p->module, type, exact_value_compound(expr)));
|
|
|
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
auto temp_data = array_make<lbCompoundLitElemTempData>(temporary_allocator(), 0, cl->elems.count);
|
|
|
|
|
|
// NOTE(bill): Separate value, gep, store into their own chunks
|
|
@@ -10996,7 +10975,6 @@ lbAddr lb_build_addr(lbProcedure *p, Ast *expr) {
|
|
|
if (cl->elems.count > 0) {
|
|
|
lb_addr_store(p, v, lb_const_value(p->module, type, exact_value_compound(expr)));
|
|
|
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
auto temp_data = array_make<lbCompoundLitElemTempData>(temporary_allocator(), 0, cl->elems.count);
|
|
|
|
|
|
// NOTE(bill): Separate value, gep, store into their own chunks
|
|
@@ -11105,7 +11083,6 @@ lbAddr lb_build_addr(lbProcedure *p, Ast *expr) {
|
|
|
|
|
|
lbValue data = lb_slice_elem(p, slice);
|
|
|
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
auto temp_data = array_make<lbCompoundLitElemTempData>(temporary_allocator(), 0, cl->elems.count);
|
|
|
|
|
|
for_array(i, cl->elems) {
|
|
@@ -11954,7 +11931,6 @@ void lb_setup_type_info_data(lbProcedure *p) { // NOTE(bill): Setup type_info da
|
|
|
str_lit("$enum_values"), cast(i64)entry_index);
|
|
|
|
|
|
|
|
|
- SCOPED_TEMPORARY_BLOCK();
|
|
|
LLVMValueRef *name_values = gb_alloc_array(temporary_allocator(), LLVMValueRef, fields.count);
|
|
|
LLVMValueRef *value_values = gb_alloc_array(temporary_allocator(), LLVMValueRef, fields.count);
|
|
|
|