Closed rbuckton closed 3 months ago
We may also need to do the same in NewModuleEnvironment()
.
We may also need to do the same in
NewModuleEnvironment()
.
It seems like this is necessary, per a reference implementation I am working on for engine262 as well as work in progress for test262 tests.
We also seem to be missing a call to the DisposeResources()
AO in a Source Text Module Record's ExecuteModule
, which is necessary to properly dispose resources at the top level of a Module.
We may also need to do the same in
NewModuleEnvironment()
.It seems like this is necessary, per a reference implementation I am working on for engine262 as well as work in progress for test262 tests.
Filed as #173
We also seem to be missing a call to the
DisposeResources()
AO in a Source Text Module Record'sExecuteModule
, which is necessary to properly dispose resources at the top level of a Module.
Filed as #174
In
FunctionDefinitionInstantiation
in non-strict mode we set the LexicalEnvironment of a function to aNewDeclarativeEnvironment()
which correctly initializes[[DisposeCapability]]
to aNewDisposeCapability()
. However, in strict mode we reuse the LexicalEnvironment which happens to be a Function Environment Record that was created byNewFunctionEnvironment()
, which does not correctly set its[[DisposeCapability]]
slot.We either need to unconditionally set
[[DisposeCapability]]
inNewFunctionEnvironment()
, or conditionally set it inFunctionDefinitionInstantiation()
when we opt to reuse the LexicalEnvironment. I feel the first option is probably cleaner, though.