From ea69c471778307f0fe3306df8a8b441ff717cd2d Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Mon, 31 Jan 2022 17:46:21 -0800 Subject: [PATCH] if we do not consume the return value, return unused --- spec.html | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/spec.html b/spec.html index e99aeacda5..0d86a465e0 100644 --- a/spec.html +++ b/spec.html @@ -6285,7 +6285,7 @@

_O_: an Object, _P_: a property key, _V_: an ECMAScript language value, - ): a Completion Record normally containing a Boolean + ): a Completion Record normally containing ~unused~

description
@@ -6293,7 +6293,8 @@

1. Let _newDesc_ be the PropertyDescriptor { [[Value]]: _V_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }. - 1. Return ? _O_.[[DefineOwnProperty]](_P_, _newDesc_). + 1. Perform ? _O_.[[DefineOwnProperty]](_P_, _newDesc_). + 1. Return NormalCompletion(~unused~).

This abstract operation creates a property whose attributes are set to the same defaults used for built-in methods and methods defined using class declaration syntax. Normally, the property will not already exist. If it does exist and is not configurable or if _O_ is not extensible, [[DefineOwnProperty]] will return *false*.

@@ -6328,7 +6329,7 @@

_O_: an Object, _P_: a property key, _V_: an ECMAScript language value, - ): a Completion Record normally containing a Boolean + ): a Completion Record normally containing ~unused~

description
@@ -6336,7 +6337,8 @@

1. Let _newDesc_ be the PropertyDescriptor { [[Value]]: _V_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }. - 1. Return ? DefinePropertyOrThrow(_O_, _P_, _newDesc_). + 1. Perform ? DefinePropertyOrThrow(_O_, _P_, _newDesc_). + 1. Return NormalCompletion(~unused~).

This abstract operation creates a property whose attributes are set to the same defaults used for properties created by the ECMAScript language assignment operator except it is not enumerable. Normally, the property will not already exist. If it does exist and is not configurable or if _O_ is not extensible, [[DefineOwnProperty]] will return *false* causing this operation to throw a *TypeError* exception.

@@ -6349,7 +6351,7 @@

_O_: an Object, _P_: a property key, _desc_: a Property Descriptor, - ): a Completion Record normally containing a Boolean + ): a Completion Record normally containing ~unused~.

description
@@ -6358,7 +6360,7 @@

1. Let _success_ be ? _O_.[[DefineOwnProperty]](_P_, _desc_). 1. If _success_ is *false*, throw a *TypeError* exception. - 1. Return _success_. + 1. Return NormalCompletion(~unused~). @@ -6367,7 +6369,7 @@

DeletePropertyOrThrow ( _O_: an Object, _P_: a property key, - ): a Completion Record normally containing a Boolean + ): a Completion Record normally containing ~unused~

description
@@ -6376,7 +6378,7 @@

1. Let _success_ be ? _O_.[[Delete]](_P_). 1. If _success_ is *false*, throw a *TypeError* exception. - 1. Return _success_. + 1. Return ~unused~. @@ -10323,7 +10325,7 @@

CreateMutableBinding ( _N_: a String, _D_: a Boolean, - ): a Completion Record + ): a Completion Record normally containing ~unused~

for
@@ -10334,7 +10336,8 @@

1. Let _bindingObject_ be _envRec_.[[BindingObject]]. - 1. Return ? DefinePropertyOrThrow(_bindingObject_, _N_, PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _D_ }). + 1. Perform ? DefinePropertyOrThrow(_bindingObject_, _N_, PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _D_ }). + 1. Return NormalCompletion(~unused~).

Normally _envRec_ will not have a binding for _N_ but if it does, the semantics of DefinePropertyOrThrow may result in an existing binding being replaced or shadowed or cause an abrupt completion to be returned.

@@ -11601,16 +11604,15 @@

CreateRealm ( ): a Realm Record

CreateIntrinsics ( _realmRec_: unknown, - ): a Record + ): ~unused~

- 1. Let _intrinsics_ be a new Record. - 1. Set _realmRec_.[[Intrinsics]] to _intrinsics_. - 1. Set fields of _intrinsics_ with the values listed in . The field names are the names listed in column one of the table. The value of each field is a new object value fully and recursively populated with property values as defined by the specification of each object in clauses through . All object property values are newly created object values. All values that are built-in function objects are created by performing CreateBuiltinFunction(_steps_, _length_, _name_, _slots_, _realmRec_, _prototype_) where _steps_ is the definition of that function provided by this specification, _name_ is the initial value of the function's `name` property, _length_ is the initial value of the function's `length` property, _slots_ is a list of the names, if any, of the function's specified internal slots, and _prototype_ is the specified value of the function's [[Prototype]] internal slot. The creation of the intrinsics and their properties must be ordered to avoid any dependencies upon objects that have not yet been created. - 1. Perform AddRestrictedFunctionProperties(_intrinsics_.[[%Function.prototype%]], _realmRec_). - 1. Return _intrinsics_. + 1. Set _realmRec_.[[Intrinsics]] to a new Record. + 1. Set fields of _realmRec_.[[Intrinsics]] with the values listed in . The field names are the names listed in column one of the table. The value of each field is a new object value fully and recursively populated with property values as defined by the specification of each object in clauses through . All object property values are newly created object values. All values that are built-in function objects are created by performing CreateBuiltinFunction(_steps_, _length_, _name_, _slots_, _realmRec_, _prototype_) where _steps_ is the definition of that function provided by this specification, _name_ is the initial value of the function's `name` property, _length_ is the initial value of the function's `length` property, _slots_ is a list of the names, if any, of the function's specified internal slots, and _prototype_ is the specified value of the function's [[Prototype]] internal slot. The creation of the intrinsics and their properties must be ordered to avoid any dependencies upon objects that have not yet been created. + 1. Perform AddRestrictedFunctionProperties(_realmRec_.[[Intrinsics]].[[%Function.prototype%]], _realmRec_). + 1. Return ~unused~. @@ -28692,8 +28694,8 @@

1. Else, 1. Let _bindingExists_ be _varEnv_.HasBinding(_fn_). 1. If _bindingExists_ is *false*, then - 1. Let _status_ be ! _varEnv_.CreateMutableBinding(_fn_, *true*). - 1. Assert: _status_ is not an abrupt completion because of validation preceding step . + 1. NOTE: The following invocation cannot return an abrupt completion because of the validation preceding step . + 1. Perform ! _varEnv_.CreateMutableBinding(_fn_, *true*). 1. Perform ! _varEnv_.InitializeBinding(_fn_, _fo_). 1. Else, 1. Perform ! _varEnv_.SetMutableBinding(_fn_, _fo_, *false*). @@ -28703,8 +28705,8 @@

1. Else, 1. Let _bindingExists_ be _varEnv_.HasBinding(_vn_). 1. If _bindingExists_ is *false*, then - 1. Let _status_ be ! _varEnv_.CreateMutableBinding(_vn_, *true*). - 1. Assert: _status_ is not an abrupt completion because of validation preceding step . + 1. NOTE: The following invocation cannot return an abrupt completion because of the validation preceding step . + 1. Perform ! _varEnv_.CreateMutableBinding(_vn_, *true*). 1. Perform ! _varEnv_.InitializeBinding(_vn_, *undefined*). 1. Return NormalCompletion(~unused~).