diff --git a/spec.html b/spec.html index 3797169192..59d03996ad 100644 --- a/spec.html +++ b/spec.html @@ -7547,7 +7547,10 @@

Arguments Exotic Objects

The ParameterMap object and its property values are used as a device for specifying the arguments object correspondence to argument bindings. The ParameterMap object and the objects that are the values of its properties are not directly observable from ECMAScript code. An ECMAScript implementation does not need to actually create or use such objects to implement the specified semantics.

-

Arguments objects for strict functions define non-configurable accessor properties named `"caller"` and `"callee"` which throw a *TypeError* exception on access. The `"callee"` property has a more specific meaning for non-strict functions and a `"caller"` property has historically been provided as an implementation-defined extension by some ECMAScript implementations. The strict mode definition of these properties exists to ensure that neither of them is defined in any other manner by conforming ECMAScript implementations.

+

Arguments objects for strict functions define a non-configurable accessor property named `"callee"` which throws a *TypeError* exception on access. The `"callee"` property has a more specific meaning for non-strict functions. The strict mode definition of this property exists to ensure that it is not defined in any other manner by conforming ECMAScript implementations.

+
+ +

ECMAScript implementations of arguments objects have historically contained an accessor property named ``"caller"`. Prior to ECMAScript 2017, this specification included the definition of a throwing `"caller"` property on arguments objects for strict functions. Since implementations do not contain this extension any longer, ECMAScript 2017 dropped the requirement for a throwing `"caller"` accessor.

@@ -7562,10 +7565,8 @@

[[GetOwnProperty]] (_P_)

1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_). 1. If _isMapped_ is *true*, then 1. Set _desc_.[[Value]] to Get(_map_, _P_). - 1. If IsDataDescriptor(_desc_) is *true* and _P_ is `"caller"` and _desc_.[[Value]] is a strict mode Function object, throw a *TypeError* exception. 1. Return _desc_. -

If an implementation does not provide a built-in `caller` property for argument exotic objects then step 7 of this algorithm must be skipped.

@@ -7629,19 +7630,6 @@

[[Set]] ( _P_, _V_, _Receiver_)

- -

[[HasProperty]] ( _P_ )

-

The [[HasProperty]] internal method of an arguments exotic object when called with property key _P_, performs the following steps:

- - 1. Let _args_ be the arguments object. - 1. If _P_ is `"caller"`, then - 1. Let _desc_ be ! OrdinaryGetOwnProperty(_args_, _P_). - 1. If IsDataDescriptor(_desc_) is *true*, return *true*. - 1. Return ? OrdinaryHasProperty(_args_, _P_). - -

If an implementation does not provide a built-in caller property for argument exotic objects then step 2 of this algorithm must be skipped.

-
-

[[Delete]] (_P_)

@@ -7673,7 +7661,6 @@

CreateUnmappedArgumentsObject (_argumentsList_)

1. Let _index_ be _index_ + 1. 1. Perform ! DefinePropertyOrThrow(_obj_, @@iterator, PropertyDescriptor {[[Value]]: %ArrayProto_values%, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true*}). 1. Perform ! DefinePropertyOrThrow(_obj_, `"callee"`, PropertyDescriptor {[[Get]]: %ThrowTypeError%, [[Set]]: %ThrowTypeError%, [[Enumerable]]: *false*, [[Configurable]]: *false*}). - 1. Perform ! DefinePropertyOrThrow(_obj_, `"caller"`, PropertyDescriptor {[[Get]]: %ThrowTypeError%, [[Set]]: %ThrowTypeError%, [[Enumerable]]: *false*, [[Configurable]]: *false*}). 1. Return _obj_.
@@ -21642,6 +21629,9 @@

Forbidden Extensions

  • If an implementation extends non-strict or built-in function objects with an own property named `"caller"` the value of that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function object. If it is an accessor property, the function that is the value of the property's [[Get]] attribute must never return a strict function when called.
  • +
  • + Neither mapped nor unmapped arguments objects may be created with an own property named `"caller"`. +
  • The behaviour of the following methods must not be extended except as specified in ECMA-402: `Object.prototype.toLocaleString`, `Array.prototype.toLocaleString`, `Number.prototype.toLocaleString`, `Date.prototype.toLocaleDateString`, `Date.prototype.toLocaleString`, `Date.prototype.toLocaleTimeString`, `String.prototype.localeCompare`, `%TypedArray%.prototype.toLocaleString`.
  • @@ -36759,7 +36749,7 @@

    The Strict Mode of ECMAScript

    The identifier `eval` or `arguments` may not appear as the |LeftHandSideExpression| of an Assignment operator () or of a |UpdateExpression| () or as the |UnaryExpression| operated upon by a Prefix Increment () or a Prefix Decrement () operator.
  • - Arguments objects for strict functions define non-configurable accessor properties named `"caller"` and `"callee"` which throw a *TypeError* exception on access (). + Arguments objects for strict functions defines a non-configurable accessor property `"callee"` which throw a *TypeError* exception on access ().
  • Arguments objects for strict functions do not dynamically share their array indexed property values with the corresponding formal parameter bindings of their functions. ().