| ... | ... | @@ -493,7 +493,7 @@ pub fn generateSymbol( |
| 493 | 493 | bin_file.allocator, |
| 494 | 494 | src_loc, |
| 495 | 495 | "TODO implement generateSymbol for big int enums ('{}')", |
| 496 | | .{typed_value.ty.fmtDebug()}, |
| 496 | .{typed_value.ty.fmt(mod)}, |
| 497 | 497 | ), |
| 498 | 498 | }; |
| 499 | 499 | } |
| ... | ... | @@ -957,13 +957,13 @@ fn genDeclRef( |
| 957 | 957 | tv: TypedValue, |
| 958 | 958 | decl_index: Module.Decl.Index, |
| 959 | 959 | ) CodeGenError!GenResult { |
| 960 | | log.debug("genDeclRef: ty = {}, val = {}", .{ tv.ty.fmtDebug(), tv.val.fmtDebug() }); |
| 960 | const module = bin_file.options.module.?; |
| 961 | log.debug("genDeclRef: ty = {}, val = {}", .{ tv.ty.fmt(module), tv.val.fmtValue(tv.ty, module) }); |
| 961 | 962 | |
| 962 | 963 | const target = bin_file.options.target; |
| 963 | 964 | const ptr_bits = target.cpu.arch.ptrBitWidth(); |
| 964 | 965 | const ptr_bytes: u64 = @divExact(ptr_bits, 8); |
| 965 | 966 | |
| 966 | | const module = bin_file.options.module.?; |
| 967 | 967 | const decl = module.declPtr(decl_index); |
| 968 | 968 | |
| 969 | 969 | if (!decl.ty.isFnOrHasRuntimeBitsIgnoreComptime()) { |
| ... | ... | @@ -1025,7 +1025,8 @@ fn genUnnamedConst( |
| 1025 | 1025 | tv: TypedValue, |
| 1026 | 1026 | owner_decl_index: Module.Decl.Index, |
| 1027 | 1027 | ) CodeGenError!GenResult { |
| 1028 | | log.debug("genUnnamedConst: ty = {}, val = {}", .{ tv.ty.fmtDebug(), tv.val.fmtDebug() }); |
| 1028 | const mod = bin_file.options.module.?; |
| 1029 | log.debug("genUnnamedConst: ty = {}, val = {}", .{ tv.ty.fmt(mod), tv.val.fmtValue(tv.ty, mod) }); |
| 1029 | 1030 | |
| 1030 | 1031 | const target = bin_file.options.target; |
| 1031 | 1032 | const local_sym_index = bin_file.lowerUnnamedConst(tv, owner_decl_index) catch |err| { |
| ... | ... | @@ -1065,7 +1066,11 @@ pub fn genTypedValue( |
| 1065 | 1066 | typed_value.val = rt.data; |
| 1066 | 1067 | } |
| 1067 | 1068 | |
| 1068 | | log.debug("genTypedValue: ty = {}, val = {}", .{ typed_value.ty.fmtDebug(), typed_value.val.fmtDebug() }); |
| 1069 | const mod = bin_file.options.module.?; |
| 1070 | log.debug("genTypedValue: ty = {}, val = {}", .{ |
| 1071 | typed_value.ty.fmt(mod), |
| 1072 | typed_value.val.fmtValue(typed_value.ty, mod), |
| 1073 | }); |
| 1069 | 1074 | |
| 1070 | 1075 | if (typed_value.val.isUndef()) |
| 1071 | 1076 | return GenResult.mcv(.undef); |