From c39d41d6fe66129649334b42fe5c0af5a83a1c38 Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Mon, 13 Feb 2023 11:22:33 -0500 Subject: [PATCH] Eliminate certain wording around execution contexts 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 --- spec.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/spec.html b/spec.html index 264ccb13586..b57520d27ff 100644 --- a/spec.html +++ b/spec.html @@ -11572,8 +11572,8 @@

Execution Contexts

-

An execution context 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 running execution context. All references to the running execution context in this specification denote the running execution context of the surrounding agent.

-

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 .

+

An execution context 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 running execution context. All references to the running execution context in this specification denote the running execution context of the surrounding agent.

+

Each execution context has at least the state components listed in .

@@ -11589,7 +11589,7 @@

Execution Contexts

code evaluation state @@ -11597,7 +11597,7 @@

Execution Contexts

Function @@ -11635,7 +11635,7 @@

Execution Contexts

LexicalEnvironment @@ -11643,7 +11643,7 @@

Execution Contexts

VariableEnvironment @@ -11675,7 +11675,7 @@

Execution Contexts

Generator
- 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.
- 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*.
- 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.
- 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.
- The Generator that this execution context is evaluating. + The Generator that is associated with this execution context.
@@ -12128,7 +12128,7 @@

Agent Clusters

Forward Progress

For an agent to make forward progress is for it to perform an evaluation step according to this specification.

-

An agent becomes blocked 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 unblocked agent is one that is not blocked.

+

An agent becomes blocked 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 unblocked agent is one that is not blocked.

Implementations must ensure that:

    @@ -25471,7 +25471,7 @@

    PrepareForTailCall ( ): ~unused~

    1. Discard all resources associated with the current execution context. 1. Return ~unused~. -

    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.

    +

    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.

    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.

    @@ -26187,7 +26187,7 @@

    Cyclic Module Records

    ExecuteModule( [ _promiseCapability_ ] ) - 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. @@ -28570,7 +28570,7 @@

    ECMAScript Standard Built-in Objects

    The Global Object

    The global object:

      -
    • is created before control enters any execution context.
    • +
    • is created in InitializeHostDefinedRealm.
    • does not have a [[Construct]] internal method; it cannot be used as a constructor with the `new` operator.
    • does not have a [[Call]] internal method; it cannot be invoked as a function.
    • has a [[Prototype]] internal slot whose value is host-defined.