Args are the children nodes to the current node.
Flags store metadata/primitive data in an Iridium node. These nodes cannot store other Iridium S-Expressions.
Tag specifics the S-Expression Type.
This method is used to squish the Iridium Code into an array which can be easily stored on disk.
Nested Array of Iridium S-Expressions.
Optional
space: number
Remarks
A JSExplicitBindingDeclaration is used to either declare a new binding, and also (optionally) initialize it. After resolution, all JSWrites are reduced down to EnvWriteSEXP nodes. In case a new binding was declared, the resolution pass would end up finding the relevant scope, allocate space on the stack and take care of the initialization at scope start. After the initialization is done, all declarations can be basically reduced down to simple environment writes. The
SAFE
,THISINIT
andSLOPPY
flags are used to handle features like TDZ where writes/reads to a binding before its declaration is reached is invalid. Such restricted accesses to the environment are made explicit in Iridium.TODO Notes
See all places this node is created, ensure there is no way it can end up as an RVal.
Resolutions
Structure
ARG(lValTarget)
: The storage target locationARG(rVal)
: The value to store (possible nothing, in case of just a declaration).FLAG(JSLET | JSCONST | JSVAR)
: The kind of the declaration, one of these allowed types (JSEnvWriteTypes).FLAG(SAFE)
: Indicates whether the writes being performed are safe.FLAG(THISINIT)
: Indicates whether the write is being performed tothis
, in this case it will never be true but is kept around for implementation consistency during lowering.FLAG(SLOPPY)
: Indicates whether the writes to target locations is sloppy.