InternPool: replace untyped values with typed values (#1023)
* InternPool: replace untyped values with typed values * InternPool: remove `indexToTag` * InternPool: rework representation of optional values * add representation for unknown values and types * ComptimeInterpreter: use InternPool typed-values * ComptimeInterpreter: field access test * ComptimeInterpreter: improve handling of if expressions * InternPool: fix typeOf on a comptime float * ComptimeInterpreter: implement TypeOf with multiple parameters
This commit is contained in:
@@ -788,6 +788,7 @@ pub fn resolveTypeOfNodeInternal(store: *DocumentStore, node_handle: NodeWithHan
|
||||
}
|
||||
return null;
|
||||
};
|
||||
const is_type_val = interpreter.ip.indexToKey(value.index).typeOf() == .type_type;
|
||||
|
||||
return TypeWithHandle{
|
||||
.type = .{
|
||||
@@ -795,7 +796,7 @@ pub fn resolveTypeOfNodeInternal(store: *DocumentStore, node_handle: NodeWithHan
|
||||
.interpreter = interpreter,
|
||||
.value = value,
|
||||
} },
|
||||
.is_type_val = value.ty == InternPool.Index.type_type,
|
||||
.is_type_val = is_type_val,
|
||||
},
|
||||
.handle = node_handle.handle,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user