From 17882162b3be5542b4e289e5ddc6535a4bb4c6b1 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 15 May 2023 20:09:54 -0700 Subject: stage2: move function types to InternPool --- src/value.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/value.zig') diff --git a/src/value.zig b/src/value.zig index 50e3fc8061..35d144f912 100644 --- a/src/value.zig +++ b/src/value.zig @@ -602,6 +602,11 @@ pub const Value = struct { return result; } + pub fn toIntern(val: Value) InternPool.Index { + assert(val.ip_index != .none); + return val.ip_index; + } + /// Asserts that the value is representable as a type. pub fn toType(self: Value) Type { if (self.ip_index != .none) return self.ip_index.toType(); -- cgit v1.2.3