unconst (value -- mutableView)value: Current stack value whose view may become mutable.mutableView: Resulting stack value in mutable view where valid.unconst is a current stack-value mutable-view conversion builtin. It converts the current stack value to a mutable view where valid.
For Ref inputs, only the current stack value changes. The referenced storage and any other references remain unchanged.
Code, Text, and Meta inputs are accepted and returned unchanged. This includes callable non-NIL Code values. No fresh value is created from dereferenced schema or contents. In-place values are invalid. Because only Ref inputs change view, only Ref inputs can change their isConst result under unconst. Accepted unchanged Meta inputs still make isConst report FALSE.
NAME on an In-place local is valid because that form already produces an immutable Ref view. unconst returns the mutable view to the same target.NIL Code inputs.FALSE under isConst.{} 0 {} [
value: 7;
codeLocal: {} () {} codeRef;
unknownText: 0 ("") dynamic @;
[] !codeLocal
"-- current Ref view only --" printCompilerMessage
value printStack _:;
value unconst printStack _:;
value printStack _:;
@value printStack _:;
@value unconst printStack _:;
value isConst printStack _:;
value unconst isConst printStack _:;
@value unconst isConst printStack _:;
"-- accepted non-Ref inputs are unchanged --" printCompilerMessage
"hi" unconst printStack _:;
unknownText unconst isConst printStack _:;
{} () {} codeRef unconst isConst printStack _:;
@codeLocal unconst isConst printStack _:;
() unconst isConst printStack _:;
0
] "main" exportFunction
-- current Ref view only --
7 Cref
7 Ref
7 Cref
7 Ref
7 Ref
TRUE
FALSE
FALSE
-- accepted non-Ref inputs are unchanged --
"hi"
TRUE
TRUE
TRUE
FALSE
const builtin (value -- immutableView) Immutable view conversion for the current stack value.fieldIsRef builtin (schema ordinal -- isRefLike) Ref-like test for one selected item schema.isConst builtin (value -- isConst) Current stack-value immutability test.isRef builtin (value -- value isRefLike) Current stack-value Ref-like predicate.managed? builtin (schema -- isManaged) Managed-lifetime schema test.