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.
This commit is contained in:
Jacob Young
2023-05-25 19:23:01 -04:00
committed by Andrew Kelley
parent 72e4ea3821
commit 70cc68e999
19 changed files with 879 additions and 856 deletions

View File

@@ -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 {