diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-04-24 17:31:52 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-24 17:44:07 -0700 |
| commit | ff2ec0dc5ad272113379ff485bb71c6c1637d948 (patch) | |
| tree | 64a073251b80178a293434d8df9aa4cc5998bf4c /src/AstGen.zig | |
| parent | e018e64a53eb7fdffedb3efadb862f400f9e9f70 (diff) | |
| download | zig-ff2ec0dc5ad272113379ff485bb71c6c1637d948.tar.gz zig-ff2ec0dc5ad272113379ff485bb71c6c1637d948.zip | |
AstGen: implement `@Vector`
Diffstat (limited to 'src/AstGen.zig')
| -rw-r--r-- | src/AstGen.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index 201cf19977..ba6fa74626 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -1808,6 +1808,7 @@ fn unusedResultExpr(gz: *GenZir, scope: *Scope, statement: ast.Node.Index) Inner .array_mul, .array_type, .array_type_sentinel, + .vector_type, .elem_type, .indexable_ptr_len, .anyframe_type, @@ -6510,6 +6511,14 @@ fn builtinCall( }); return rvalue(gz, scope, rl, result, node); }, + .Vector => { + const result = try gz.addPlNode(.vector_type, node, Zir.Inst.Bin{ + .lhs = try comptimeExpr(gz, scope, .{.ty = .u32_type}, params[0]), + .rhs = try typeExpr(gz, scope, params[1]), + }); + return rvalue(gz, scope, rl, result, node); + }, + } // zig fmt: on } |
