aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-05-25 19:23:01 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:47:55 -0700
commit70cc68e9994f7dca53904075e15b2b6f87342539 (patch)
treea02b75bcd056c2ce2d9a16a2ec51c4da06e03d9f /src/Module.zig
parent72e4ea38216aab7e7ed05978d04c5d32de44b5ce (diff)
downloadzig-70cc68e9994f7dca53904075e15b2b6f87342539.tar.gz
zig-70cc68e9994f7dca53904075e15b2b6f87342539.zip
Air: remove constant tag
Some uses have been moved to their own tag, the rest use interned. Also, finish porting comptime mutation to be more InternPool aware.
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 47f7643b9f..d3045631c5 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -764,14 +764,7 @@ pub const Decl = struct {
pub fn typedValue(decl: Decl) error{AnalysisFail}!TypedValue {
if (!decl.has_tv) return error.AnalysisFail;
- return TypedValue{
- .ty = decl.ty,
- .val = decl.val,
- };
- }
-
- pub fn value(decl: *Decl) error{AnalysisFail}!Value {
- return (try decl.typedValue()).val;
+ return TypedValue{ .ty = decl.ty, .val = decl.val };
}
pub fn isFunction(decl: Decl, mod: *const Module) !bool {