diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-10-24 14:57:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-24 14:57:55 -0400 |
| commit | 22a6a5d93f000afd7e00450bb5a359f39bb598bf (patch) | |
| tree | 65cae809bfc2edc9eb1642f2ace25313ec3a7193 /src/arch/wasm/CodeGen.zig | |
| parent | d1230842ac882bbd6456081c474658b293aaf20a (diff) | |
| parent | f2814caaf04fc041a028d5ede4fb4db5ee2f19ae (diff) | |
| download | zig-22a6a5d93f000afd7e00450bb5a359f39bb598bf.tar.gz zig-22a6a5d93f000afd7e00450bb5a359f39bb598bf.zip | |
Merge pull request #17691 from mlugg/no-interned-runtime-value
Remove `InternPool.Key.runtime_value`, clean up Sema value resolution functions
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
| -rw-r--r-- | src/arch/wasm/CodeGen.zig | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig index 44915813fb..9588ec65fd 100644 --- a/src/arch/wasm/CodeGen.zig +++ b/src/arch/wasm/CodeGen.zig @@ -3224,16 +3224,11 @@ fn toTwosComplement(value: anytype, bits: u7) std.meta.Int(.unsigned, @typeInfo( /// This function is intended to assert that `isByRef` returns `false` for `ty`. /// However such an assertion fails on the behavior tests currently. -fn lowerConstant(func: *CodeGen, arg_val: Value, ty: Type) InnerError!WValue { +fn lowerConstant(func: *CodeGen, val: Value, ty: Type) InnerError!WValue { const mod = func.bin_file.base.options.module.?; // TODO: enable this assertion //assert(!isByRef(ty, mod)); const ip = &mod.intern_pool; - var val = arg_val; - switch (ip.indexToKey(val.ip_index)) { - .runtime_value => |rt| val = rt.val.toValue(), - else => {}, - } if (val.isUndefDeep(mod)) return func.emitUndefined(ty); switch (ip.indexToKey(val.ip_index)) { @@ -3255,7 +3250,7 @@ fn lowerConstant(func: *CodeGen, arg_val: Value, ty: Type) InnerError!WValue { .inferred_error_set_type, => unreachable, // types, not values - .undef, .runtime_value => unreachable, // handled above + .undef => unreachable, // handled above .simple_value => |simple_value| switch (simple_value) { .undefined, .void, |
