Skip to content

Commit

Permalink
Eliminate certain wording around execution contexts
Browse files Browse the repository at this point in the history
Specifically, eliminate wording such as:
- an EC tracks the evaluation/execution of code
- an EC evaluates/executes code
- an EC can wait for an event
- code is 'within' an EC
- code is evaluated within an EC
- control enters an EC
  • Loading branch information
jmdyck committed Feb 13, 2023
1 parent 8f52628 commit 45b4498
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -11574,8 +11574,8 @@ <h1>

<emu-clause id="sec-execution-contexts">
<h1>Execution Contexts</h1>
<p>An <dfn variants="execution contexts">execution context</dfn> is a specification device that is used to track the runtime evaluation of code by an ECMAScript implementation. At any point in time, there is at most one execution context per agent that is actually executing code. This is known as the agent's <dfn id="running-execution-context" variants="running execution contexts">running execution context</dfn>. All references to the running execution context in this specification denote the running execution context of the surrounding agent.</p>
<p>An execution context contains whatever implementation specific state is necessary to track the execution progress of its associated code. Each execution context has at least the state components listed in <emu-xref href="#table-state-components-for-all-execution-contexts"></emu-xref>.</p>
<p>An <dfn variants="execution contexts">execution context</dfn> brings together information that is relevant for the runtime evaluation of some unit of code (e.g., a script, a module, or a function object). At any point in time, there is at most one execution context per agent whose associated code is being evaluated. This is known as the agent's <dfn id="running-execution-context" variants="running execution contexts">running execution context</dfn>. All references to the running execution context in this specification denote the running execution context of the surrounding agent.</p>
<p>Each execution context has at least the state components listed in <emu-xref href="#table-state-components-for-all-execution-contexts"></emu-xref>.</p>
<emu-table id="table-state-components-for-all-execution-contexts" caption="State Components for All Execution Contexts" oldids="table-22">
<table>
<tr>
Expand All @@ -11591,15 +11591,15 @@ <h1>Execution Contexts</h1>
code evaluation state
</td>
<td>
Any state needed to perform, suspend, and resume evaluation of the code associated with this execution context.
Determines what happens the next time there is a transfer of control to the execution context.
</td>
</tr>
<tr>
<td>
Function
</td>
<td>
If this execution context is evaluating the code of a function object, then the value of this component is that function object. If the context is evaluating the code of a |Script| or |Module|, the value is *null*.
If this execution context is established for evaluating a call to a function object, then the value of this component is that function object. If the execution context is established for evaluating a |Script| or |Module|, the value is *null*.
</td>
</tr>
<tr>
Expand Down Expand Up @@ -11637,15 +11637,15 @@ <h1>Execution Contexts</h1>
LexicalEnvironment
</td>
<td>
Identifies the Environment Record used to resolve identifier references made by code within this execution context.
Identifies the Environment Record used to resolve identifier references made by code associated with this execution context.
</td>
</tr>
<tr>
<td>
VariableEnvironment
</td>
<td>
Identifies the Environment Record that holds bindings created by |VariableStatement|s within this execution context.
Identifies the Environment Record that holds bindings created by |VariableStatement|s in the code associated with this execution context.
</td>
</tr>
<tr>
Expand Down Expand Up @@ -11677,7 +11677,7 @@ <h1>Execution Contexts</h1>
Generator
</td>
<td>
The Generator that this execution context is evaluating.
The Generator that is associated with this execution context.
</td>
</tr>
</table>
Expand Down Expand Up @@ -12130,7 +12130,7 @@ <h1>Agent Clusters</h1>
<emu-clause id="sec-forward-progress">
<h1>Forward Progress</h1>
<p>For an agent to <em>make forward progress</em> is for it to perform an evaluation step according to this specification.</p>
<p>An agent becomes <em>blocked</em> when its running execution context waits synchronously and indefinitely for an external event. Only agents whose Agent Record's [[CanBlock]] field is *true* can become blocked in this sense. An <em>unblocked</em> agent is one that is not blocked.</p>
<p>An agent becomes <em>blocked</em> when it waits synchronously and indefinitely for an external event. Only agents whose Agent Record's [[CanBlock]] field is *true* can become blocked in this sense. An <em>unblocked</em> agent is one that is not blocked.</p>

<p>Implementations must ensure that:</p>
<ul>
Expand Down Expand Up @@ -25455,7 +25455,7 @@ <h1>PrepareForTailCall ( ): ~unused~</h1>
1. Discard all resources associated with the current execution context.
1. Return ~unused~.
</emu-alg>
<p>A tail position call must either release any transient internal resources associated with the currently executing function execution context before invoking the target function or reuse those resources in support of the target function.</p>
<p>A tail position call must either release any transient internal resources associated with the currently executing function's execution context before invoking the target function or reuse those resources in support of the target function.</p>
<emu-note>
<p>For example, a tail position call should only grow an implementation's activation record stack by the amount that the size of the target function's activation record exceeds the size of the calling function's activation record. If the target function's activation record is smaller, then the total size of the stack should decrease.</p>
</emu-note>
Expand Down Expand Up @@ -26171,7 +26171,7 @@ <h1>Cyclic Module Records</h1>
ExecuteModule( [ _promiseCapability_ ] )
</td>
<td>
Evaluate the module's code within its execution context. If this module has *true* in [[HasTLA]], then a PromiseCapability Record is passed as an argument, and the method is expected to resolve or reject the given capability. In this case, the method must not throw an exception, but instead reject the PromiseCapability Record if necessary.
Evaluate the module's code using its execution context. If this module has *true* in [[HasTLA]], then a PromiseCapability Record is passed as an argument, and the method is expected to resolve or reject the given capability. In this case, the method must not throw an exception, but instead reject the PromiseCapability Record if necessary.
</td>
</tr>
</table>
Expand Down Expand Up @@ -28554,7 +28554,7 @@ <h1>ECMAScript Standard Built-in Objects</h1>
<h1>The Global Object</h1>
<p>The <dfn variants="global objects">global object</dfn>:</p>
<ul>
<li>is created before control enters any execution context.</li>
<li>is created in InitializeHostDefinedRealm.</li>
<li>does not have a [[Construct]] internal method; it cannot be used as a constructor with the `new` operator.</li>
<li>does not have a [[Call]] internal method; it cannot be invoked as a function.</li>
<li>has a [[Prototype]] internal slot whose value is host-defined.</li>
Expand Down

0 comments on commit 45b4498

Please sign in to comment.