diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-07-15 15:52:06 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-07-20 12:19:16 -0700 |
| commit | eadbee2041bba1cd03b24d8f30161025af8e3590 (patch) | |
| tree | aebad285c7cd852fcc1c9d62f3beeb4395c6d04e /src/value.zig | |
| parent | 12c10139e3e0166e91d2dbb1801c2054ca12d413 (diff) | |
| download | zig-eadbee2041bba1cd03b24d8f30161025af8e3590.tar.gz zig-eadbee2041bba1cd03b24d8f30161025af8e3590.zip | |
stage2: first pass at printing AIR/Liveness to text
* some instructions are not implemented yet
* fix off-by-1 in Air.getMainBody
* Compilation: use `@import("builtin")` rather than `std.builtin`
for the values that are different for different build configurations.
* Sema: avoid calling `addType` in between
air_instructions.ensureUnusedCapacity and corresponding
appendAssumeCapacity because it can possibly add an instruction.
* Value: functions print their names
Diffstat (limited to 'src/value.zig')
| -rw-r--r-- | src/value.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/value.zig b/src/value.zig index df3a97b09a..abb2ea7b1e 100644 --- a/src/value.zig +++ b/src/value.zig @@ -573,7 +573,7 @@ pub const Value = extern union { .int_i64 => return std.fmt.formatIntValue(val.castTag(.int_i64).?.data, "", options, out_stream), .int_big_positive => return out_stream.print("{}", .{val.castTag(.int_big_positive).?.asBigInt()}), .int_big_negative => return out_stream.print("{}", .{val.castTag(.int_big_negative).?.asBigInt()}), - .function => return out_stream.writeAll("(function)"), + .function => return out_stream.print("(function '{s}')", .{val.castTag(.function).?.data.owner_decl.name}), .extern_fn => return out_stream.writeAll("(extern function)"), .variable => return out_stream.writeAll("(variable)"), .ref_val => { |
