diff options
| author | gingerBill <bill@gingerbill.org> | 2021-03-05 12:56:36 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-03-05 12:56:36 +0000 |
| commit | 1988856eedc1a9714c42a22ea369d8154dcf7589 (patch) | |
| tree | 4a7aa777e005e6ff35036e80adb310243913c234 /src/ir.cpp | |
| parent | 15dbc99cb975675b89f5efe714d5209bce972014 (diff) | |
Minimize the size of `runtime.Source_Code_Location` to use `i32` instead of `int`
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 22265fcd0..1ca7b4cd4 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -6420,8 +6420,8 @@ irValue *ir_emit_union_cast(irProcedure *proc, irValue *value, Type *type, Token args[0] = ok; args[1] = ir_find_or_add_entity_string(proc->module, get_file_path_string(pos.file_id)); - args[2] = ir_const_int(pos.line); - args[3] = ir_const_int(pos.column); + args[2] = ir_const_i32(pos.line); + args[3] = ir_const_i32(pos.column); args[4] = ir_typeid(proc->module, src_type); args[5] = ir_typeid(proc->module, dst_type); @@ -6480,8 +6480,8 @@ irAddr ir_emit_any_cast_addr(irProcedure *proc, irValue *value, Type *type, Toke args[0] = ok; args[1] = ir_find_or_add_entity_string(proc->module, get_file_path_string(pos.file_id)); - args[2] = ir_const_int(pos.line); - args[3] = ir_const_int(pos.column); + args[2] = ir_const_i32(pos.line); + args[3] = ir_const_i32(pos.column); args[4] = any_typeid; args[5] = dst_typeid; @@ -6677,8 +6677,8 @@ void ir_emit_bounds_check(irProcedure *proc, Token token, irValue *index, irValu gbAllocator a = ir_allocator(); irValue *file = ir_find_or_add_entity_string(proc->module, get_file_path_string(token.pos.file_id)); - irValue *line = ir_const_int(token.pos.line); - irValue *column = ir_const_int(token.pos.column); + irValue *line = ir_const_i32(token.pos.line); + irValue *column = ir_const_i32(token.pos.column); auto args = array_make<irValue *>(ir_allocator(), 5); @@ -6701,8 +6701,8 @@ void ir_emit_slice_bounds_check(irProcedure *proc, Token token, irValue *low, ir gbAllocator a = ir_allocator(); irValue *file = ir_find_or_add_entity_string(proc->module, get_file_path_string(token.pos.file_id)); - irValue *line = ir_const_int(token.pos.line); - irValue *column = ir_const_int(token.pos.column); + irValue *line = ir_const_i32(token.pos.line); + irValue *column = ir_const_i32(token.pos.column); high = ir_emit_conv(proc, high, t_int); if (!lower_value_used) { @@ -6740,8 +6740,8 @@ void ir_emit_dynamic_array_bounds_check(irProcedure *proc, Token token, irValue gbAllocator a = ir_allocator(); irValue *file = ir_find_or_add_entity_string(proc->module, get_file_path_string(token.pos.file_id)); - irValue *line = ir_const_int(token.pos.line); - irValue *column = ir_const_int(token.pos.column); + irValue *line = ir_const_i32(token.pos.line); + irValue *column = ir_const_i32(token.pos.column); low = ir_emit_conv(proc, low, t_int); high = ir_emit_conv(proc, high, t_int); @@ -7078,8 +7078,8 @@ irValue *ir_emit_source_code_location(irProcedure *proc, String procedure, Token gbAllocator a = ir_allocator(); irValue *v = ir_alloc_value(irValue_SourceCodeLocation); v->SourceCodeLocation.file = ir_find_or_add_entity_string(proc->module, get_file_path_string(pos.file_id)); - v->SourceCodeLocation.line = ir_const_int(pos.line); - v->SourceCodeLocation.column = ir_const_int(pos.column); + v->SourceCodeLocation.line = ir_const_i32(pos.line); + v->SourceCodeLocation.column = ir_const_i32(pos.column); v->SourceCodeLocation.procedure = ir_find_or_add_entity_string(proc->module, procedure); return v; } @@ -8260,8 +8260,8 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) { args[0] = ok; args[1] = ir_find_or_add_entity_string(proc->module, get_file_path_string(pos.file_id)); - args[2] = ir_const_int(pos.line); - args[3] = ir_const_int(pos.column); + args[2] = ir_const_i32(pos.line); + args[3] = ir_const_i32(pos.column); args[4] = ir_typeid(proc->module, src_type); args[5] = ir_typeid(proc->module, dst_type); @@ -8285,8 +8285,8 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) { args[0] = ok; args[1] = ir_find_or_add_entity_string(proc->module, get_file_path_string(pos.file_id)); - args[2] = ir_const_int(pos.line); - args[3] = ir_const_int(pos.column); + args[2] = ir_const_i32(pos.line); + args[3] = ir_const_i32(pos.column); args[4] = any_id; args[5] = id; |