aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-03 18:31:55 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-03-03 18:31:55 -0700
commite532b0c0b5d55d212d885c779ab9f2fa7443e56a (patch)
tree0a1e9b277c745518f2b64d8913fe5e065fe9cc1b /src/type.zig
parent7fd32de0180c29dc4e3da72e9347f6f5ce167a38 (diff)
downloadzig-e532b0c0b5d55d212d885c779ab9f2fa7443e56a.tar.gz
zig-e532b0c0b5d55d212d885c779ab9f2fa7443e56a.zip
stage2: cleanups to wasm memory intrinsics
* AIR: use pl_op instead of ty_pl for wasm_memory_size. No need to store the type because the type is always `u32`. * AstGen: use coerced_ty for `@wasmMemorySize` and `@wasmMemoryGrow` and do the coercions in Sema. * Sema: use more accurate source locations for errors. * Provide more information in the compiler error message. * Codegen: use liveness data to avoid lowering unused `@wasmMemorySize`. * LLVM backend: add implementation - I wasn't able to test it because we are hitting a linker error for `-target wasm32-wasi -fLLVM`. * C backend: use `zig_unimplemented()` instead of silently doing wrong behavior for these builtins. * behavior tests: branch only on stage2_arch for inclusion of the wasm.zig file. We would change it to `builtin.cpu.arch` but that is causing a compiler crash on some backends.
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/type.zig b/src/type.zig
index ef794ffe74..169574bbd4 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -5256,6 +5256,8 @@ pub const Type = extern union {
pub const @"u32" = initTag(.u32);
pub const @"u64" = initTag(.u64);
+ pub const @"i32" = initTag(.i32);
+
pub const @"f16" = initTag(.f16);
pub const @"f32" = initTag(.f32);
pub const @"f64" = initTag(.f64);