diff --git a/index.html b/index.html index 2fbdc60..6dfa0f4 100644 --- a/index.html +++ b/index.html @@ -2999,7 +2999,7 @@

Stage 3 Draft / May 7, 2024

Dynamic Code Brand Checks

+

Stage 3 Draft / November 20, 2024

Dynamic Code Brand Checks

1 HostGetCodeForEval ( argument )

@@ -3030,7 +3030,7 @@

2 HostEnsureCanCompileStrings ( calleeRealm

3 PerformEval ( x, strictCaller, direct )

The abstract operation PerformEval takes arguments x (an ECMAScript language value), strictCaller (a Boolean), and direct (direct-eval or indirect-eval) and returns either a normal completion containing an ECMAScript language value or a throw completion. It performs the following steps when called:

-
  1. Assert: If direct is indirect-eval, then strictCaller is also false.
  2. If x is a String, then
    1. Let xStr be x.
  3. Else if x is an Object, then
    1. Let code be HostGetCodeForEval(x).
    2. If code is a String, let xStr be code.
    3. Else, return x.
  4. Else,
    1. Return x.
  5. If x is not a String, return x.
  6. If x is an Object and ! IsCodeLike(x) is true, then
    1. Let xStr be ? ToString(x).
  7. Else, if x is a String, then
    1. Let xStr be x.
  8. Else,
    1. Return x.
  9. Let evalRealm be the current Realm Record.
  10. NOTE: In the case of a direct eval, evalRealm is the realm of both the caller of eval and of the eval function itself.
  11. Perform ? HostEnsureCanCompileStrings(evalRealm, « », x xStr, xStr, direct, « », x).
  12. ...
+
  1. Assert: If direct is indirect-eval, then strictCaller is also false.
  2. If x is a String, then
    1. Let xStr be x.
  3. Else if x is an Object, then
    1. Let code be HostGetCodeForEval(x).
    2. If code is a String, let xStr be code.
    3. Else, return x.
  4. Else,
    1. Return x.
  5. If x is not a String, return x.
  6. Let evalRealm be the current Realm Record.
  7. NOTE: In the case of a direct eval, evalRealm is the realm of both the caller of eval and of the eval function itself.
  8. Perform ? HostEnsureCanCompileStrings(evalRealm, « », x xStr, xStr, direct, « », x).
  9. ...
diff --git a/spec.emu b/spec.emu index 18f533b..d34a8e6 100644 --- a/spec.emu +++ b/spec.emu @@ -78,12 +78,6 @@ contributors: Krzysztof Kotowicz, Mike Samuel, Luke Warlow 1. Else, 1. Return _x_. 1. If _x_ is not a String, return _x_. - 1. If _x_ is an Object and ! IsCodeLike(_x_) is *true*, then - 1. Let _xStr_ be ? ToString(_x_). - 1. Else, if _x_ is a String, then - 1. Let _xStr_ be _x_. - 1. Else, - 1. Return _x_. 1. Let _evalRealm_ be the current Realm Record. 1. NOTE: In the case of a direct eval, _evalRealm_ is the realm of both the caller of `eval` and of the `eval` function itself. 1. Perform ? HostEnsureCanCompileStrings(_evalRealm_, « », _x_ _xStr_, _xStr_, _direct_, « », _x_).