CompilerEnvirons
Compiler configuration shared by the lexer, parser and code generator.
Ported subset notes: initFromContext arrives with Context in Phase 3. The security-controller fields and the deprecated optimizationLevel pair are out of the port's scope: there is no bytecode compiler, so interpretedMode is the only switch.
Properties
Extension to ECMA: if 'function
Allows new.target outside a function, for eval code that a function runs.
Mozilla sources use the C preprocessor.
Allows usage of "super" everywhere, simulating that we are inside a method.
Allows super(...), for eval code that a derived class constructor runs.
Whether source information is generated. Without it, evaluating "toString" on JavaScript functions produces only "native code" for the body, which is not fully ECMA conformant.
For direct eval code in a class field initializer, where arguments is a syntax error.
For direct eval code in a class body, the private names the enclosing classes declare.
Full error recovery: parse errors do not throw, and the parser attempts to build a full syntax tree from the input. Useful for IDEs and other frontends.
Functions
Copies the settings that matter for compilation out of cx.