Skip to content

Commit e1ef220

Browse files
authored
Add missing calls to NewDisposeCapability AOs (#175)
1 parent e53b73f commit e1ef220

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

spec.emu

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2315,6 +2315,44 @@ contributors: Ron Buckton, Ecma International
23152315
1. Return _env_.
23162316
</emu-alg>
23172317
</emu-clause>
2318+
2319+
<emu-clause id="sec-newfunctionenvironment" type="abstract operation">
2320+
<h1>
2321+
NewFunctionEnvironment (
2322+
_F_: an ECMAScript function,
2323+
_newTarget_: an Object or *undefined*,
2324+
): a Function Environment Record
2325+
</h1>
2326+
<dl class="header">
2327+
</dl>
2328+
<emu-alg>
2329+
1. Let _env_ be a new Function Environment Record containing no bindings.
2330+
1. Set _env_.[[FunctionObject]] to _F_.
2331+
1. If _F_.[[ThisMode]] is ~lexical~, set _env_.[[ThisBindingStatus]] to ~lexical~.
2332+
1. Else, set _env_.[[ThisBindingStatus]] to ~uninitialized~.
2333+
1. Set _env_.[[NewTarget]] to _newTarget_.
2334+
1. Set _env_.[[OuterEnv]] to _F_.[[Environment]].
2335+
1. <ins>Set _env_.[[DisposeCapability]] to NewDisposeCapability().</ins>
2336+
1. Return _env_.
2337+
</emu-alg>
2338+
</emu-clause>
2339+
2340+
<emu-clause id="sec-newmoduleenvironment" type="abstract operation">
2341+
<h1>
2342+
NewModuleEnvironment (
2343+
_E_: an Environment Record,
2344+
): a Module Environment Record
2345+
</h1>
2346+
<dl class="header">
2347+
</dl>
2348+
<emu-alg>
2349+
1. Let _env_ be a new Module Environment Record containing no bindings.
2350+
1. Set _env_.[[OuterEnv]] to _E_.
2351+
1. <ins>Set _env_.[[DisposeCapability]] to NewDisposeCapability().</ins>
2352+
1. Return _env_.
2353+
</emu-alg>
2354+
</emu-clause>
2355+
23182356
</emu-clause>
23192357
</emu-clause>
23202358
</emu-clause>

0 commit comments

Comments
 (0)