Lvalues should be distinct from both ArkExp and ArkVal as they are run-time values, but not first-class.
ArkExp needs a subclass ArkLexp with an evalRef method that produces an lvalue (=== ArkRef), i.e. ArkRef is no longer a subclass of ArkVal. Assignment calls evalRef on its left-hand argument and eval on its right-hand argument.
For example, ArkProperty.evalRef would call Object.eval and then wrap the result as an ArkPropertyRef. A global, local or capture's .evalRef would return an ArkValRef.
Lvalues should be distinct from both
ArkExp
andArkVal
as they are run-time values, but not first-class.ArkExp
needs a subclassArkLexp
with anevalRef
method that produces an lvalue (===ArkRef
), i.e.ArkRef
is no longer a subclass ofArkVal
. Assignment callsevalRef
on its left-hand argument andeval
on its right-hand argument.For example,
ArkProperty.evalRef
would callObject.eval
and then wrap the result as anArkPropertyRef
. A global, local or capture's.evalRef
would return anArkValRef
.