diff --git a/translated/issues-20.html b/translated/issues-20.html
new file mode 100644
index 0000000000..29ecda08b8
--- /dev/null
+++ b/translated/issues-20.html
@@ -0,0 +1,394 @@
+
Ordinary and Exotic Objects Behaviours
+
+
+
+ Ordinary Object Internal Methods and Internal Slots
+ All ordinary objects have an internal slot called [[Prototype]]. The value of this internal slot is either *null* or an object and is used for implementing inheritance. Data properties of the [[Prototype]] object are inherited (and visible as properties of the child object) for the purposes of get access, but not for set access. Accessor properties are inherited for both get access and set access.
+ Every ordinary object has a Boolean-valued [[Extensible]] internal slot that controls whether or not properties may be added to the object. If the value of the [[Extensible]] internal slot is *false* then additional properties may not be added to the object. In addition, if [[Extensible]] is *false* the value of the [[Prototype]] internal slot of the object may not be modified. Once the value of an object's [[Extensible]] internal slot has been set to *false* it may not be subsequently changed to *true*.
+ In the following algorithm descriptions, assume _O_ is an ordinary object, _P_ is a property key value, _V_ is any ECMAScript language value, and _Desc_ is a Property Descriptor record.
+ Each ordinary object internal method delegates to a similarly-named abstract operation. If such an abstract operation depends on another internal method, then the internal method is invoked on _O_ rather than calling the similarly-named abstract operation directly. These semantics ensure that exotic objects have their overridden internal methods invoked when ordinary object internal methods are applied to them.
+
+
+
+ [[GetPrototypeOf]] ( )
+ When the [[GetPrototypeOf]] internal method of _O_ is called, the following steps are taken:
+
+ 1. Return ! OrdinaryGetPrototypeOf(_O_).
+
+
+
+ OrdinaryGetPrototypeOf ( _O_ )
+ When the abstract operation OrdinaryGetPrototypeOf is called with Object _O_, the following steps are taken:
+
+ 1. Return _O_.[[Prototype]].
+
+
+
+
+
+
+ [[SetPrototypeOf]] ( _V_ )
+ When the [[SetPrototypeOf]] internal method of _O_ is called with argument _V_, the following steps are taken:
+
+ 1. Return ! OrdinarySetPrototypeOf(_O_, _V_).
+
+
+
+ OrdinarySetPrototypeOf ( _O_, _V_ )
+ When the abstract operation OrdinarySetPrototypeOf is called with Object _O_ and value _V_, the following steps are taken:
+
+ 1. Assert: Either Type(_V_) is Object or Type(_V_) is Null.
+ 1. Let _extensible_ be _O_.[[Extensible]].
+ 1. Let _current_ be _O_.[[Prototype]].
+ 1. If SameValue(_V_, _current_) is *true*, return *true*.
+ 1. If _extensible_ is *false*, return *false*.
+ 1. Let _p_ be _V_.
+ 1. Let _done_ be *false*.
+ 1. Repeat, while _done_ is *false*,
+ 1. If _p_ is *null*, set _done_ to *true*.
+ 1. Else if SameValue(_p_, _O_) is *true*, return *false*.
+ 1. Else,
+ 1. If _p_.[[GetPrototypeOf]] is not the ordinary object internal method defined in , set _done_ to *true*.
+ 1. Else, set _p_ to _p_.[[Prototype]].
+ 1. Set _O_.[[Prototype]] to _V_.
+ 1. Return *true*.
+
+
+ The loop in step 8 guarantees that there will be no circularities in any prototype chain that only includes objects that use the ordinary object definitions for [[GetPrototypeOf]] and [[SetPrototypeOf]].
+
+
+
+
+
+
+ [[IsExtensible]] ( )
+ When the [[IsExtensible]] internal method of _O_ is called, the following steps are taken:
+
+ 1. Return ! OrdinaryIsExtensible(_O_).
+
+
+
+ OrdinaryIsExtensible ( _O_ )
+ When the abstract operation OrdinaryIsExtensible is called with Object _O_, the following steps are taken:
+
+ 1. Return _O_.[[Extensible]].
+
+
+
+
+
+
+ [[PreventExtensions]] ( )
+ When the [[PreventExtensions]] internal method of _O_ is called, the following steps are taken:
+
+ 1. Return ! OrdinaryPreventExtensions(_O_).
+
+
+
+ OrdinaryPreventExtensions ( _O_ )
+ When the abstract operation OrdinaryPreventExtensions is called with Object _O_, the following steps are taken:
+
+ 1. Set _O_.[[Extensible]] to *false*.
+ 1. Return *true*.
+
+
+
+
+
+
+ [[GetOwnProperty]] ( _P_ )
+ When the [[GetOwnProperty]] internal method of _O_ is called with property key _P_, the following steps are taken:
+
+ 1. Return ! OrdinaryGetOwnProperty(_O_, _P_).
+
+
+
+
+ OrdinaryGetOwnProperty ( _O_, _P_ )
+ When the abstract operation OrdinaryGetOwnProperty is called with Object _O_ and with property key _P_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. If _O_ does not have an own property with key _P_, return *undefined*.
+ 1. Let _D_ be a newly created Property Descriptor with no fields.
+ 1. Let _X_ be _O_'s own property whose key is _P_.
+ 1. If _X_ is a data property, then
+ 1. Set _D_.[[Value]] to the value of _X_'s [[Value]] attribute.
+ 1. Set _D_.[[Writable]] to the value of _X_'s [[Writable]] attribute.
+ 1. Else _X_ is an accessor property,
+ 1. Set _D_.[[Get]] to the value of _X_'s [[Get]] attribute.
+ 1. Set _D_.[[Set]] to the value of _X_'s [[Set]] attribute.
+ 1. Set _D_.[[Enumerable]] to the value of _X_'s [[Enumerable]] attribute.
+ 1. Set _D_.[[Configurable]] to the value of _X_'s [[Configurable]] attribute.
+ 1. Return _D_.
+
+
+
+
+
+
+ [[DefineOwnProperty]] ( _P_, _Desc_ )
+ When the [[DefineOwnProperty]] internal method of _O_ is called with property key _P_ and Property Descriptor _Desc_, the following steps are taken:
+
+ 1. Return ? OrdinaryDefineOwnProperty(_O_, _P_, _Desc_).
+
+
+
+
+ OrdinaryDefineOwnProperty ( _O_, _P_, _Desc_ )
+ When the abstract operation OrdinaryDefineOwnProperty is called with Object _O_, property key _P_, and Property Descriptor _Desc_, the following steps are taken:
+
+ 1. Let _current_ be ? _O_.[[GetOwnProperty]](_P_).
+ 1. Let _extensible_ be _O_.[[Extensible]].
+ 1. Return ValidateAndApplyPropertyDescriptor(_O_, _P_, _extensible_, _Desc_, _current_).
+
+
+
+
+
+ IsCompatiblePropertyDescriptor ( _Extensible_, _Desc_, _Current_ )
+ When the abstract operation IsCompatiblePropertyDescriptor is called with Boolean value _Extensible_, and Property Descriptors _Desc_, and _Current_, the following steps are taken:
+
+ 1. Return ValidateAndApplyPropertyDescriptor(*undefined*, *undefined*, _Extensible_, _Desc_, _Current_).
+
+
+
+
+
+ ValidateAndApplyPropertyDescriptor ( _O_, _P_, _extensible_, _Desc_, _current_ )
+ When the abstract operation ValidateAndApplyPropertyDescriptor is called with Object _O_, property key _P_, Boolean value _extensible_, and Property Descriptors _Desc_, and _current_, the following steps are taken:
+
+ If *undefined* is passed as _O_, only validation is performed and no object updates are performed.
+
+
+ 1. Assert: If _O_ is not *undefined*, then IsPropertyKey(_P_) is *true*.
+ 1. If _current_ is *undefined*, then
+ 1. If _extensible_ is *false*, return *false*.
+ 1. Assert: _extensible_ is *true*.
+ 1. If IsGenericDescriptor(_Desc_) is *true* or IsDataDescriptor(_Desc_) is *true*, then
+ 1. If _O_ is not *undefined*, create an own data property named _P_ of object _O_ whose [[Value]], [[Writable]], [[Enumerable]] and [[Configurable]] attribute values are described by _Desc_. If the value of an attribute field of _Desc_ is absent, the attribute of the newly created property is set to its default value.
+ 1. Else _Desc_ must be an accessor Property Descriptor,
+ 1. If _O_ is not *undefined*, create an own accessor property named _P_ of object _O_ whose [[Get]], [[Set]], [[Enumerable]] and [[Configurable]] attribute values are described by _Desc_. If the value of an attribute field of _Desc_ is absent, the attribute of the newly created property is set to its default value.
+ 1. Return *true*.
+ 1. If every field in _Desc_ is absent, return *true*.
+ 1. If _current_.[[Configurable]] is *false*, then
+ 1. If _Desc_.[[Configurable]] is present and its value is *true*, return *false*.
+ 1. If _Desc_.[[Enumerable]] is present and the [[Enumerable]] fields of _current_ and _Desc_ are the Boolean negation of each other, return *false*.
+ 1. If IsGenericDescriptor(_Desc_) is *true*, no further validation is required.
+ 1. Else if IsDataDescriptor(_current_) and IsDataDescriptor(_Desc_) have different results, then
+ 1. If _current_.[[Configurable]] is *false*, return *false*.
+ 1. If IsDataDescriptor(_current_) is *true*, then
+ 1. If _O_ is not *undefined*, convert the property named _P_ of object _O_ from a data property to an accessor property. Preserve the existing values of the converted property's [[Configurable]] and [[Enumerable]] attributes and set the rest of the property's attributes to their default values.
+ 1. Else,
+ 1. If _O_ is not *undefined*, convert the property named _P_ of object _O_ from an accessor property to a data property. Preserve the existing values of the converted property's [[Configurable]] and [[Enumerable]] attributes and set the rest of the property's attributes to their default values.
+ 1. Else if IsDataDescriptor(_current_) and IsDataDescriptor(_Desc_) are both *true*, then
+ 1. If _current_.[[Configurable]] is *false* and _current_.[[Writable]] is *false*, then
+ 1. If _Desc_.[[Writable]] is present and _Desc_.[[Writable]] is *true*, return *false*.
+ 1. If _Desc_.[[Value]] is present and SameValue(_Desc_.[[Value]], _current_.[[Value]]) is *false*, return *false*.
+ 1. Return *true*.
+ 1. Else IsAccessorDescriptor(_current_) and IsAccessorDescriptor(_Desc_) are both *true*,
+ 1. If _current_.[[Configurable]] is *false*, then
+ 1. If _Desc_.[[Set]] is present and SameValue(_Desc_.[[Set]], _current_.[[Set]]) is *false*, return *false*.
+ 1. If _Desc_.[[Get]] is present and SameValue(_Desc_.[[Get]], _current_.[[Get]]) is *false*, return *false*.
+ 1. Return *true*.
+ 1. If _O_ is not *undefined*, then
+ 1. For each field of _Desc_ that is present, set the corresponding attribute of the property named _P_ of object _O_ to the value of the field.
+ 1. Return *true*.
+
+
+
+
+
+
+ [[HasProperty]]( _P_ )
+ When the [[HasProperty]] internal method of _O_ is called with property key _P_, the following steps are taken:
+
+ 1. Return ? OrdinaryHasProperty(_O_, _P_).
+
+
+
+
+ OrdinaryHasProperty ( _O_, _P_ )
+ When the abstract operation OrdinaryHasProperty is called with Object _O_ and with property key _P_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _hasOwn_ be ? _O_.[[GetOwnProperty]](_P_).
+ 1. If _hasOwn_ is not *undefined*, return *true*.
+ 1. Let _parent_ be ? _O_.[[GetPrototypeOf]]().
+ 1. If _parent_ is not *null*, then
+ 1. Return ? _parent_.[[HasProperty]](_P_).
+ 1. Return *false*.
+
+
+
+
+
+
+ [[Get]] ( _P_, _Receiver_ )
+ When the [[Get]] internal method of _O_ is called with property key _P_ and ECMAScript language value _Receiver_, the following steps are taken:
+
+
+ 1. Return ? OrdinaryGet(_O_, _P_, _Receiver_).
+
+
+
+ OrdinaryGet ( _O_, _P_, _Receiver_ )
+ When the abstract operation OrdinaryGet is called with Object _O_, property key _P_, and ECMAScript language value _Receiver_, the following steps are taken:
+
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _desc_ be ? _O_.[[GetOwnProperty]](_P_).
+ 1. If _desc_ is *undefined*, then
+ 1. Let _parent_ be ? _O_.[[GetPrototypeOf]]().
+ 1. If _parent_ is *null*, return *undefined*.
+ 1. Return ? _parent_.[[Get]](_P_, _Receiver_).
+ 1. If IsDataDescriptor(_desc_) is *true*, return _desc_.[[Value]].
+ 1. Assert: IsAccessorDescriptor(_desc_) is *true*.
+ 1. Let _getter_ be _desc_.[[Get]].
+ 1. If _getter_ is *undefined*, return *undefined*.
+ 1. Return ? Call(_getter_, _Receiver_).
+
+
+
+
+
+
+ [[Set]] ( _P_, _V_, _Receiver_ )
+ When the [[Set]] internal method of _O_ is called with property key _P_, value _V_, and ECMAScript language value _Receiver_, the following steps are taken:
+
+ 1. Return ? OrdinarySet(_O_, _P_, _V_, _Receiver_).
+
+
+
+ OrdinarySet ( _O_, _P_, _V_, _Receiver_ )
+ When the abstract operation OrdinarySet is called with Object _O_, property key _P_, value _V_, and ECMAScript language value _Receiver_, the following steps are taken:
+
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _ownDesc_ be ? _O_.[[GetOwnProperty]](_P_).
+ 1. Return OrdinarySetWithOwnDescriptor(_O_, _P_, _V_, _Receiver_, _ownDesc_).
+
+
+
+
+ OrdinarySetWithOwnDescriptor ( _O_, _P_, _V_, _Receiver_, _ownDesc_ )
+ When the abstract operation OrdinarySetWithOwnDescriptor is called with Object _O_, property key _P_, value _V_, ECMAScript language value _Receiver_, and Property Descriptor (or *undefined*) _ownDesc_, the following steps are taken:
+
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. If _ownDesc_ is *undefined*, then
+ 1. Let _parent_ be ? _O_.[[GetPrototypeOf]]().
+ 1. If _parent_ is not *null*, then
+ 1. Return ? _parent_.[[Set]](_P_, _V_, _Receiver_).
+ 1. Else,
+ 1. Set _ownDesc_ to the PropertyDescriptor{[[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: *true*}.
+ 1. If IsDataDescriptor(_ownDesc_) is *true*, then
+ 1. If _ownDesc_.[[Writable]] is *false*, return *false*.
+ 1. If Type(_Receiver_) is not Object, return *false*.
+ 1. Let _existingDescriptor_ be ? _Receiver_.[[GetOwnProperty]](_P_).
+ 1. If _existingDescriptor_ is not *undefined*, then
+ 1. If IsAccessorDescriptor(_existingDescriptor_) is *true*, return *false*.
+ 1. If _existingDescriptor_.[[Writable]] is *false*, return *false*.
+ 1. Let _valueDesc_ be the PropertyDescriptor{[[Value]]: _V_}.
+ 1. Return ? _Receiver_.[[DefineOwnProperty]](_P_, _valueDesc_).
+ 1. Else _Receiver_ does not currently have a property _P_,
+ 1. Return ? CreateDataProperty(_Receiver_, _P_, _V_).
+ 1. Assert: IsAccessorDescriptor(_ownDesc_) is *true*.
+ 1. Let _setter_ be _ownDesc_.[[Set]].
+ 1. If _setter_ is *undefined*, return *false*.
+ 1. Perform ? Call(_setter_, _Receiver_, « _V_ »).
+ 1. Return *true*.
+
+
+
+
+
+
+ [[Delete]] ( _P_ )
+ When the [[Delete]] internal method of _O_ is called with property key _P_, the following steps are taken:
+
+ 1. Return ? OrdinaryDelete(_O_, _P_).
+
+
+
+ OrdinaryDelete ( _O_, _P_ )
+ When the abstract operation OrdinaryDelete is called with Object _O_ and property key _P_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _desc_ be ? _O_.[[GetOwnProperty]](_P_).
+ 1. If _desc_ is *undefined*, return *true*.
+ 1. If _desc_.[[Configurable]] is *true*, then
+ 1. Remove the own property with name _P_ from _O_.
+ 1. Return *true*.
+ 1. Return *false*.
+
+
+
+
+
+
+ [[OwnPropertyKeys]] ( )
+ When the [[OwnPropertyKeys]] internal method of _O_ is called, the following steps are taken:
+
+ 1. Return ! OrdinaryOwnPropertyKeys(_O_).
+
+
+
+ OrdinaryOwnPropertyKeys ( _O_ )
+ When the abstract operation OrdinaryOwnPropertyKeys is called with Object _O_, the following steps are taken:
+
+
+ 1. Let _keys_ be a new empty List.
+ 1. For each own property key _P_ of _O_ that is an integer index, in ascending numeric index order, do
+ 1. Add _P_ as the last element of _keys_.
+ 1. For each own property key _P_ of _O_ that is a String but is not an integer index, in ascending chronological order of property creation, do
+ 1. Add _P_ as the last element of _keys_.
+ 1. For each own property key _P_ of _O_ that is a Symbol, in ascending chronological order of property creation, do
+ 1. Add _P_ as the last element of _keys_.
+ 1. Return _keys_.
+
+
+
+
+
+
+ ObjectCreate ( _proto_ [ , _internalSlotsList_ ] )
+ The abstract operation ObjectCreate with argument _proto_ (an object or null) is used to specify the runtime creation of new ordinary objects. The optional argument _internalSlotsList_ is a List of the names of additional internal slots that must be defined as part of the object. If the list is not provided, a new empty List is used. This abstract operation performs the following steps:
+
+ 1. If _internalSlotsList_ is not present, set _internalSlotsList_ to a new empty List.
+ 1. Let _obj_ be a newly created object with an internal slot for each name in _internalSlotsList_.
+ 1. Set _obj_'s essential internal methods to the default ordinary object definitions specified in .
+ 1. Set _obj_.[[Prototype]] to _proto_.
+ 1. Set _obj_.[[Extensible]] to *true*.
+ 1. Return _obj_.
+
+
+
+
+
+ OrdinaryCreateFromConstructor ( _constructor_, _intrinsicDefaultProto_ [ , _internalSlotsList_ ] )
+ The abstract operation OrdinaryCreateFromConstructor creates an ordinary object whose [[Prototype]] value is retrieved from a constructor's `prototype` property, if it exists. Otherwise the intrinsic named by _intrinsicDefaultProto_ is used for [[Prototype]]. The optional _internalSlotsList_ is a List of the names of additional internal slots that must be defined as part of the object. If the list is not provided, a new empty List is used. This abstract operation performs the following steps:
+
+ 1. Assert: _intrinsicDefaultProto_ is a String value that is this specification's name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the [[Prototype]] value of an object.
+ 1. Let _proto_ be ? GetPrototypeFromConstructor(_constructor_, _intrinsicDefaultProto_).
+ 1. Return ObjectCreate(_proto_, _internalSlotsList_).
+
+
+
+
+
+ GetPrototypeFromConstructor ( _constructor_, _intrinsicDefaultProto_ )
+ The abstract operation GetPrototypeFromConstructor determines the [[Prototype]] value that should be used to create an object corresponding to a specific constructor. The value is retrieved from the constructor's `prototype` property, if it exists. Otherwise the intrinsic named by _intrinsicDefaultProto_ is used for [[Prototype]]. This abstract operation performs the following steps:
+
+ 1. Assert: _intrinsicDefaultProto_ is a String value that is this specification's name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the [[Prototype]] value of an object.
+ 1. Assert: IsCallable(_constructor_) is *true*.
+ 1. Let _proto_ be ? Get(_constructor_, `"prototype"`).
+ 1. If Type(_proto_) is not Object, then
+ 1. Let _realm_ be ? GetFunctionRealm(_constructor_).
+ 1. Set _proto_ to _realm_'s intrinsic object named _intrinsicDefaultProto_.
+ 1. Return _proto_.
+
+
+ If _constructor_ does not supply a [[Prototype]] value, the default value that is used is obtained from the realm of the _constructor_ function rather than from the running execution context.
+
+
+
\ No newline at end of file
diff --git a/translated/issues-21.html b/translated/issues-21.html
new file mode 100644
index 0000000000..a9ad3f6c94
--- /dev/null
+++ b/translated/issues-21.html
@@ -0,0 +1,516 @@
+
+ ECMAScript Function Objects
+ ECMAScript function objects encapsulate parameterized ECMAScript code closed over a lexical environment and support the dynamic evaluation of that code. An ECMAScript function object is an ordinary object and has the same internal slots and the same internal methods as other ordinary objects. The code of an ECMAScript function object may be either strict mode code () or non-strict code. An ECMAScript function object whose code is strict mode code is called a strict function. One whose code is not strict mode code is called a non-strict function.
+ ECMAScript function objects have the additional internal slots listed in .
+
+
+
+
+
+ Internal Slot
+ |
+
+ Type
+ |
+
+ Description
+ |
+
+
+
+ [[Environment]]
+ |
+
+ Lexical Environment
+ |
+
+ The Lexical Environment that the function was closed over. Used as the outer environment when evaluating the code of the function.
+ |
+
+
+
+ [[FormalParameters]]
+ |
+
+ Parse Node
+ |
+
+ The root parse node of the source text that defines the function's formal parameter list.
+ |
+
+
+
+ [[FunctionKind]]
+ |
+
+ String
+ |
+
+ Either `"normal"`, `"classConstructor"`, `"generator"`, or `"async"`.
+ |
+
+
+
+ [[ECMAScriptCode]]
+ |
+
+ Parse Node
+ |
+
+ The root parse node of the source text that defines the function's body.
+ |
+
+
+
+ [[ConstructorKind]]
+ |
+
+ String
+ |
+
+ Either `"base"` or `"derived"`.
+ |
+
+
+
+ [[Realm]]
+ |
+
+ Realm Record
+ |
+
+ The realm in which the function was created and which provides any intrinsic objects that are accessed when evaluating the function.
+ |
+
+
+
+ [[ScriptOrModule]]
+ |
+
+ Script Record or Module Record
+ |
+
+ The script or module in which the function was created.
+ |
+
+
+
+ [[ThisMode]]
+ |
+
+ (lexical, strict, global)
+ |
+
+ Defines how `this` references are interpreted within the formal parameters and code body of the function. ~lexical~ means that `this` refers to the *this* value of a lexically enclosing function. ~strict~ means that the *this* value is used exactly as provided by an invocation of the function. ~global~ means that a *this* value of *undefined* is interpreted as a reference to the global object.
+ |
+
+
+
+ [[Strict]]
+ |
+
+ Boolean
+ |
+
+ *true* if this is a strict function, *false* if this is a non-strict function.
+ |
+
+
+
+ [[HomeObject]]
+ |
+
+ Object
+ |
+
+ If the function uses `super`, this is the object whose [[GetPrototypeOf]] provides the object where `super` property lookups begin.
+ |
+
+
+
+
+ All ECMAScript function objects have the [[Call]] internal method defined here. ECMAScript functions that are also constructors in addition have the [[Construct]] internal method.
+
+
+
+ [[Call]] ( _thisArgument_, _argumentsList_ )
+ The [[Call]] internal method for an ECMAScript function object _F_ is called with parameters _thisArgument_ and _argumentsList_, a List of ECMAScript language values. The following steps are taken:
+
+ 1. Assert: _F_ is an ECMAScript function object.
+ 1. If _F_.[[FunctionKind]] is `"classConstructor"`, throw a *TypeError* exception.
+ 1. Let _callerContext_ be the running execution context.
+ 1. Let _calleeContext_ be PrepareForOrdinaryCall(_F_, *undefined*).
+ 1. Assert: _calleeContext_ is now the running execution context.
+ 1. Perform OrdinaryCallBindThis(_F_, _calleeContext_, _thisArgument_).
+ 1. Let _result_ be OrdinaryCallEvaluateBody(_F_, _argumentsList_).
+ 1. Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context.
+ 1. If _result_.[[Type]] is ~return~, return NormalCompletion(_result_.[[Value]]).
+ 1. ReturnIfAbrupt(_result_).
+ 1. Return NormalCompletion(*undefined*).
+
+
+ When _calleeContext_ is removed from the execution context stack in step 8 it must not be destroyed if it is suspended and retained for later resumption by an accessible generator object.
+
+
+
+
+ PrepareForOrdinaryCall ( _F_, _newTarget_ )
+ When the abstract operation PrepareForOrdinaryCall is called with function object _F_ and ECMAScript language value _newTarget_, the following steps are taken:
+
+ 1. Assert: Type(_newTarget_) is Undefined or Object.
+ 1. Let _callerContext_ be the running execution context.
+ 1. Let _calleeContext_ be a new ECMAScript code execution context.
+ 1. Set the Function of _calleeContext_ to _F_.
+ 1. Let _calleeRealm_ be _F_.[[Realm]].
+ 1. Set the Realm of _calleeContext_ to _calleeRealm_.
+ 1. Set the ScriptOrModule of _calleeContext_ to _F_.[[ScriptOrModule]].
+ 1. Let _localEnv_ be NewFunctionEnvironment(_F_, _newTarget_).
+ 1. Set the LexicalEnvironment of _calleeContext_ to _localEnv_.
+ 1. Set the VariableEnvironment of _calleeContext_ to _localEnv_.
+ 1. If _callerContext_ is not already suspended, suspend _callerContext_.
+ 1. Push _calleeContext_ onto the execution context stack; _calleeContext_ is now the running execution context.
+ 1. NOTE: Any exception objects produced after this point are associated with _calleeRealm_.
+ 1. Return _calleeContext_.
+
+
+
+
+
+ OrdinaryCallBindThis ( _F_, _calleeContext_, _thisArgument_ )
+ When the abstract operation OrdinaryCallBindThis is called with function object _F_, execution context _calleeContext_, and ECMAScript value _thisArgument_, the following steps are taken:
+
+ 1. Let _thisMode_ be _F_.[[ThisMode]].
+ 1. If _thisMode_ is ~lexical~, return NormalCompletion(*undefined*).
+ 1. Let _calleeRealm_ be _F_.[[Realm]].
+ 1. Let _localEnv_ be the LexicalEnvironment of _calleeContext_.
+ 1. If _thisMode_ is ~strict~, let _thisValue_ be _thisArgument_.
+ 1. Else,
+ 1. If _thisArgument_ is *undefined* or *null*, then
+ 1. Let _globalEnv_ be _calleeRealm_.[[GlobalEnv]].
+ 1. Let _globalEnvRec_ be _globalEnv_'s EnvironmentRecord.
+ 1. Assert: _globalEnvRec_ is a global Environment Record.
+ 1. Let _thisValue_ be _globalEnvRec_.[[GlobalThisValue]].
+ 1. Else,
+ 1. Let _thisValue_ be ! ToObject(_thisArgument_).
+ 1. NOTE: ToObject produces wrapper objects using _calleeRealm_.
+ 1. Let _envRec_ be _localEnv_'s EnvironmentRecord.
+ 1. Assert: _envRec_ is a function Environment Record.
+ 1. Assert: The next step never returns an abrupt completion because _envRec_.[[ThisBindingStatus]] is not `"initialized"`.
+ 1. Return _envRec_.BindThisValue(_thisValue_).
+
+
+
+
+
+ OrdinaryCallEvaluateBody ( _F_, _argumentsList_ )
+ When the abstract operation OrdinaryCallEvaluateBody is called with function object _F_ and List _argumentsList_, the following steps are taken:
+
+ 1. Return the result of EvaluateBody of the parsed code that is _F_.[[ECMAScriptCode]] passing _F_ and _argumentsList_ as the arguments.
+
+
+
+
+
+
+ [[Construct]] ( _argumentsList_, _newTarget_ )
+ The [[Construct]] internal method for an ECMAScript function object _F_ is called with parameters _argumentsList_ and _newTarget_. _argumentsList_ is a possibly empty List of ECMAScript language values. The following steps are taken:
+
+ 1. Assert: _F_ is an ECMAScript function object.
+ 1. Assert: Type(_newTarget_) is Object.
+ 1. Let _callerContext_ be the running execution context.
+ 1. Let _kind_ be _F_.[[ConstructorKind]].
+ 1. If _kind_ is `"base"`, then
+ 1. Let _thisArgument_ be ? OrdinaryCreateFromConstructor(_newTarget_, `"%ObjectPrototype%"`).
+ 1. Let _calleeContext_ be PrepareForOrdinaryCall(_F_, _newTarget_).
+ 1. Assert: _calleeContext_ is now the running execution context.
+ 1. If _kind_ is `"base"`, perform OrdinaryCallBindThis(_F_, _calleeContext_, _thisArgument_).
+ 1. Let _constructorEnv_ be the LexicalEnvironment of _calleeContext_.
+ 1. Let _envRec_ be _constructorEnv_'s EnvironmentRecord.
+ 1. Let _result_ be OrdinaryCallEvaluateBody(_F_, _argumentsList_).
+ 1. Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context.
+ 1. If _result_.[[Type]] is ~return~, then
+ 1. If Type(_result_.[[Value]]) is Object, return NormalCompletion(_result_.[[Value]]).
+ 1. If _kind_ is `"base"`, return NormalCompletion(_thisArgument_).
+ 1. If _result_.[[Value]] is not *undefined*, throw a *TypeError* exception.
+ 1. Else, ReturnIfAbrupt(_result_).
+ 1. Return ? _envRec_.GetThisBinding().
+
+
+
+
+
+ FunctionAllocate ( _functionPrototype_, _strict_, _functionKind_ )
+ The abstract operation FunctionAllocate requires the three arguments _functionPrototype_, _strict_ and _functionKind_. FunctionAllocate performs the following steps:
+
+ 1. Assert: Type(_functionPrototype_) is Object.
+ 1. Assert: _functionKind_ is either `"normal"`, `"non-constructor"`, `"generator"`, or `"async"`.
+ 1. If _functionKind_ is `"normal"`, let _needsConstruct_ be *true*.
+ 1. Else, let _needsConstruct_ be *false*.
+ 1. If _functionKind_ is `"non-constructor"`, set _functionKind_ to `"normal"`.
+ 1. Let _F_ be a newly created ECMAScript function object with the internal slots listed in . All of those internal slots are initialized to *undefined*.
+ 1. Set _F_'s essential internal methods to the default ordinary object definitions specified in .
+ 1. Set _F_.[[Call]] to the definition specified in .
+ 1. If _needsConstruct_ is *true*, then
+ 1. Set _F_.[[Construct]] to the definition specified in .
+ 1. Set _F_.[[ConstructorKind]] to `"base"`.
+ 1. Set _F_.[[Strict]] to _strict_.
+ 1. Set _F_.[[FunctionKind]] to _functionKind_.
+ 1. Set _F_.[[Prototype]] to _functionPrototype_.
+ 1. Set _F_.[[Extensible]] to *true*.
+ 1. Set _F_.[[Realm]] to the current Realm Record.
+ 1. Return _F_.
+
+
+
+
+
+ FunctionInitialize ( _F_, _kind_, _ParameterList_, _Body_, _Scope_ )
+ The abstract operation FunctionInitialize requires the arguments: a function object _F_, _kind_ which is one of (Normal, Method, Arrow), a parameter list Parse Node specified by _ParameterList_, a body Parse Node specified by _Body_, a Lexical Environment specified by _Scope_. FunctionInitialize performs the following steps:
+
+ 1. Assert: _F_ is an extensible object that does not have a `length` own property.
+ 1. Let _len_ be the ExpectedArgumentCount of _ParameterList_.
+ 1. Perform ! DefinePropertyOrThrow(_F_, `"length"`, PropertyDescriptor{[[Value]]: _len_, [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true*}).
+ 1. Let _Strict_ be _F_.[[Strict]].
+ 1. Set _F_.[[Environment]] to _Scope_.
+ 1. Set _F_.[[FormalParameters]] to _ParameterList_.
+ 1. Set _F_.[[ECMAScriptCode]] to _Body_.
+ 1. Set _F_.[[ScriptOrModule]] to GetActiveScriptOrModule().
+ 1. If _kind_ is ~Arrow~, set _F_.[[ThisMode]] to ~lexical~.
+ 1. Else if _Strict_ is *true*, set _F_.[[ThisMode]] to ~strict~.
+ 1. Else, set _F_.[[ThisMode]] to ~global~.
+ 1. Return _F_.
+
+
+
+
+
+ FunctionCreate ( _kind_, _ParameterList_, _Body_, _Scope_, _Strict_ [ , _prototype_ ] )
+ The abstract operation FunctionCreate requires the arguments: _kind_ which is one of (Normal, Method, Arrow), a parameter list Parse Node specified by _ParameterList_, a body Parse Node specified by _Body_, a Lexical Environment specified by _Scope_, a Boolean flag _Strict_, and optionally, an object _prototype_. FunctionCreate performs the following steps:
+
+ 1. If _prototype_ is not present, then
+ 1. Set _prototype_ to the intrinsic object %FunctionPrototype%.
+ 1. If _kind_ is not ~Normal~, let _allocKind_ be `"non-constructor"`.
+ 1. Else, let _allocKind_ be `"normal"`.
+ 1. Let _F_ be FunctionAllocate(_prototype_, _Strict_, _allocKind_).
+ 1. Return FunctionInitialize(_F_, _kind_, _ParameterList_, _Body_, _Scope_).
+
+
+
+
+
+ GeneratorFunctionCreate ( _kind_, _ParameterList_, _Body_, _Scope_, _Strict_ )
+ The abstract operation GeneratorFunctionCreate requires the arguments: _kind_ which is one of (Normal, Method), a parameter list Parse Node specified by _ParameterList_, a body Parse Node specified by _Body_, a Lexical Environment specified by _Scope_, and a Boolean flag _Strict_. GeneratorFunctionCreate performs the following steps:
+
+ 1. Let _functionPrototype_ be the intrinsic object %Generator%.
+ 1. Let _F_ be FunctionAllocate(_functionPrototype_, _Strict_, `"generator"`).
+ 1. Return FunctionInitialize(_F_, _kind_, _ParameterList_, _Body_, _Scope_).
+
+
+
+
+
+ AddRestrictedFunctionProperties ( _F_, _realm_ )
+ The abstract operation AddRestrictedFunctionProperties is called with a function object _F_ and Realm Record _realm_ as its argument. It performs the following steps:
+
+ 1. Assert: _realm_.[[Intrinsics]].[[%ThrowTypeError%]] exists and has been initialized.
+ 1. Let _thrower_ be _realm_.[[Intrinsics]].[[%ThrowTypeError%]].
+ 1. Perform ! DefinePropertyOrThrow(_F_, `"caller"`, PropertyDescriptor {[[Get]]: _thrower_, [[Set]]: _thrower_, [[Enumerable]]: *false*, [[Configurable]]: *true*}).
+ 1. Return ! DefinePropertyOrThrow(_F_, `"arguments"`, PropertyDescriptor {[[Get]]: _thrower_, [[Set]]: _thrower_, [[Enumerable]]: *false*, [[Configurable]]: *true*}).
+
+
+
+
+ %ThrowTypeError% ( )
+ The %ThrowTypeError% intrinsic is an anonymous built-in function object that is defined once for each realm. When %ThrowTypeError% is called it performs the following steps:
+
+ 1. Throw a *TypeError* exception.
+
+ The value of the [[Extensible]] internal slot of a %ThrowTypeError% function is *false*.
+ The `length` property of a %ThrowTypeError% function has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.
+
+
+
+
+
+ MakeConstructor ( _F_ [ , _writablePrototype_ [ , _prototype_ ] ] )
+ The abstract operation MakeConstructor requires a Function argument _F_ and optionally, a Boolean _writablePrototype_ and an object _prototype_. If _prototype_ is provided it is assumed to already contain, if needed, a `"constructor"` property whose value is _F_. This operation converts _F_ into a constructor by performing the following steps:
+
+ 1. Assert: _F_ is an ECMAScript function object.
+ 1. Assert: IsConstructor(_F_) is *true*.
+ 1. Assert: _F_ is an extensible object that does not have a `prototype` own property.
+ 1. If _writablePrototype_ is not present, set _writablePrototype_ to *true*.
+ 1. If _prototype_ is not present, then
+ 1. Set _prototype_ to ObjectCreate(%ObjectPrototype%).
+ 1. Perform ! DefinePropertyOrThrow(_prototype_, `"constructor"`, PropertyDescriptor{[[Value]]: _F_, [[Writable]]: _writablePrototype_, [[Enumerable]]: *false*, [[Configurable]]: *true* }).
+ 1. Perform ! DefinePropertyOrThrow(_F_, `"prototype"`, PropertyDescriptor{[[Value]]: _prototype_, [[Writable]]: _writablePrototype_, [[Enumerable]]: *false*, [[Configurable]]: *false*}).
+ 1. Return NormalCompletion(*undefined*).
+
+
+
+
+
+ MakeClassConstructor ( _F_ )
+ The abstract operation MakeClassConstructor with argument _F_ performs the following steps:
+
+ 1. Assert: _F_ is an ECMAScript function object.
+ 1. Assert: _F_.[[FunctionKind]] is `"normal"`.
+ 1. Set _F_.[[FunctionKind]] to `"classConstructor"`.
+ 1. Return NormalCompletion(*undefined*).
+
+
+
+
+
+ MakeMethod ( _F_, _homeObject_ )
+ The abstract operation MakeMethod with arguments _F_ and _homeObject_ configures _F_ as a method by performing the following steps:
+
+ 1. Assert: _F_ is an ECMAScript function object.
+ 1. Assert: Type(_homeObject_) is Object.
+ 1. Set _F_.[[HomeObject]] to _homeObject_.
+ 1. Return NormalCompletion(*undefined*).
+
+
+
+
+
+ SetFunctionName ( _F_, _name_ [ , _prefix_ ] )
+ The abstract operation SetFunctionName requires a Function argument _F_, a String or Symbol argument _name_ and optionally a String argument _prefix_. This operation adds a `name` property to _F_ by performing the following steps:
+
+ 1. Assert: _F_ is an extensible object that does not have a `name` own property.
+ 1. Assert: Type(_name_) is either Symbol or String.
+ 1. Assert: If _prefix_ is present, then Type(_prefix_) is String.
+ 1. If Type(_name_) is Symbol, then
+ 1. Let _description_ be _name_'s [[Description]] value.
+ 1. If _description_ is *undefined*, set _name_ to the empty String.
+ 1. Else, set _name_ to the string-concatenation of `"["`, _description_, and `"]"`.
+ 1. If _prefix_ is present, then
+ 1. Set _name_ to the string-concatenation of _prefix_, the code unit 0x0020 (SPACE), and _name_.
+ 1. Return ! DefinePropertyOrThrow(_F_, `"name"`, PropertyDescriptor{[[Value]]: _name_, [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true*}).
+
+
+
+
+
+ FunctionDeclarationInstantiation ( _func_, _argumentsList_ )
+
+ When an execution context is established for evaluating an ECMAScript function a new function Environment Record is created and bindings for each formal parameter are instantiated in that Environment Record. Each declaration in the function body is also instantiated. If the function's formal parameters do not include any default value initializers then the body declarations are instantiated in the same Environment Record as the parameters. If default value parameter initializers exist, a second Environment Record is created for the body declarations. Formal parameters and functions are initialized as part of FunctionDeclarationInstantiation. All other bindings are initialized during evaluation of the function body.
+
+ FunctionDeclarationInstantiation is performed as follows using arguments _func_ and _argumentsList_. _func_ is the function object for which the execution context is being established.
+
+
+ 1. Let _calleeContext_ be the running execution context.
+ 1. Let _env_ be the LexicalEnvironment of _calleeContext_.
+ 1. Let _envRec_ be _env_'s EnvironmentRecord.
+ 1. Let _code_ be _func_.[[ECMAScriptCode]].
+ 1. Let _strict_ be _func_.[[Strict]].
+ 1. Let _formals_ be _func_.[[FormalParameters]].
+ 1. Let _parameterNames_ be the BoundNames of _formals_.
+ 1. If _parameterNames_ has any duplicate entries, let _hasDuplicates_ be *true*. Otherwise, let _hasDuplicates_ be *false*.
+ 1. Let _simpleParameterList_ be IsSimpleParameterList of _formals_.
+ 1. Let _hasParameterExpressions_ be ContainsExpression of _formals_.
+ 1. Let _varNames_ be the VarDeclaredNames of _code_.
+ 1. Let _varDeclarations_ be the VarScopedDeclarations of _code_.
+ 1. Let _lexicalNames_ be the LexicallyDeclaredNames of _code_.
+ 1. Let _functionNames_ be a new empty List.
+ 1. Let _functionsToInitialize_ be a new empty List.
+ 1. For each _d_ in _varDeclarations_, in reverse list order, do
+ 1. If _d_ is neither a |VariableDeclaration| nor a |ForBinding| nor a |BindingIdentifier|, then
+ 1. Assert: _d_ is either a |FunctionDeclaration|, a |GeneratorDeclaration|, or an |AsyncFunctionDeclaration|.
+ 1. Let _fn_ be the sole element of the BoundNames of _d_.
+ 1. If _fn_ is not an element of _functionNames_, then
+ 1. Insert _fn_ as the first element of _functionNames_.
+ 1. NOTE: If there are multiple function declarations for the same name, the last declaration is used.
+ 1. Insert _d_ as the first element of _functionsToInitialize_.
+ 1. Let _argumentsObjectNeeded_ be *true*.
+ 1. If _func_.[[ThisMode]] is ~lexical~, then
+ 1. NOTE: Arrow functions never have an arguments objects.
+ 1. Set _argumentsObjectNeeded_ to *false*.
+ 1. Else if `"arguments"` is an element of _parameterNames_, then
+ 1. Set _argumentsObjectNeeded_ to *false*.
+ 1. Else if _hasParameterExpressions_ is *false*, then
+ 1. If `"arguments"` is an element of _functionNames_ or if `"arguments"` is an element of _lexicalNames_, then
+ 1. Set _argumentsObjectNeeded_ to *false*.
+ 1. For each String _paramName_ in _parameterNames_, do
+ 1. Let _alreadyDeclared_ be _envRec_.HasBinding(_paramName_).
+ 1. NOTE: Early errors ensure that duplicate parameter names can only occur in non-strict functions that do not have parameter default values or rest parameters.
+ 1. If _alreadyDeclared_ is *false*, then
+ 1. Perform ! _envRec_.CreateMutableBinding(_paramName_, *false*).
+ 1. If _hasDuplicates_ is *true*, then
+ 1. Perform ! _envRec_.InitializeBinding(_paramName_, *undefined*).
+ 1. If _argumentsObjectNeeded_ is *true*, then
+ 1. If _strict_ is *true* or if _simpleParameterList_ is *false*, then
+ 1. Let _ao_ be CreateUnmappedArgumentsObject(_argumentsList_).
+ 1. Else,
+ 1. NOTE: mapped argument object is only provided for non-strict functions that don't have a rest parameter, any parameter default value initializers, or any destructured parameters.
+ 1. Let _ao_ be CreateMappedArgumentsObject(_func_, _formals_, _argumentsList_, _envRec_).
+ 1. If _strict_ is *true*, then
+ 1. Perform ! _envRec_.CreateImmutableBinding(`"arguments"`, *false*).
+ 1. Else,
+ 1. Perform ! _envRec_.CreateMutableBinding(`"arguments"`, *false*).
+ 1. Call _envRec_.InitializeBinding(`"arguments"`, _ao_).
+ 1. Let _parameterBindings_ be a new List of _parameterNames_ with `"arguments"` appended.
+ 1. Else,
+ 1. Let _parameterBindings_ be _parameterNames_.
+ 1. Let _iteratorRecord_ be CreateListIteratorRecord(_argumentsList_).
+ 1. If _hasDuplicates_ is *true*, then
+ 1. Perform ? IteratorBindingInitialization for _formals_ with _iteratorRecord_ and *undefined* as arguments.
+ 1. Else,
+ 1. Perform ? IteratorBindingInitialization for _formals_ with _iteratorRecord_ and _env_ as arguments.
+ 1. If _hasParameterExpressions_ is *false*, then
+ 1. NOTE: Only a single lexical environment is needed for the parameters and top-level vars.
+ 1. Let _instantiatedVarNames_ be a copy of the List _parameterBindings_.
+ 1. For each _n_ in _varNames_, do
+ 1. If _n_ is not an element of _instantiatedVarNames_, then
+ 1. Append _n_ to _instantiatedVarNames_.
+ 1. Perform ! _envRec_.CreateMutableBinding(_n_, *false*).
+ 1. Call _envRec_.InitializeBinding(_n_, *undefined*).
+ 1. Let _varEnv_ be _env_.
+ 1. Let _varEnvRec_ be _envRec_.
+ 1. Else,
+ 1. NOTE: A separate Environment Record is needed to ensure that closures created by expressions in the formal parameter list do not have visibility of declarations in the function body.
+ 1. Let _varEnv_ be NewDeclarativeEnvironment(_env_).
+ 1. Let _varEnvRec_ be _varEnv_'s EnvironmentRecord.
+ 1. Set the VariableEnvironment of _calleeContext_ to _varEnv_.
+ 1. Let _instantiatedVarNames_ be a new empty List.
+ 1. For each _n_ in _varNames_, do
+ 1. If _n_ is not an element of _instantiatedVarNames_, then
+ 1. Append _n_ to _instantiatedVarNames_.
+ 1. Perform ! _varEnvRec_.CreateMutableBinding(_n_, *false*).
+ 1. If _n_ is not an element of _parameterBindings_ or if _n_ is an element of _functionNames_, let _initialValue_ be *undefined*.
+ 1. Else,
+ 1. Let _initialValue_ be ! _envRec_.GetBindingValue(_n_, *false*).
+ 1. Call _varEnvRec_.InitializeBinding(_n_, _initialValue_).
+ 1. NOTE: vars whose names are the same as a formal parameter, initially have the same value as the corresponding initialized parameter.
+ 1. NOTE: Annex adds additional steps at this point.
+ 1. If _strict_ is *false*, then
+ 1. Let _lexEnv_ be NewDeclarativeEnvironment(_varEnv_).
+ 1. NOTE: Non-strict functions use a separate lexical Environment Record for top-level lexical declarations so that a direct eval can determine whether any var scoped declarations introduced by the eval code conflict with pre-existing top-level lexically scoped declarations. This is not needed for strict functions because a strict direct eval always places all declarations into a new Environment Record.
+ 1. Else, let _lexEnv_ be _varEnv_.
+ 1. Let _lexEnvRec_ be _lexEnv_'s EnvironmentRecord.
+ 1. Set the LexicalEnvironment of _calleeContext_ to _lexEnv_.
+ 1. Let _lexDeclarations_ be the LexicallyScopedDeclarations of _code_.
+ 1. For each element _d_ in _lexDeclarations_, do
+ 1. NOTE: A lexically declared name cannot be the same as a function/generator declaration, formal parameter, or a var name. Lexically declared names are only instantiated here but not initialized.
+ 1. For each element _dn_ of the BoundNames of _d_, do
+ 1. If IsConstantDeclaration of _d_ is *true*, then
+ 1. Perform ! _lexEnvRec_.CreateImmutableBinding(_dn_, *true*).
+ 1. Else,
+ 1. Perform ! _lexEnvRec_.CreateMutableBinding(_dn_, *false*).
+ 1. For each Parse Node _f_ in _functionsToInitialize_, do
+ 1. Let _fn_ be the sole element of the BoundNames of _f_.
+ 1. Let _fo_ be the result of performing InstantiateFunctionObject for _f_ with argument _lexEnv_.
+ 1. Perform ! _varEnvRec_.SetMutableBinding(_fn_, _fo_, *false*).
+ 1. Return NormalCompletion(~empty~).
+
+
+ provides an extension to the above algorithm that is necessary for backwards compatibility with web browser implementations of ECMAScript that predate ECMAScript 2015.
+
+
+ Parameter |Initializer|s may contain direct eval expressions. Any top level declarations of such evals are only visible to the eval code (). The creation of the environment for such declarations is described in .
+
+
+
\ No newline at end of file
diff --git a/translated/issues-22.html b/translated/issues-22.html
new file mode 100644
index 0000000000..3dfd149602
--- /dev/null
+++ b/translated/issues-22.html
@@ -0,0 +1,59 @@
+
+ Built-in Function Objects
+ The built-in function objects defined in this specification may be implemented as either ECMAScript function objects () whose behaviour is provided using ECMAScript code or as implementation provided function exotic objects whose behaviour is provided in some other manner. In either case, the effect of calling such functions must conform to their specifications. An implementation may also provide additional built-in function objects that are not defined in this specification.
+ If a built-in function object is implemented as an exotic object it must have the ordinary object behaviour specified in . All such function exotic objects also have [[Prototype]], [[Extensible]], [[Realm]], and [[ScriptOrModule]] internal slots.
+ Unless otherwise specified every built-in function object has the %FunctionPrototype% object as the initial value of its [[Prototype]] internal slot.
+ The behaviour specified for each built-in function via algorithm steps or other means is the specification of the function body behaviour for both [[Call]] and [[Construct]] invocations of the function. However, [[Construct]] invocation is not supported by all built-in functions. For each built-in function, when invoked with [[Call]], the [[Call]] _thisArgument_ provides the *this* value, the [[Call]] _argumentsList_ provides the named parameters, and the NewTarget value is *undefined*. When invoked with [[Construct]], the *this* value is uninitialized, the [[Construct]] _argumentsList_ provides the named parameters, and the [[Construct]] _newTarget_ parameter provides the NewTarget value. If the built-in function is implemented as an ECMAScript function object then this specified behaviour must be implemented by the ECMAScript code that is the body of the function. Built-in functions that are ECMAScript function objects must be strict functions. If a built-in constructor has any [[Call]] behaviour other than throwing a *TypeError* exception, an ECMAScript implementation of the function must be done in a manner that does not cause the function's [[FunctionKind]] internal slot to have the value `"classConstructor"`.
+ Built-in function objects that are not identified as constructors do not implement the [[Construct]] internal method unless otherwise specified in the description of a particular function. When a built-in constructor is called as part of a `new` expression the _argumentsList_ parameter of the invoked [[Construct]] internal method provides the values for the built-in constructor's named parameters.
+ Built-in functions that are not constructors do not have a `prototype` property unless otherwise specified in the description of a particular function.
+ If a built-in function object is not implemented as an ECMAScript function it must provide [[Call]] and [[Construct]] internal methods that conform to the following definitions:
+
+
+
+ [[Call]] ( _thisArgument_, _argumentsList_ )
+ The [[Call]] internal method for a built-in function object _F_ is called with parameters _thisArgument_ and _argumentsList_, a List of ECMAScript language values. The following steps are taken:
+
+ 1. Let _callerContext_ be the running execution context.
+ 1. If _callerContext_ is not already suspended, suspend _callerContext_.
+ 1. Let _calleeContext_ be a new ECMAScript code execution context.
+ 1. Set the Function of _calleeContext_ to _F_.
+ 1. Let _calleeRealm_ be _F_.[[Realm]].
+ 1. Set the Realm of _calleeContext_ to _calleeRealm_.
+ 1. Set the ScriptOrModule of _calleeContext_ to _F_.[[ScriptOrModule]].
+ 1. Perform any necessary implementation-defined initialization of _calleeContext_.
+ 1. Push _calleeContext_ onto the execution context stack; _calleeContext_ is now the running execution context.
+ 1. Let _result_ be the Completion Record that is the result of evaluating _F_ in an implementation-defined manner that conforms to the specification of _F_. _thisArgument_ is the *this* value, _argumentsList_ provides the named parameters, and the NewTarget value is *undefined*.
+ 1. Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context.
+ 1. Return _result_.
+
+
+ When _calleeContext_ is removed from the execution context stack it must not be destroyed if it has been suspended and retained by an accessible generator object for later resumption.
+
+
+
+
+
+ [[Construct]] ( _argumentsList_, _newTarget_ )
+ The [[Construct]] internal method for built-in function object _F_ is called with parameters _argumentsList_ and _newTarget_. The steps performed are the same as [[Call]] (see ) except that step 10 is replaced by:
+
+ 10. Let _result_ be the Completion Record that is the result of evaluating _F_ in an implementation-defined manner that conforms to the specification of _F_. The *this* value is uninitialized, _argumentsList_ provides the named parameters, and _newTarget_ provides the NewTarget value.
+
+
+
+
+
+ CreateBuiltinFunction ( _realm_, _steps_, _prototype_ [ , _internalSlotsList_ ] )
+ The abstract operation CreateBuiltinFunction takes arguments _realm_, _steps_, and _prototype_. The optional argument _internalSlotsList_ is a List of the names of additional internal slots that must be defined as part of the object. If the list is not provided, a new empty List is used. CreateBuiltinFunction returns a built-in function object created by the following steps:
+
+ 1. Assert: _realm_ is a Realm Record.
+ 1. Assert: _steps_ is either a set of algorithm steps or other definition of a function's behaviour provided in this specification.
+ 1. Let _func_ be a new built-in function object that when called performs the action described by _steps_. The new function object has internal slots whose names are the elements of _internalSlotsList_. The initial value of each of those internal slots is *undefined*.
+ 1. Set _func_.[[Realm]] to _realm_.
+ 1. Set _func_.[[Prototype]] to _prototype_.
+ 1. Set _func_.[[Extensible]] to *true*.
+ 1. Set _func_.[[ScriptOrModule]] to *null*.
+ 1. Return _func_.
+
+ Each built-in function defined in this specification is created as if by calling the CreateBuiltinFunction abstract operation, unless otherwise specified.
+
+
\ No newline at end of file
diff --git a/translated/issues-23.html b/translated/issues-23.html
new file mode 100644
index 0000000000..43a912fb0d
--- /dev/null
+++ b/translated/issues-23.html
@@ -0,0 +1,956 @@
+
+ Built-in Exotic Object Internal Methods and Slots
+ This specification defines several kinds of built-in exotic objects. These objects generally behave similar to ordinary objects except for a few specific situations. The following exotic objects use the ordinary object internal methods except where it is explicitly specified otherwise below:
+
+
+
+ Bound Function Exotic Objects
+ A bound function is an exotic object that wraps another function object. A bound function is callable (it has a [[Call]] internal method and may have a [[Construct]] internal method). Calling a bound function generally results in a call of its wrapped function.
+ Bound function objects do not have the internal slots of ECMAScript function objects defined in . Instead they have the internal slots defined in .
+
+
+
+
+
+ Internal Slot
+ |
+
+ Type
+ |
+
+ Description
+ |
+
+
+
+ [[BoundTargetFunction]]
+ |
+
+ Callable Object
+ |
+
+ The wrapped function object.
+ |
+
+
+
+ [[BoundThis]]
+ |
+
+ Any
+ |
+
+ The value that is always passed as the *this* value when calling the wrapped function.
+ |
+
+
+
+ [[BoundArguments]]
+ |
+
+ List of Any
+ |
+
+ A list of values whose elements are used as the first arguments to any call to the wrapped function.
+ |
+
+
+
+
+ Bound function objects provide all of the essential internal methods as specified in . However, they use the following definitions for the essential internal methods of function objects.
+
+
+
+ [[Call]] ( _thisArgument_, _argumentsList_ )
+ When the [[Call]] internal method of a bound function exotic object, _F_, which was created using the bind function is called with parameters _thisArgument_ and _argumentsList_, a List of ECMAScript language values, the following steps are taken:
+
+ 1. Let _target_ be _F_.[[BoundTargetFunction]].
+ 1. Let _boundThis_ be _F_.[[BoundThis]].
+ 1. Let _boundArgs_ be _F_.[[BoundArguments]].
+ 1. Let _args_ be a new list containing the same values as the list _boundArgs_ in the same order followed by the same values as the list _argumentsList_ in the same order.
+ 1. Return ? Call(_target_, _boundThis_, _args_).
+
+
+
+
+
+ [[Construct]] ( _argumentsList_, _newTarget_ )
+ When the [[Construct]] internal method of a bound function exotic object, _F_ that was created using the bind function is called with a list of arguments _argumentsList_ and _newTarget_, the following steps are taken:
+
+ 1. Let _target_ be _F_.[[BoundTargetFunction]].
+ 1. Assert: IsConstructor(_target_) is *true*.
+ 1. Let _boundArgs_ be _F_.[[BoundArguments]].
+ 1. Let _args_ be a new list containing the same values as the list _boundArgs_ in the same order followed by the same values as the list _argumentsList_ in the same order.
+ 1. If SameValue(_F_, _newTarget_) is *true*, set _newTarget_ to _target_.
+ 1. Return ? Construct(_target_, _args_, _newTarget_).
+
+
+
+
+
+ BoundFunctionCreate ( _targetFunction_, _boundThis_, _boundArgs_ )
+ The abstract operation BoundFunctionCreate with arguments _targetFunction_, _boundThis_ and _boundArgs_ is used to specify the creation of new Bound Function exotic objects. It performs the following steps:
+
+ 1. Assert: Type(_targetFunction_) is Object.
+ 1. Let _proto_ be ? _targetFunction_.[[GetPrototypeOf]]().
+ 1. Let _obj_ be a newly created object.
+ 1. Set _obj_'s essential internal methods to the default ordinary object definitions specified in .
+ 1. Set _obj_.[[Call]] as described in .
+ 1. If IsConstructor(_targetFunction_) is *true*, then
+ 1. Set _obj_.[[Construct]] as described in .
+ 1. Set _obj_.[[Prototype]] to _proto_.
+ 1. Set _obj_.[[Extensible]] to *true*.
+ 1. Set _obj_.[[BoundTargetFunction]] to _targetFunction_.
+ 1. Set _obj_.[[BoundThis]] to _boundThis_.
+ 1. Set _obj_.[[BoundArguments]] to _boundArgs_.
+ 1. Return _obj_.
+
+
+
+
+
+
+ Array Exotic Objects
+ An Array object is an exotic object that gives special treatment to array index property keys (see ). A property whose property name is an array index is also called an element. Every Array object has a `length` property whose value is always a nonnegative integer less than 232. The value of the `length` property is numerically greater than the name of every own property whose name is an array index; whenever an own property of an Array object is created or changed, other properties are adjusted as necessary to maintain this invariant. Specifically, whenever an own property is added whose name is an array index, the value of the `length` property is changed, if necessary, to be one more than the numeric value of that array index; and whenever the value of the `length` property is changed, every own property whose name is an array index whose value is not smaller than the new length is deleted. This constraint applies only to own properties of an Array object and is unaffected by `length` or array index properties that may be inherited from its prototypes.
+
+ A String property name _P_ is an array index if and only if ToString(ToUint32(_P_)) is equal to _P_ and ToUint32(_P_) is not equal to 232-1.
+
+ Array exotic objects always have a non-configurable property named `"length"`.
+ Array exotic objects provide an alternative definition for the [[DefineOwnProperty]] internal method. Except for that internal method, Array exotic objects provide all of the other essential internal methods as specified in .
+
+
+
+ [[DefineOwnProperty]] ( _P_, _Desc_ )
+ When the [[DefineOwnProperty]] internal method of an Array exotic object _A_ is called with property key _P_, and Property Descriptor _Desc_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. If _P_ is `"length"`, then
+ 1. Return ? ArraySetLength(_A_, _Desc_).
+ 1. Else if _P_ is an array index, then
+ 1. Let _oldLenDesc_ be OrdinaryGetOwnProperty(_A_, `"length"`).
+ 1. Assert: _oldLenDesc_ will never be *undefined* or an accessor descriptor because Array objects are created with a length data property that cannot be deleted or reconfigured.
+ 1. Let _oldLen_ be _oldLenDesc_.[[Value]].
+ 1. Let _index_ be ! ToUint32(_P_).
+ 1. If _index_ ≥ _oldLen_ and _oldLenDesc_.[[Writable]] is *false*, return *false*.
+ 1. Let _succeeded_ be ! OrdinaryDefineOwnProperty(_A_, _P_, _Desc_).
+ 1. If _succeeded_ is *false*, return *false*.
+ 1. If _index_ ≥ _oldLen_, then
+ 1. Set _oldLenDesc_.[[Value]] to _index_ + 1.
+ 1. Let _succeeded_ be OrdinaryDefineOwnProperty(_A_, `"length"`, _oldLenDesc_).
+ 1. Assert: _succeeded_ is *true*.
+ 1. Return *true*.
+ 1. Return OrdinaryDefineOwnProperty(_A_, _P_, _Desc_).
+
+
+
+
+
+ ArrayCreate ( _length_ [ , _proto_ ] )
+ The abstract operation ArrayCreate with argument _length_ (either 0 or a positive integer) and optional argument _proto_ is used to specify the creation of new Array exotic objects. It performs the following steps:
+
+ 1. Assert: _length_ is an integer Number ≥ 0.
+ 1. If _length_ is *-0*, set _length_ to *+0*.
+ 1. If _length_>232-1, throw a *RangeError* exception.
+ 1. If _proto_ is not present, set _proto_ to the intrinsic object %ArrayPrototype%.
+ 1. Let _A_ be a newly created Array exotic object.
+ 1. Set _A_'s essential internal methods except for [[DefineOwnProperty]] to the default ordinary object definitions specified in .
+ 1. Set _A_.[[DefineOwnProperty]] as specified in .
+ 1. Set _A_.[[Prototype]] to _proto_.
+ 1. Set _A_.[[Extensible]] to *true*.
+ 1. Perform ! OrdinaryDefineOwnProperty(_A_, `"length"`, PropertyDescriptor{[[Value]]: _length_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false*}).
+ 1. Return _A_.
+
+
+
+
+
+ ArraySpeciesCreate ( _originalArray_, _length_ )
+ The abstract operation ArraySpeciesCreate with arguments _originalArray_ and _length_ is used to specify the creation of a new Array object using a constructor function that is derived from _originalArray_. It performs the following steps:
+
+ 1. Assert: _length_ is an integer Number ≥ 0.
+ 1. If _length_ is *-0*, set _length_ to *+0*.
+ 1. Let _isArray_ be ? IsArray(_originalArray_).
+ 1. If _isArray_ is *false*, return ? ArrayCreate(_length_).
+ 1. Let _C_ be ? Get(_originalArray_, `"constructor"`).
+ 1. If IsConstructor(_C_) is *true*, then
+ 1. Let _thisRealm_ be the current Realm Record.
+ 1. Let _realmC_ be ? GetFunctionRealm(_C_).
+ 1. If _thisRealm_ and _realmC_ are not the same Realm Record, then
+ 1. If SameValue(_C_, _realmC_.[[Intrinsics]].[[%Array%]]) is *true*, set _C_ to *undefined*.
+ 1. If Type(_C_) is Object, then
+ 1. Set _C_ to ? Get(_C_, @@species).
+ 1. If _C_ is *null*, set _C_ to *undefined*.
+ 1. If _C_ is *undefined*, return ? ArrayCreate(_length_).
+ 1. If IsConstructor(_C_) is *false*, throw a *TypeError* exception.
+ 1. Return ? Construct(_C_, « _length_ »).
+
+
+ If _originalArray_ was created using the standard built-in Array constructor for a realm that is not the realm of the running execution context, then a new Array is created using the realm of the running execution context. This maintains compatibility with Web browsers that have historically had that behaviour for the Array.prototype methods that now are defined using ArraySpeciesCreate.
+
+
+
+
+
+ ArraySetLength ( _A_, _Desc_ )
+ When the abstract operation ArraySetLength is called with an Array exotic object _A_, and Property Descriptor _Desc_, the following steps are taken:
+
+ 1. If _Desc_.[[Value]] is absent, then
+ 1. Return OrdinaryDefineOwnProperty(_A_, `"length"`, _Desc_).
+ 1. Let _newLenDesc_ be a copy of _Desc_.
+ 1. Let _newLen_ be ? ToUint32(_Desc_.[[Value]]).
+ 1. Let _numberLen_ be ? ToNumber(_Desc_.[[Value]]).
+ 1. If _newLen_ ≠ _numberLen_, throw a *RangeError* exception.
+ 1. Set _newLenDesc_.[[Value]] to _newLen_.
+ 1. Let _oldLenDesc_ be OrdinaryGetOwnProperty(_A_, `"length"`).
+ 1. Assert: _oldLenDesc_ will never be *undefined* or an accessor descriptor because Array objects are created with a length data property that cannot be deleted or reconfigured.
+ 1. Let _oldLen_ be _oldLenDesc_.[[Value]].
+ 1. If _newLen_ ≥ _oldLen_, then
+ 1. Return OrdinaryDefineOwnProperty(_A_, `"length"`, _newLenDesc_).
+ 1. If _oldLenDesc_.[[Writable]] is *false*, return *false*.
+ 1. If _newLenDesc_.[[Writable]] is absent or has the value *true*, let _newWritable_ be *true*.
+ 1. Else,
+ 1. Need to defer setting the [[Writable]] attribute to *false* in case any elements cannot be deleted.
+ 1. Let _newWritable_ be *false*.
+ 1. Set _newLenDesc_.[[Writable]] to *true*.
+ 1. Let _succeeded_ be ! OrdinaryDefineOwnProperty(_A_, `"length"`, _newLenDesc_).
+ 1. If _succeeded_ is *false*, return *false*.
+ 1. Repeat, while _newLen_ < _oldLen_,
+ 1. Set _oldLen_ to _oldLen_ - 1.
+ 1. Let _deleteSucceeded_ be ! _A_.[[Delete]](! ToString(_oldLen_)).
+ 1. If _deleteSucceeded_ is *false*, then
+ 1. Set _newLenDesc_.[[Value]] to _oldLen_ + 1.
+ 1. If _newWritable_ is *false*, set _newLenDesc_.[[Writable]] to *false*.
+ 1. Let _succeeded_ be ! OrdinaryDefineOwnProperty(_A_, `"length"`, _newLenDesc_).
+ 1. Return *false*.
+ 1. If _newWritable_ is *false*, then
+ 1. Return OrdinaryDefineOwnProperty(_A_, `"length"`, PropertyDescriptor{[[Writable]]: *false*}). This call will always return *true*.
+ 1. Return *true*.
+
+
+ In steps 3 and 4, if _Desc_.[[Value]] is an object then its `valueOf` method is called twice. This is legacy behaviour that was specified with this effect starting with the 2nd Edition of this specification.
+
+
+
+
+
+
+ String Exotic Objects
+ A String object is an exotic object that encapsulates a String value and exposes virtual integer indexed data properties corresponding to the individual code unit elements of the String value. String exotic objects always have a data property named `"length"` whose value is the number of code unit elements in the encapsulated String value. Both the code unit data properties and the `"length"` property are non-writable and non-configurable.
+ String exotic objects have the same internal slots as ordinary objects. They also have a [[StringData]] internal slot.
+ String exotic objects provide alternative definitions for the following internal methods. All of the other String exotic object essential internal methods that are not defined below are as specified in .
+
+
+
+ [[GetOwnProperty]] ( _P_ )
+ When the [[GetOwnProperty]] internal method of a String exotic object _S_ is called with property key _P_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _desc_ be OrdinaryGetOwnProperty(_S_, _P_).
+ 1. If _desc_ is not *undefined*, return _desc_.
+ 1. Return ! StringGetOwnProperty(_S_, _P_).
+
+
+
+
+ [[DefineOwnProperty]] ( _P_, _Desc_ )
+ When the [[DefineOwnProperty]] internal method of a String exotic object _S_ is called with property key _P_, and Property Descriptor _Desc_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _stringDesc_ be ! StringGetOwnProperty(_S_, _P_).
+ 1. If _stringDesc_ is not *undefined*, then
+ 1. Let _extensible_ be _S_.[[Extensible]].
+ 1. Return ! IsCompatiblePropertyDescriptor(_extensible_, _Desc_, _stringDesc_).
+ 1. Return ! OrdinaryDefineOwnProperty(_S_, _P_, _Desc_).
+
+
+
+
+
+ [[OwnPropertyKeys]] ( )
+ When the [[OwnPropertyKeys]] internal method of a String exotic object _O_ is called, the following steps are taken:
+
+ 1. Let _keys_ be a new empty List.
+ 1. Let _str_ be the String value of _O_.[[StringData]].
+ 1. Let _len_ be the length of _str_.
+ 1. For each integer _i_ starting with 0 such that _i_ < _len_, in ascending order, do
+ 1. Add ! ToString(_i_) as the last element of _keys_.
+ 1. For each own property key _P_ of _O_ such that _P_ is an integer index and ToInteger(_P_) ≥ _len_, in ascending numeric index order, do
+ 1. Add _P_ as the last element of _keys_.
+ 1. For each own property key _P_ of _O_ such that Type(_P_) is String and _P_ is not an integer index, in ascending chronological order of property creation, do
+ 1. Add _P_ as the last element of _keys_.
+ 1. For each own property key _P_ of _O_ such that Type(_P_) is Symbol, in ascending chronological order of property creation, do
+ 1. Add _P_ as the last element of _keys_.
+ 1. Return _keys_.
+
+
+
+
+
+ StringCreate ( _value_, _prototype_ )
+ The abstract operation StringCreate with arguments _value_ and _prototype_ is used to specify the creation of new String exotic objects. It performs the following steps:
+
+ 1. Assert: Type(_value_) is String.
+ 1. Let _S_ be a newly created String exotic object.
+ 1. Set _S_.[[StringData]] to _value_.
+ 1. Set _S_'s essential internal methods to the default ordinary object definitions specified in .
+ 1. Set _S_.[[GetOwnProperty]] as specified in .
+ 1. Set _S_.[[DefineOwnProperty]] as specified in .
+ 1. Set _S_.[[OwnPropertyKeys]] as specified in .
+ 1. Set _S_.[[Prototype]] to _prototype_.
+ 1. Set _S_.[[Extensible]] to *true*.
+ 1. Let _length_ be the number of code unit elements in _value_.
+ 1. Perform ! DefinePropertyOrThrow(_S_, `"length"`, PropertyDescriptor{[[Value]]: _length_, [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
+ 1. Return _S_.
+
+
+
+
+ StringGetOwnProperty ( _S_, _P_ )
+ The abstract operation StringGetOwnProperty called with arguments _S_ and _P_ performs the following steps:
+
+ 1. Assert: _S_ is an Object that has a [[StringData]] internal slot.
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. If Type(_P_) is not String, return *undefined*.
+ 1. Let _index_ be ! CanonicalNumericIndexString(_P_).
+ 1. If _index_ is *undefined*, return *undefined*.
+ 1. If IsInteger(_index_) is *false*, return *undefined*.
+ 1. If _index_ = *-0*, return *undefined*.
+ 1. Let _str_ be the String value of _S_.[[StringData]].
+ 1. Let _len_ be the length of _str_.
+ 1. If _index_ < 0 or _len_ ≤ _index_, return *undefined*.
+ 1. Let _resultStr_ be the String value of length 1, containing one code unit from _str_, specifically the code unit at index _index_.
+ 1. Return a PropertyDescriptor{[[Value]]: _resultStr_, [[Writable]]: *false*, [[Enumerable]]: *true*, [[Configurable]]: *false*}.
+
+
+
+
+
+
+ Arguments Exotic Objects
+ Most ECMAScript functions make an arguments object available to their code. Depending upon the characteristics of the function definition, its arguments object is either an ordinary object or an arguments exotic object. An arguments exotic object is an exotic object whose array index properties map to the formal parameters bindings of an invocation of its associated ECMAScript function.
+ Arguments exotic objects have the same internal slots as ordinary objects. They also have a [[ParameterMap]] internal slot. Ordinary arguments objects also have a [[ParameterMap]] internal slot whose value is always undefined. For ordinary argument objects the [[ParameterMap]] internal slot is only used by `Object.prototype.toString` () to identify them as such.
+ Arguments exotic objects provide alternative definitions for the following internal methods. All of the other arguments exotic object essential internal methods that are not defined below are as specified in
+
+ The integer indexed data properties of an arguments exotic object whose numeric name values are less than the number of formal parameters of the corresponding function object initially share their values with the corresponding argument bindings in the function's execution context. This means that changing the property changes the corresponding value of the argument binding and vice-versa. This correspondence is broken if such a property is deleted and then redefined or if the property is changed into an accessor property. If the arguments object is an ordinary object, the values of its properties are simply a copy of the arguments passed to the function and there is no dynamic linkage between the property values and the formal parameter values.
+
+
+ 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.
+
+
+ Ordinary arguments objects define a non-configurable accessor property named `"callee"` which throws a *TypeError* exception on access. The `"callee"` property has a more specific meaning for arguments exotic objects, which are created only for some class of non-strict functions. The definition of this property in the ordinary variant exists to ensure that it is not defined in any other manner by conforming ECMAScript implementations.
+
+
+ ECMAScript implementations of arguments exotic objects have historically contained an accessor property named `"caller"`. Prior to ECMAScript 2017, this specification included the definition of a throwing `"caller"` property on ordinary arguments objects. Since implementations do not contain this extension any longer, ECMAScript 2017 dropped the requirement for a throwing `"caller"` accessor.
+
+
+
+
+ [[GetOwnProperty]] ( _P_ )
+ The [[GetOwnProperty]] internal method of an arguments exotic object when called with a property key _P_ performs the following steps:
+
+ 1. Let _args_ be the arguments object.
+ 1. Let _desc_ be OrdinaryGetOwnProperty(_args_, _P_).
+ 1. If _desc_ is *undefined*, return _desc_.
+ 1. Let _map_ be _args_.[[ParameterMap]].
+ 1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_).
+ 1. If _isMapped_ is *true*, then
+ 1. Set _desc_.[[Value]] to Get(_map_, _P_).
+ 1. Return _desc_.
+
+
+
+
+
+ [[DefineOwnProperty]] ( _P_, _Desc_ )
+ The [[DefineOwnProperty]] internal method of an arguments exotic object when called with a property key _P_ and Property Descriptor _Desc_ performs the following steps:
+
+ 1. Let _args_ be the arguments object.
+ 1. Let _map_ be _args_.[[ParameterMap]].
+ 1. Let _isMapped_ be HasOwnProperty(_map_, _P_).
+ 1. Let _newArgDesc_ be _Desc_.
+ 1. If _isMapped_ is *true* and IsDataDescriptor(_Desc_) is *true*, then
+ 1. If _Desc_.[[Value]] is not present and _Desc_.[[Writable]] is present and its value is *false*, then
+ 1. Set _newArgDesc_ to a copy of _Desc_.
+ 1. Set _newArgDesc_.[[Value]] to Get(_map_, _P_).
+ 1. Let _allowed_ be ? OrdinaryDefineOwnProperty(_args_, _P_, _newArgDesc_).
+ 1. If _allowed_ is *false*, return *false*.
+ 1. If _isMapped_ is *true*, then
+ 1. If IsAccessorDescriptor(_Desc_) is *true*, then
+ 1. Call _map_.[[Delete]](_P_).
+ 1. Else,
+ 1. If _Desc_.[[Value]] is present, then
+ 1. Let _setStatus_ be Set(_map_, _P_, _Desc_.[[Value]], *false*).
+ 1. Assert: _setStatus_ is *true* because formal parameters mapped by argument objects are always writable.
+ 1. If _Desc_.[[Writable]] is present and its value is *false*, then
+ 1. Call _map_.[[Delete]](_P_).
+ 1. Return *true*.
+
+
+
+
+
+ [[Get]] ( _P_, _Receiver_ )
+ The [[Get]] internal method of an arguments exotic object when called with a property key _P_ and ECMAScript language value _Receiver_ performs the following steps:
+
+ 1. Let _args_ be the arguments object.
+ 1. Let _map_ be _args_.[[ParameterMap]].
+ 1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_).
+ 1. If _isMapped_ is *false*, then
+ 1. Return ? OrdinaryGet(_args_, _P_, _Receiver_).
+ 1. Else _map_ contains a formal parameter mapping for _P_,
+ 1. Return Get(_map_, _P_).
+
+
+
+
+
+ [[Set]] ( _P_, _V_, _Receiver_ )
+ The [[Set]] internal method of an arguments exotic object when called with property key _P_, value _V_, and ECMAScript language value _Receiver_ performs the following steps:
+
+ 1. Let _args_ be the arguments object.
+ 1. If SameValue(_args_, _Receiver_) is *false*, then
+ 1. Let _isMapped_ be *false*.
+ 1. Else,
+ 1. Let _map_ be _args_.[[ParameterMap]].
+ 1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_).
+ 1. If _isMapped_ is *true*, then
+ 1. Let _setStatus_ be Set(_map_, _P_, _V_, *false*).
+ 1. Assert: _setStatus_ is *true* because formal parameters mapped by argument objects are always writable.
+ 1. Return ? OrdinarySet(_args_, _P_, _V_, _Receiver_).
+
+
+
+
+
+ [[Delete]] ( _P_ )
+ The [[Delete]] internal method of an arguments exotic object when called with a property key _P_ performs the following steps:
+
+ 1. Let _args_ be the arguments object.
+ 1. Let _map_ be _args_.[[ParameterMap]].
+ 1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_).
+ 1. Let _result_ be ? OrdinaryDelete(_args_, _P_).
+ 1. If _result_ is *true* and _isMapped_ is *true*, then
+ 1. Call _map_.[[Delete]](_P_).
+ 1. Return _result_.
+
+
+
+
+
+ CreateUnmappedArgumentsObject ( _argumentsList_ )
+ The abstract operation CreateUnmappedArgumentsObject called with an argument _argumentsList_ performs the following steps:
+
+ 1. Let _len_ be the number of elements in _argumentsList_.
+ 1. Let _obj_ be ObjectCreate(%ObjectPrototype%, « [[ParameterMap]] »).
+ 1. Set _obj_.[[ParameterMap]] to *undefined*.
+ 1. Perform DefinePropertyOrThrow(_obj_, `"length"`, PropertyDescriptor{[[Value]]: _len_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true*}).
+ 1. Let _index_ be 0.
+ 1. Repeat, while _index_ < _len_,
+ 1. Let _val_ be _argumentsList_[_index_].
+ 1. Perform CreateDataProperty(_obj_, ! ToString(_index_), _val_).
+ 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. Return _obj_.
+
+
+
+
+
+ CreateMappedArgumentsObject ( _func_, _formals_, _argumentsList_, _env_ )
+ The abstract operation CreateMappedArgumentsObject is called with object _func_, Parse Node _formals_, List _argumentsList_, and Environment Record _env_. The following steps are performed:
+
+ 1. Assert: _formals_ does not contain a rest parameter, any binding patterns, or any initializers. It may contain duplicate identifiers.
+ 1. Let _len_ be the number of elements in _argumentsList_.
+ 1. Let _obj_ be a newly created arguments exotic object with a [[ParameterMap]] internal slot.
+ 1. Set _obj_.[[GetOwnProperty]] as specified in .
+ 1. Set _obj_.[[DefineOwnProperty]] as specified in .
+ 1. Set _obj_.[[Get]] as specified in .
+ 1. Set _obj_.[[Set]] as specified in .
+ 1. Set _obj_.[[Delete]] as specified in .
+ 1. Set the remainder of _obj_'s essential internal methods to the default ordinary object definitions specified in .
+ 1. Set _obj_.[[Prototype]] to %ObjectPrototype%.
+ 1. Set _obj_.[[Extensible]] to *true*.
+ 1. Let _map_ be ObjectCreate(*null*).
+ 1. Set _obj_.[[ParameterMap]] to _map_.
+ 1. Let _parameterNames_ be the BoundNames of _formals_.
+ 1. Let _numberOfParameters_ be the number of elements in _parameterNames_.
+ 1. Let _index_ be 0.
+ 1. Repeat, while _index_ < _len_,
+ 1. Let _val_ be _argumentsList_[_index_].
+ 1. Perform CreateDataProperty(_obj_, ! ToString(_index_), _val_).
+ 1. Let _index_ be _index_ + 1.
+ 1. Perform DefinePropertyOrThrow(_obj_, `"length"`, PropertyDescriptor{[[Value]]: _len_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true*}).
+ 1. Let _mappedNames_ be a new empty List.
+ 1. Let _index_ be _numberOfParameters_ - 1.
+ 1. Repeat, while _index_ ≥ 0,
+ 1. Let _name_ be _parameterNames_[_index_].
+ 1. If _name_ is not an element of _mappedNames_, then
+ 1. Add _name_ as an element of the list _mappedNames_.
+ 1. If _index_ < _len_, then
+ 1. Let _g_ be MakeArgGetter(_name_, _env_).
+ 1. Let _p_ be MakeArgSetter(_name_, _env_).
+ 1. Perform _map_.[[DefineOwnProperty]](! ToString(_index_), PropertyDescriptor{[[Set]]: _p_, [[Get]]: _g_, [[Enumerable]]: *false*, [[Configurable]]: *true*}).
+ 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 {[[Value]]: _func_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true*}).
+ 1. Return _obj_.
+
+
+
+
+ MakeArgGetter ( _name_, _env_ )
+ The abstract operation MakeArgGetter called with String _name_ and Environment Record _env_ creates a built-in function object that when executed returns the value bound for _name_ in _env_. It performs the following steps:
+
+ 1. Let _realm_ be the current Realm Record.
+ 1. Let _steps_ be the steps of an ArgGetter function as specified below.
+ 1. Let _getter_ be CreateBuiltinFunction(_realm_, _steps_, %FunctionPrototype%, « [[Name]], [[Env]] »).
+ 1. Set _getter_.[[Name]] to _name_.
+ 1. Set _getter_.[[Env]] to _env_.
+ 1. Return _getter_.
+
+ An ArgGetter function is an anonymous built-in function with [[Name]] and [[Env]] internal slots. When an ArgGetter function _f_ that expects no arguments is called it performs the following steps:
+
+ 1. Let _name_ be _f_.[[Name]].
+ 1. Let _env_ be _f_.[[Env]].
+ 1. Return _env_.GetBindingValue(_name_, *false*).
+
+
+ ArgGetter functions are never directly accessible to ECMAScript code.
+
+
+
+
+
+ MakeArgSetter ( _name_, _env_ )
+ The abstract operation MakeArgSetter called with String _name_ and Environment Record _env_ creates a built-in function object that when executed sets the value bound for _name_ in _env_. It performs the following steps:
+
+ 1. Let _realm_ be the current Realm Record.
+ 1. Let _steps_ be the steps of an ArgSetter function as specified below.
+ 1. Let _setter_ be CreateBuiltinFunction(_realm_, _steps_, %FunctionPrototype%, « [[Name]], [[Env]] »).
+ 1. Set _setter_.[[Name]] to _name_.
+ 1. Set _setter_.[[Env]] to _env_.
+ 1. Return _setter_.
+
+ An ArgSetter function is an anonymous built-in function with [[Name]] and [[Env]] internal slots. When an ArgSetter function _f_ is called with argument _value_ it performs the following steps:
+
+ 1. Let _name_ be _f_.[[Name]].
+ 1. Let _env_ be _f_.[[Env]].
+ 1. Return _env_.SetMutableBinding(_name_, _value_, *false*).
+
+
+ ArgSetter functions are never directly accessible to ECMAScript code.
+
+
+
+
+
+
+
+ Integer Indexed Exotic Objects
+ An Integer Indexed object is an exotic object that performs special handling of integer index property keys.
+ Integer Indexed exotic objects have the same internal slots as ordinary objects and additionally [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]] internal slots.
+ Integer Indexed exotic objects provide alternative definitions for the following internal methods. All of the other Integer Indexed exotic object essential internal methods that are not defined below are as specified in .
+
+
+
+ [[GetOwnProperty]] ( _P_ )
+ When the [[GetOwnProperty]] internal method of an Integer Indexed exotic object _O_ is called with property key _P_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Assert: _O_ is an Object that has a [[ViewedArrayBuffer]] internal slot.
+ 1. If Type(_P_) is String, then
+ 1. Let _numericIndex_ be ! CanonicalNumericIndexString(_P_).
+ 1. If _numericIndex_ is not *undefined*, then
+ 1. Let _value_ be ? IntegerIndexedElementGet(_O_, _numericIndex_).
+ 1. If _value_ is *undefined*, return *undefined*.
+ 1. Return a PropertyDescriptor{[[Value]]: _value_, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: *false*}.
+ 1. Return OrdinaryGetOwnProperty(_O_, _P_).
+
+
+
+
+
+ [[HasProperty]]( _P_ )
+ When the [[HasProperty]] internal method of an Integer Indexed exotic object _O_ is called with property key _P_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Assert: _O_ is an Object that has a [[ViewedArrayBuffer]] internal slot.
+ 1. If Type(_P_) is String, then
+ 1. Let _numericIndex_ be ! CanonicalNumericIndexString(_P_).
+ 1. If _numericIndex_ is not *undefined*, then
+ 1. Let _buffer_ be _O_.[[ViewedArrayBuffer]].
+ 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception.
+ 1. If IsInteger(_numericIndex_) is *false*, return *false*.
+ 1. If _numericIndex_ = *-0*, return *false*.
+ 1. If _numericIndex_ < 0, return *false*.
+ 1. If _numericIndex_ ≥ _O_.[[ArrayLength]], return *false*.
+ 1. Return *true*.
+ 1. Return ? OrdinaryHasProperty(_O_, _P_).
+
+
+
+
+
+ [[DefineOwnProperty]] ( _P_, _Desc_ )
+ When the [[DefineOwnProperty]] internal method of an Integer Indexed exotic object _O_ is called with property key _P_, and Property Descriptor _Desc_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Assert: _O_ is an Object that has a [[ViewedArrayBuffer]] internal slot.
+ 1. If Type(_P_) is String, then
+ 1. Let _numericIndex_ be ! CanonicalNumericIndexString(_P_).
+ 1. If _numericIndex_ is not *undefined*, then
+ 1. If IsInteger(_numericIndex_) is *false*, return *false*.
+ 1. If _numericIndex_ = *-0*, return *false*.
+ 1. If _numericIndex_ < 0, return *false*.
+ 1. Let _length_ be _O_.[[ArrayLength]].
+ 1. If _numericIndex_ ≥ _length_, return *false*.
+ 1. If IsAccessorDescriptor(_Desc_) is *true*, return *false*.
+ 1. If _Desc_ has a [[Configurable]] field and if _Desc_.[[Configurable]] is *true*, return *false*.
+ 1. If _Desc_ has an [[Enumerable]] field and if _Desc_.[[Enumerable]] is *false*, return *false*.
+ 1. If _Desc_ has a [[Writable]] field and if _Desc_.[[Writable]] is *false*, return *false*.
+ 1. If _Desc_ has a [[Value]] field, then
+ 1. Let _value_ be _Desc_.[[Value]].
+ 1. Return ? IntegerIndexedElementSet(_O_, _numericIndex_, _value_).
+ 1. Return *true*.
+ 1. Return ! OrdinaryDefineOwnProperty(_O_, _P_, _Desc_).
+
+
+
+
+
+ [[Get]] ( _P_, _Receiver_ )
+ When the [[Get]] internal method of an Integer Indexed exotic object _O_ is called with property key _P_ and ECMAScript language value _Receiver_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. If Type(_P_) is String, then
+ 1. Let _numericIndex_ be ! CanonicalNumericIndexString(_P_).
+ 1. If _numericIndex_ is not *undefined*, then
+ 1. Return ? IntegerIndexedElementGet(_O_, _numericIndex_).
+ 1. Return ? OrdinaryGet(_O_, _P_, _Receiver_).
+
+
+
+
+
+ [[Set]] ( _P_, _V_, _Receiver_ )
+ When the [[Set]] internal method of an Integer Indexed exotic object _O_ is called with property key _P_, value _V_, and ECMAScript language value _Receiver_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. If Type(_P_) is String, then
+ 1. Let _numericIndex_ be ! CanonicalNumericIndexString(_P_).
+ 1. If _numericIndex_ is not *undefined*, then
+ 1. Return ? IntegerIndexedElementSet(_O_, _numericIndex_, _V_).
+ 1. Return ? OrdinarySet(_O_, _P_, _V_, _Receiver_).
+
+
+
+
+
+ [[OwnPropertyKeys]] ( )
+ When the [[OwnPropertyKeys]] internal method of an Integer Indexed exotic object _O_ is called, the following steps are taken:
+
+ 1. Let _keys_ be a new empty List.
+ 1. Assert: _O_ is an Object that has [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]] internal slots.
+ 1. Let _len_ be _O_.[[ArrayLength]].
+ 1. For each integer _i_ starting with 0 such that _i_ < _len_, in ascending order, do
+ 1. Add ! ToString(_i_) as the last element of _keys_.
+ 1. For each own property key _P_ of _O_ such that Type(_P_) is String and _P_ is not an integer index, in ascending chronological order of property creation, do
+ 1. Add _P_ as the last element of _keys_.
+ 1. For each own property key _P_ of _O_ such that Type(_P_) is Symbol, in ascending chronological order of property creation, do
+ 1. Add _P_ as the last element of _keys_.
+ 1. Return _keys_.
+
+
+
+
+
+ IntegerIndexedObjectCreate ( _prototype_, _internalSlotsList_ )
+ The abstract operation IntegerIndexedObjectCreate with arguments _prototype_ and _internalSlotsList_ is used to specify the creation of new Integer Indexed exotic objects. The argument _internalSlotsList_ is a List of the names of additional internal slots that must be defined as part of the object. IntegerIndexedObjectCreate performs the following steps:
+
+ 1. Assert: _internalSlotsList_ contains the names [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]].
+ 1. Let _A_ be a newly created object with an internal slot for each name in _internalSlotsList_.
+ 1. Set _A_'s essential internal methods to the default ordinary object definitions specified in .
+ 1. Set _A_.[[GetOwnProperty]] as specified in .
+ 1. Set _A_.[[HasProperty]] as specified in .
+ 1. Set _A_.[[DefineOwnProperty]] as specified in .
+ 1. Set _A_.[[Get]] as specified in .
+ 1. Set _A_.[[Set]] as specified in .
+ 1. Set _A_.[[OwnPropertyKeys]] as specified in .
+ 1. Set _A_.[[Prototype]] to _prototype_.
+ 1. Set _A_.[[Extensible]] to *true*.
+ 1. Return _A_.
+
+
+
+
+
+ IntegerIndexedElementGet ( _O_, _index_ )
+ The abstract operation IntegerIndexedElementGet with arguments _O_ and _index_ performs the following steps:
+
+ 1. Assert: Type(_index_) is Number.
+ 1. Assert: _O_ is an Object that has [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]] internal slots.
+ 1. Let _buffer_ be _O_.[[ViewedArrayBuffer]].
+ 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception.
+ 1. If IsInteger(_index_) is *false*, return *undefined*.
+ 1. If _index_ = *-0*, return *undefined*.
+ 1. Let _length_ be _O_.[[ArrayLength]].
+ 1. If _index_ < 0 or _index_ ≥ _length_, return *undefined*.
+ 1. Let _offset_ be _O_.[[ByteOffset]].
+ 1. Let _arrayTypeName_ be the String value of _O_.[[TypedArrayName]].
+ 1. Let _elementSize_ be the Number value of the Element Size value specified in for _arrayTypeName_.
+ 1. Let _indexedPosition_ be (_index_ × _elementSize_) + _offset_.
+ 1. Let _elementType_ be the String value of the Element Type value in for _arrayTypeName_.
+ 1. Return GetValueFromBuffer(_buffer_, _indexedPosition_, _elementType_, *true*, `"Unordered"`).
+
+
+
+
+
+ IntegerIndexedElementSet ( _O_, _index_, _value_ )
+ The abstract operation IntegerIndexedElementSet with arguments _O_, _index_, and _value_ performs the following steps:
+
+ 1. Assert: Type(_index_) is Number.
+ 1. Assert: _O_ is an Object that has [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]] internal slots.
+ 1. Let _numValue_ be ? ToNumber(_value_).
+ 1. Let _buffer_ be _O_.[[ViewedArrayBuffer]].
+ 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception.
+ 1. If IsInteger(_index_) is *false*, return *false*.
+ 1. If _index_ = *-0*, return *false*.
+ 1. Let _length_ be _O_.[[ArrayLength]].
+ 1. If _index_ < 0 or _index_ ≥ _length_, return *false*.
+ 1. Let _offset_ be _O_.[[ByteOffset]].
+ 1. Let _arrayTypeName_ be the String value of _O_.[[TypedArrayName]].
+ 1. Let _elementSize_ be the Number value of the Element Size value specified in for _arrayTypeName_.
+ 1. Let _indexedPosition_ be (_index_ × _elementSize_) + _offset_.
+ 1. Let _elementType_ be the String value of the Element Type value in for _arrayTypeName_.
+ 1. Perform SetValueInBuffer(_buffer_, _indexedPosition_, _elementType_, _numValue_, *true*, `"Unordered"`).
+ 1. Return *true*.
+
+
+
+
+
+
+ Module Namespace Exotic Objects
+ A module namespace object is an exotic object that exposes the bindings exported from an ECMAScript |Module| (See ). There is a one-to-one correspondence between the String-keyed own properties of a module namespace exotic object and the binding names exported by the |Module|. The exported bindings include any bindings that are indirectly exported using `export *` export items. Each String-valued own property key is the StringValue of the corresponding exported binding name. These are the only String-keyed properties of a module namespace exotic object. Each such property has the attributes { [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: *false* }. Module namespace objects are not extensible.
+ Module namespace objects have the internal slots defined in .
+
+
+
+
+
+ Internal Slot
+ |
+
+ Type
+ |
+
+ Description
+ |
+
+
+
+ [[Module]]
+ |
+
+ Module Record
+ |
+
+ The Module Record whose exports this namespace exposes.
+ |
+
+
+
+ [[Exports]]
+ |
+
+ List of String
+ |
+
+ A List containing the String values of the exported names exposed as own properties of this object. The list is ordered as if an Array of those String values had been sorted using `Array.prototype.sort` using *undefined* as _comparefn_.
+ |
+
+
+
+ [[Prototype]]
+ |
+
+ Null
+ |
+
+ This slot always contains the value *null* (see ).
+ |
+
+
+
+
+ Module namespace exotic objects provide alternative definitions for all of the internal methods except [[GetPrototypeOf]], which behaves as defined in .
+
+
+
+ [[SetPrototypeOf]] ( _V_ )
+ When the [[SetPrototypeOf]] internal method of a module namespace exotic object _O_ is called with argument _V_, the following steps are taken:
+
+ 1. Return ? SetImmutablePrototype(_O_, _V_).
+
+
+
+
+
+ [[IsExtensible]] ( )
+ When the [[IsExtensible]] internal method of a module namespace exotic object _O_ is called, the following steps are taken:
+
+ 1. Return *false*.
+
+
+
+
+
+ [[PreventExtensions]] ( )
+ When the [[PreventExtensions]] internal method of a module namespace exotic object _O_ is called, the following steps are taken:
+
+ 1. Return *true*.
+
+
+
+
+
+ [[GetOwnProperty]] ( _P_ )
+ When the [[GetOwnProperty]] internal method of a module namespace exotic object _O_ is called with property key _P_, the following steps are taken:
+
+ 1. If Type(_P_) is Symbol, return OrdinaryGetOwnProperty(_O_, _P_).
+ 1. Let _exports_ be _O_.[[Exports]].
+ 1. If _P_ is not an element of _exports_, return *undefined*.
+ 1. Let _value_ be ? _O_.[[Get]](_P_, _O_).
+ 1. Return PropertyDescriptor{[[Value]]: _value_, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: *false* }.
+
+
+
+
+
+ [[DefineOwnProperty]] ( _P_, _Desc_ )
+ When the [[DefineOwnProperty]] internal method of a module namespace exotic object _O_ is called with property key _P_ and Property Descriptor _Desc_, the following steps are taken:
+
+ 1. Return *false*.
+
+
+
+
+
+ [[HasProperty]] ( _P_ )
+ When the [[HasProperty]] internal method of a module namespace exotic object _O_ is called with property key _P_, the following steps are taken:
+
+ 1. If Type(_P_) is Symbol, return OrdinaryHasProperty(_O_, _P_).
+ 1. Let _exports_ be _O_.[[Exports]].
+ 1. If _P_ is an element of _exports_, return *true*.
+ 1. Return *false*.
+
+
+
+
+
+ [[Get]] ( _P_, _Receiver_ )
+ When the [[Get]] internal method of a module namespace exotic object _O_ is called with property key _P_ and ECMAScript language value _Receiver_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. If Type(_P_) is Symbol, then
+ 1. Return ? OrdinaryGet(_O_, _P_, _Receiver_).
+ 1. Let _exports_ be _O_.[[Exports]].
+ 1. If _P_ is not an element of _exports_, return *undefined*.
+ 1. Let _m_ be _O_.[[Module]].
+ 1. Let _binding_ be ! _m_.ResolveExport(_P_, « »).
+ 1. Assert: _binding_ is a ResolvedBinding Record.
+ 1. Let _targetModule_ be _binding_.[[Module]].
+ 1. Assert: _targetModule_ is not *undefined*.
+ 1. Let _targetEnv_ be _targetModule_.[[Environment]].
+ 1. If _targetEnv_ is *undefined*, throw a *ReferenceError* exception.
+ 1. Let _targetEnvRec_ be _targetEnv_'s EnvironmentRecord.
+ 1. Return ? _targetEnvRec_.GetBindingValue(_binding_.[[BindingName]], *true*).
+
+
+ ResolveExport is idempotent and side-effect free. An implementation might choose to pre-compute or cache the ResolveExport results for the [[Exports]] of each module namespace exotic object.
+
+
+
+
+
+ [[Set]] ( _P_, _V_, _Receiver_ )
+ When the [[Set]] internal method of a module namespace exotic object _O_ is called with property key _P_, value _V_, and ECMAScript language value _Receiver_, the following steps are taken:
+
+ 1. Return *false*.
+
+
+
+
+
+ [[Delete]] ( _P_ )
+ When the [[Delete]] internal method of a module namespace exotic object _O_ is called with property key _P_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. If Type(_P_) is Symbol, then
+ 1. Return ? OrdinaryDelete(_O_, _P_).
+ 1. Let _exports_ be _O_.[[Exports]].
+ 1. If _P_ is an element of _exports_, return *false*.
+ 1. Return *true*.
+
+
+
+
+
+ [[OwnPropertyKeys]] ( )
+ When the [[OwnPropertyKeys]] internal method of a module namespace exotic object _O_ is called, the following steps are taken:
+
+ 1. Let _exports_ be a copy of _O_.[[Exports]].
+ 1. Let _symbolKeys_ be ! OrdinaryOwnPropertyKeys(_O_).
+ 1. Append all the entries of _symbolKeys_ to the end of _exports_.
+ 1. Return _exports_.
+
+
+
+
+
+ ModuleNamespaceCreate ( _module_, _exports_ )
+ The abstract operation ModuleNamespaceCreate with arguments _module_, and _exports_ is used to specify the creation of new module namespace exotic objects. It performs the following steps:
+
+ 1. Assert: _module_ is a Module Record.
+ 1. Assert: _module_.[[Namespace]] is *undefined*.
+ 1. Assert: _exports_ is a List of String values.
+ 1. Let _M_ be a newly created object.
+ 1. Set _M_'s essential internal methods to the definitions specified in .
+ 1. Set _M_.[[Module]] to _module_.
+ 1. Let _sortedExports_ be a new List containing the same values as the list _exports_ where the values are ordered as if an Array of the same values had been sorted using `Array.prototype.sort` using *undefined* as _comparefn_.
+ 1. Set _M_.[[Exports]] to _sortedExports_.
+ 1. Create own properties of _M_ corresponding to the definitions in .
+ 1. Set _module_.[[Namespace]] to _M_.
+ 1. Return _M_.
+
+
+
+
+
+ Immutable Prototype Exotic Objects
+ An immutable prototype exotic object is an exotic object that has a [[Prototype]] internal slot that will not change once it is initialized.
+
+ Immutable prototype exotic objects have the same internal slots as ordinary objects. They are exotic only in the following internal methods. All other internal methods of immutable prototype exotic objects that are not explicitly defined below are instead defined as in ordinary objects.
+
+
+ [[SetPrototypeOf]] ( _V_ )
+ When the [[SetPrototypeOf]] internal method of an immutable prototype exotic object _O_ is called with argument _V_, the following steps are taken:
+
+ 1. Return ? SetImmutablePrototype(_O_, _V_).
+
+
+
+
+ SetImmutablePrototype ( _O_, _V_ )
+ When the SetImmutablePrototype abstract operation is called with arguments _O_ and _V_, the following steps are taken:
+
+ 1. Assert: Either Type(_V_) is Object or Type(_V_) is Null.
+ 1. Let _current_ be ? _O_.[[GetPrototypeOf]]().
+ 1. If SameValue(_V_, _current_) is *true*, return *true*.
+ 1. Return *false*.
+
+
+
+
\ No newline at end of file
diff --git a/translated/issues-24.html b/translated/issues-24.html
new file mode 100644
index 0000000000..c0d1cad39c
--- /dev/null
+++ b/translated/issues-24.html
@@ -0,0 +1,636 @@
+
+ Proxy Object Internal Methods and Internal Slots
+ A proxy object is an exotic object whose essential internal methods are partially implemented using ECMAScript code. Every proxy objects has an internal slot called [[ProxyHandler]]. The value of [[ProxyHandler]] is an object, called the proxy's handler object, or *null*. Methods (see ) of a handler object may be used to augment the implementation for one or more of the proxy object's internal methods. Every proxy object also has an internal slot called [[ProxyTarget]] whose value is either an object or the *null* value. This object is called the proxy's target object.
+
+
+
+
+
+ Internal Method
+ |
+
+ Handler Method
+ |
+
+
+
+ [[GetPrototypeOf]]
+ |
+
+ `getPrototypeOf`
+ |
+
+
+
+ [[SetPrototypeOf]]
+ |
+
+ `setPrototypeOf`
+ |
+
+
+
+ [[IsExtensible]]
+ |
+
+ `isExtensible`
+ |
+
+
+
+ [[PreventExtensions]]
+ |
+
+ `preventExtensions`
+ |
+
+
+
+ [[GetOwnProperty]]
+ |
+
+ `getOwnPropertyDescriptor`
+ |
+
+
+
+ [[DefineOwnProperty]]
+ |
+
+ `defineProperty`
+ |
+
+
+
+ [[HasProperty]]
+ |
+
+ `has`
+ |
+
+
+
+ [[Get]]
+ |
+
+ `get`
+ |
+
+
+
+ [[Set]]
+ |
+
+ `set`
+ |
+
+
+
+ [[Delete]]
+ |
+
+ `deleteProperty`
+ |
+
+
+
+ [[OwnPropertyKeys]]
+ |
+
+ `ownKeys`
+ |
+
+
+
+ [[Call]]
+ |
+
+ `apply`
+ |
+
+
+
+ [[Construct]]
+ |
+
+ `construct`
+ |
+
+
+
+
+ When a handler method is called to provide the implementation of a proxy object internal method, the handler method is passed the proxy's target object as a parameter. A proxy's handler object does not necessarily have a method corresponding to every essential internal method. Invoking an internal method on the proxy results in the invocation of the corresponding internal method on the proxy's target object if the handler object does not have a method corresponding to the internal trap.
+ The [[ProxyHandler]] and [[ProxyTarget]] internal slots of a proxy object are always initialized when the object is created and typically may not be modified. Some proxy objects are created in a manner that permits them to be subsequently revoked. When a proxy is revoked, its [[ProxyHandler]] and [[ProxyTarget]] internal slots are set to *null* causing subsequent invocations of internal methods on that proxy object to throw a *TypeError* exception.
+ Because proxy objects permit the implementation of internal methods to be provided by arbitrary ECMAScript code, it is possible to define a proxy object whose handler methods violates the invariants defined in . Some of the internal method invariants defined in are essential integrity invariants. These invariants are explicitly enforced by the proxy object internal methods specified in this section. An ECMAScript implementation must be robust in the presence of all possible invariant violations.
+ In the following algorithm descriptions, assume _O_ is an ECMAScript proxy object, _P_ is a property key value, _V_ is any ECMAScript language value and _Desc_ is a Property Descriptor record.
+
+
+
+ [[GetPrototypeOf]] ( )
+ When the [[GetPrototypeOf]] internal method of a Proxy exotic object _O_ is called, the following steps are taken:
+
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"getPrototypeOf"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? _target_.[[GetPrototypeOf]]().
+ 1. Let _handlerProto_ be ? Call(_trap_, _handler_, « _target_ »).
+ 1. If Type(_handlerProto_) is neither Object nor Null, throw a *TypeError* exception.
+ 1. Let _extensibleTarget_ be ? IsExtensible(_target_).
+ 1. If _extensibleTarget_ is *true*, return _handlerProto_.
+ 1. Let _targetProto_ be ? _target_.[[GetPrototypeOf]]().
+ 1. If SameValue(_handlerProto_, _targetProto_) is *false*, throw a *TypeError* exception.
+ 1. Return _handlerProto_.
+
+
+ [[GetPrototypeOf]] for proxy objects enforces the following invariants:
+
+ -
+ The result of [[GetPrototypeOf]] must be either an Object or *null*.
+
+ -
+ If the target object is not extensible, [[GetPrototypeOf]] applied to the proxy object must return the same value as [[GetPrototypeOf]] applied to the proxy object's target object.
+
+
+
+
+
+
+
+ [[SetPrototypeOf]] ( _V_ )
+ When the [[SetPrototypeOf]] internal method of a Proxy exotic object _O_ is called with argument _V_, the following steps are taken:
+
+ 1. Assert: Either Type(_V_) is Object or Type(_V_) is Null.
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"setPrototypeOf"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? _target_.[[SetPrototypeOf]](_V_).
+ 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _V_ »)).
+ 1. If _booleanTrapResult_ is *false*, return *false*.
+ 1. Let _extensibleTarget_ be ? IsExtensible(_target_).
+ 1. If _extensibleTarget_ is *true*, return *true*.
+ 1. Let _targetProto_ be ? _target_.[[GetPrototypeOf]]().
+ 1. If SameValue(_V_, _targetProto_) is *false*, throw a *TypeError* exception.
+ 1. Return *true*.
+
+
+ [[SetPrototypeOf]] for proxy objects enforces the following invariants:
+
+ -
+ The result of [[SetPrototypeOf]] is a Boolean value.
+
+ -
+ If the target object is not extensible, the argument value must be the same as the result of [[GetPrototypeOf]] applied to target object.
+
+
+
+
+
+
+
+ [[IsExtensible]] ( )
+ When the [[IsExtensible]] internal method of a Proxy exotic object _O_ is called, the following steps are taken:
+
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"isExtensible"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? _target_.[[IsExtensible]]().
+ 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_ »)).
+ 1. Let _targetResult_ be ? _target_.[[IsExtensible]]().
+ 1. If SameValue(_booleanTrapResult_, _targetResult_) is *false*, throw a *TypeError* exception.
+ 1. Return _booleanTrapResult_.
+
+
+ [[IsExtensible]] for proxy objects enforces the following invariants:
+
+ -
+ The result of [[IsExtensible]] is a Boolean value.
+
+ -
+ [[IsExtensible]] applied to the proxy object must return the same value as [[IsExtensible]] applied to the proxy object's target object with the same argument.
+
+
+
+
+
+
+
+ [[PreventExtensions]] ( )
+ When the [[PreventExtensions]] internal method of a Proxy exotic object _O_ is called, the following steps are taken:
+
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"preventExtensions"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? _target_.[[PreventExtensions]]().
+ 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_ »)).
+ 1. If _booleanTrapResult_ is *true*, then
+ 1. Let _targetIsExtensible_ be ? _target_.[[IsExtensible]]().
+ 1. If _targetIsExtensible_ is *true*, throw a *TypeError* exception.
+ 1. Return _booleanTrapResult_.
+
+
+ [[PreventExtensions]] for proxy objects enforces the following invariants:
+
+ -
+ The result of [[PreventExtensions]] is a Boolean value.
+
+ -
+ [[PreventExtensions]] applied to the proxy object only returns *true* if [[IsExtensible]] applied to the proxy object's target object is *false*.
+
+
+
+
+
+
+
+ [[GetOwnProperty]] ( _P_ )
+ When the [[GetOwnProperty]] internal method of a Proxy exotic object _O_ is called with property key _P_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"getOwnPropertyDescriptor"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? _target_.[[GetOwnProperty]](_P_).
+ 1. Let _trapResultObj_ be ? Call(_trap_, _handler_, « _target_, _P_ »).
+ 1. If Type(_trapResultObj_) is neither Object nor Undefined, throw a *TypeError* exception.
+ 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_).
+ 1. If _trapResultObj_ is *undefined*, then
+ 1. If _targetDesc_ is *undefined*, return *undefined*.
+ 1. If _targetDesc_.[[Configurable]] is *false*, throw a *TypeError* exception.
+ 1. Let _extensibleTarget_ be ? IsExtensible(_target_).
+ 1. Assert: Type(_extensibleTarget_) is Boolean.
+ 1. If _extensibleTarget_ is *false*, throw a *TypeError* exception.
+ 1. Return *undefined*.
+ 1. Let _extensibleTarget_ be ? IsExtensible(_target_).
+ 1. Let _resultDesc_ be ? ToPropertyDescriptor(_trapResultObj_).
+ 1. Call CompletePropertyDescriptor(_resultDesc_).
+ 1. Let _valid_ be IsCompatiblePropertyDescriptor(_extensibleTarget_, _resultDesc_, _targetDesc_).
+ 1. If _valid_ is *false*, throw a *TypeError* exception.
+ 1. If _resultDesc_.[[Configurable]] is *false*, then
+ 1. If _targetDesc_ is *undefined* or _targetDesc_.[[Configurable]] is *true*, then
+ 1. Throw a *TypeError* exception.
+ 1. Return _resultDesc_.
+
+
+ [[GetOwnProperty]] for proxy objects enforces the following invariants:
+
+ -
+ The result of [[GetOwnProperty]] must be either an Object or *undefined*.
+
+ -
+ A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.
+
+ -
+ A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.
+
+ -
+ A property cannot be reported as existent, if it does not exist as an own property of the target object and the target object is not extensible.
+
+ -
+ A property cannot be reported as non-configurable, if it does not exist as an own property of the target object or if it exists as a configurable own property of the target object.
+
+
+
+
+
+
+
+ [[DefineOwnProperty]] ( _P_, _Desc_ )
+ When the [[DefineOwnProperty]] internal method of a Proxy exotic object _O_ is called with property key _P_ and Property Descriptor _Desc_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"defineProperty"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? _target_.[[DefineOwnProperty]](_P_, _Desc_).
+ 1. Let _descObj_ be FromPropertyDescriptor(_Desc_).
+ 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_, _descObj_ »)).
+ 1. If _booleanTrapResult_ is *false*, return *false*.
+ 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_).
+ 1. Let _extensibleTarget_ be ? IsExtensible(_target_).
+ 1. If _Desc_ has a [[Configurable]] field and if _Desc_.[[Configurable]] is *false*, then
+ 1. Let _settingConfigFalse_ be *true*.
+ 1. Else, let _settingConfigFalse_ be *false*.
+ 1. If _targetDesc_ is *undefined*, then
+ 1. If _extensibleTarget_ is *false*, throw a *TypeError* exception.
+ 1. If _settingConfigFalse_ is *true*, throw a *TypeError* exception.
+ 1. Else _targetDesc_ is not *undefined*,
+ 1. If IsCompatiblePropertyDescriptor(_extensibleTarget_, _Desc_, _targetDesc_) is *false*, throw a *TypeError* exception.
+ 1. If _settingConfigFalse_ is *true* and _targetDesc_.[[Configurable]] is *true*, throw a *TypeError* exception.
+ 1. Return *true*.
+
+
+ [[DefineOwnProperty]] for proxy objects enforces the following invariants:
+
+ -
+ The result of [[DefineOwnProperty]] is a Boolean value.
+
+ -
+ A property cannot be added, if the target object is not extensible.
+
+ -
+ A property cannot be non-configurable, unless there exists a corresponding non-configurable own property of the target object.
+
+ -
+ If a property has a corresponding target object property then applying the Property Descriptor of the property to the target object using [[DefineOwnProperty]] will not throw an exception.
+
+
+
+
+
+
+
+ [[HasProperty]] ( _P_ )
+ When the [[HasProperty]] internal method of a Proxy exotic object _O_ is called with property key _P_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"has"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? _target_.[[HasProperty]](_P_).
+ 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_ »)).
+ 1. If _booleanTrapResult_ is *false*, then
+ 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_).
+ 1. If _targetDesc_ is not *undefined*, then
+ 1. If _targetDesc_.[[Configurable]] is *false*, throw a *TypeError* exception.
+ 1. Let _extensibleTarget_ be ? IsExtensible(_target_).
+ 1. If _extensibleTarget_ is *false*, throw a *TypeError* exception.
+ 1. Return _booleanTrapResult_.
+
+
+ [[HasProperty]] for proxy objects enforces the following invariants:
+
+ -
+ The result of [[HasProperty]] is a Boolean value.
+
+ -
+ A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.
+
+ -
+ A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.
+
+
+
+
+
+
+
+ [[Get]] ( _P_, _Receiver_ )
+ When the [[Get]] internal method of a Proxy exotic object _O_ is called with property key _P_ and ECMAScript language value _Receiver_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"get"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? _target_.[[Get]](_P_, _Receiver_).
+ 1. Let _trapResult_ be ? Call(_trap_, _handler_, « _target_, _P_, _Receiver_ »).
+ 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_).
+ 1. If _targetDesc_ is not *undefined* and _targetDesc_.[[Configurable]] is *false*, then
+ 1. If IsDataDescriptor(_targetDesc_) is *true* and _targetDesc_.[[Writable]] is *false*, then
+ 1. If SameValue(_trapResult_, _targetDesc_.[[Value]]) is *false*, throw a *TypeError* exception.
+ 1. If IsAccessorDescriptor(_targetDesc_) is *true* and _targetDesc_.[[Get]] is *undefined*, then
+ 1. If _trapResult_ is not *undefined*, throw a *TypeError* exception.
+ 1. Return _trapResult_.
+
+
+ [[Get]] for proxy objects enforces the following invariants:
+
+ -
+ The value reported for a property must be the same as the value of the corresponding target object property if the target object property is a non-writable, non-configurable own data property.
+
+ -
+ The value reported for a property must be *undefined* if the corresponding target object property is a non-configurable own accessor property that has *undefined* as its [[Get]] attribute.
+
+
+
+
+
+
+
+ [[Set]] ( _P_, _V_, _Receiver_ )
+ When the [[Set]] internal method of a Proxy exotic object _O_ is called with property key _P_, value _V_, and ECMAScript language value _Receiver_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"set"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? _target_.[[Set]](_P_, _V_, _Receiver_).
+ 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_, _V_, _Receiver_ »)).
+ 1. If _booleanTrapResult_ is *false*, return *false*.
+ 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_).
+ 1. If _targetDesc_ is not *undefined* and _targetDesc_.[[Configurable]] is *false*, then
+ 1. If IsDataDescriptor(_targetDesc_) is *true* and _targetDesc_.[[Writable]] is *false*, then
+ 1. If SameValue(_V_, _targetDesc_.[[Value]]) is *false*, throw a *TypeError* exception.
+ 1. If IsAccessorDescriptor(_targetDesc_) is *true*, then
+ 1. If _targetDesc_.[[Set]] is *undefined*, throw a *TypeError* exception.
+ 1. Return *true*.
+
+
+ [[Set]] for proxy objects enforces the following invariants:
+
+ -
+ The result of [[Set]] is a Boolean value.
+
+ -
+ Cannot change the value of a property to be different from the value of the corresponding target object property if the corresponding target object property is a non-writable, non-configurable own data property.
+
+ -
+ Cannot set the value of a property if the corresponding target object property is a non-configurable own accessor property that has *undefined* as its [[Set]] attribute.
+
+
+
+
+
+
+
+ [[Delete]] ( _P_ )
+ When the [[Delete]] internal method of a Proxy exotic object _O_ is called with property key _P_, the following steps are taken:
+
+ 1. Assert: IsPropertyKey(_P_) is *true*.
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"deleteProperty"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? _target_.[[Delete]](_P_).
+ 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_ »)).
+ 1. If _booleanTrapResult_ is *false*, return *false*.
+ 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_).
+ 1. If _targetDesc_ is *undefined*, return *true*.
+ 1. If _targetDesc_.[[Configurable]] is *false*, throw a *TypeError* exception.
+ 1. Return *true*.
+
+
+ [[Delete]] for proxy objects enforces the following invariants:
+
+ -
+ The result of [[Delete]] is a Boolean value.
+
+ -
+ A property cannot be reported as deleted, if it exists as a non-configurable own property of the target object.
+
+
+
+
+
+
+
+ [[OwnPropertyKeys]] ( )
+ When the [[OwnPropertyKeys]] internal method of a Proxy exotic object _O_ is called, the following steps are taken:
+
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"ownKeys"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? _target_.[[OwnPropertyKeys]]().
+ 1. Let _trapResultArray_ be ? Call(_trap_, _handler_, « _target_ »).
+ 1. Let _trapResult_ be ? CreateListFromArrayLike(_trapResultArray_, « String, Symbol »).
+ 1. If _trapResult_ contains any duplicate entries, throw a *TypeError* exception.
+ 1. Let _extensibleTarget_ be ? IsExtensible(_target_).
+ 1. Let _targetKeys_ be ? _target_.[[OwnPropertyKeys]]().
+ 1. Assert: _targetKeys_ is a List containing only String and Symbol values.
+ 1. Assert: _targetKeys_ contains no duplicate entries.
+ 1. Let _targetConfigurableKeys_ be a new empty List.
+ 1. Let _targetNonconfigurableKeys_ be a new empty List.
+ 1. For each element _key_ of _targetKeys_, do
+ 1. Let _desc_ be ? _target_.[[GetOwnProperty]](_key_).
+ 1. If _desc_ is not *undefined* and _desc_.[[Configurable]] is *false*, then
+ 1. Append _key_ as an element of _targetNonconfigurableKeys_.
+ 1. Else,
+ 1. Append _key_ as an element of _targetConfigurableKeys_.
+ 1. If _extensibleTarget_ is *true* and _targetNonconfigurableKeys_ is empty, then
+ 1. Return _trapResult_.
+ 1. Let _uncheckedResultKeys_ be a new List which is a copy of _trapResult_.
+ 1. For each _key_ that is an element of _targetNonconfigurableKeys_, do
+ 1. If _key_ is not an element of _uncheckedResultKeys_, throw a *TypeError* exception.
+ 1. Remove _key_ from _uncheckedResultKeys_.
+ 1. If _extensibleTarget_ is *true*, return _trapResult_.
+ 1. For each _key_ that is an element of _targetConfigurableKeys_, do
+ 1. If _key_ is not an element of _uncheckedResultKeys_, throw a *TypeError* exception.
+ 1. Remove _key_ from _uncheckedResultKeys_.
+ 1. If _uncheckedResultKeys_ is not empty, throw a *TypeError* exception.
+ 1. Return _trapResult_.
+
+
+ [[OwnPropertyKeys]] for proxy objects enforces the following invariants:
+
+ -
+ The result of [[OwnPropertyKeys]] is a List.
+
+ -
+ The returned List contains no duplicate entries.
+
+ -
+ The Type of each result List element is either String or Symbol.
+
+ -
+ The result List must contain the keys of all non-configurable own properties of the target object.
+
+ -
+ If the target object is not extensible, then the result List must contain all the keys of the own properties of the target object and no other values.
+
+
+
+
+
+
+
+ [[Call]] ( _thisArgument_, _argumentsList_ )
+ The [[Call]] internal method of a Proxy exotic object _O_ is called with parameters _thisArgument_ and _argumentsList_, a List of ECMAScript language values. The following steps are taken:
+
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"apply"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Return ? Call(_target_, _thisArgument_, _argumentsList_).
+ 1. Let _argArray_ be CreateArrayFromList(_argumentsList_).
+ 1. Return ? Call(_trap_, _handler_, « _target_, _thisArgument_, _argArray_ »).
+
+
+ A Proxy exotic object only has a [[Call]] internal method if the initial value of its [[ProxyTarget]] internal slot is an object that has a [[Call]] internal method.
+
+
+
+
+
+ [[Construct]] ( _argumentsList_, _newTarget_ )
+ The [[Construct]] internal method of a Proxy exotic object _O_ is called with parameters _argumentsList_ which is a possibly empty List of ECMAScript language values and _newTarget_. The following steps are taken:
+
+ 1. Let _handler_ be _O_.[[ProxyHandler]].
+ 1. If _handler_ is *null*, throw a *TypeError* exception.
+ 1. Assert: Type(_handler_) is Object.
+ 1. Let _target_ be _O_.[[ProxyTarget]].
+ 1. Let _trap_ be ? GetMethod(_handler_, `"construct"`).
+ 1. If _trap_ is *undefined*, then
+ 1. Assert: IsConstructor(_target_) is *true*.
+ 1. Return ? Construct(_target_, _argumentsList_, _newTarget_).
+ 1. Let _argArray_ be CreateArrayFromList(_argumentsList_).
+ 1. Let _newObj_ be ? Call(_trap_, _handler_, « _target_, _argArray_, _newTarget_ »).
+ 1. If Type(_newObj_) is not Object, throw a *TypeError* exception.
+ 1. Return _newObj_.
+
+
+ A Proxy exotic object only has a [[Construct]] internal method if the initial value of its [[ProxyTarget]] internal slot is an object that has a [[Construct]] internal method.
+
+
+ [[Construct]] for proxy objects enforces the following invariants:
+
+ -
+ The result of [[Construct]] must be an Object.
+
+
+
+
+
+
+
+ ProxyCreate ( _target_, _handler_ )
+ The abstract operation ProxyCreate with arguments _target_ and _handler_ is used to specify the creation of new Proxy exotic objects. It performs the following steps:
+
+ 1. If Type(_target_) is not Object, throw a *TypeError* exception.
+ 1. If _target_ is a Proxy exotic object and _target_.[[ProxyHandler]] is *null*, throw a *TypeError* exception.
+ 1. If Type(_handler_) is not Object, throw a *TypeError* exception.
+ 1. If _handler_ is a Proxy exotic object and _handler_.[[ProxyHandler]] is *null*, throw a *TypeError* exception.
+ 1. Let _P_ be a newly created object.
+ 1. Set _P_'s essential internal methods (except for [[Call]] and [[Construct]]) to the definitions specified in .
+ 1. If IsCallable(_target_) is *true*, then
+ 1. Set _P_.[[Call]] as specified in .
+ 1. If IsConstructor(_target_) is *true*, then
+ 1. Set _P_.[[Construct]] as specified in .
+ 1. Set _P_.[[ProxyTarget]] to _target_.
+ 1. Set _P_.[[ProxyHandler]] to _handler_.
+ 1. Return _P_.
+
+
+
\ No newline at end of file