Skip to content

Commit

Permalink
More suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdyck authored and michaelficarra committed Aug 18, 2021
1 parent 572050d commit e27dc5e
Showing 1 changed file with 22 additions and 40 deletions.
62 changes: 22 additions & 40 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -4339,13 +4339,12 @@ <h1>Data Blocks</h1>
<emu-clause id="sec-createbytedatablock" type="abstract operation">
<h1>
CreateByteDataBlock (
_size_: an integer,
_size_: a non-negative integer,
)
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: _size_ &ge; 0.
1. Let _db_ be a new Data Block value consisting of _size_ bytes. If it is impossible to create such a Data Block, throw a *RangeError* exception.
1. Set all of the bytes of _db_ to 0.
1. Return _db_.
Expand All @@ -4361,7 +4360,6 @@ <h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: _size_ &ge; 0.
1. Let _db_ be a new Shared Data Block value consisting of _size_ bytes. If it is impossible to create such a Shared Data Block, throw a *RangeError* exception.
1. Let _execution_ be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
1. Let _eventList_ be the [[EventList]] field of the element in _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
Expand All @@ -4375,17 +4373,17 @@ <h1>
<emu-clause id="sec-copydatablockbytes" type="abstract operation">
<h1>
CopyDataBlockBytes (
_toBlock_: unknown,
_toBlock_: a Data Block or a Shared Data Block,
_toIndex_: a non-negative integer,
_fromBlock_: unknown,
_fromBlock_: a Data Block or a Shared Data Block,
_fromIndex_: a non-negative integer,
_count_: a non-negative integer,
)
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: _fromBlock_ and _toBlock_ are distinct Data Block or Shared Data Block values.
1. Assert: _fromBlock_ and _toBlock_ are distinct values.
1. Let _fromSize_ be the number of bytes in _fromBlock_.
1. Assert: _fromIndex_ + _count_ &le; _fromSize_.
1. Let _toSize_ be the number of bytes in _toBlock_.
Expand Down Expand Up @@ -6250,9 +6248,9 @@ <h1>
<emu-clause id="sec-construct" type="abstract operation">
<h1>
Construct (
_F_: a function object,
_F_: a constructor,
optional _argumentsList_: unknown,
optional _newTarget_: unknown,
optional _newTarget_: a constructor,
)
</h1>
<dl class="header">
Expand All @@ -6262,8 +6260,6 @@ <h1>
<emu-alg>
1. If _newTarget_ is not present, set _newTarget_ to _F_.
1. If _argumentsList_ is not present, set _argumentsList_ to a new empty List.
1. Assert: IsConstructor(_F_) is *true*.
1. Assert: IsConstructor(_newTarget_) is *true*.
1. Return ? _F_.[[Construct]](_argumentsList_, _newTarget_).
</emu-alg>
<emu-note>
Expand Down Expand Up @@ -6497,13 +6493,12 @@ <h1>
<emu-clause id="sec-getfunctionrealm" type="abstract operation">
<h1>
GetFunctionRealm (
_obj_: unknown,
_obj_: a function object,
)
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: ! IsCallable(_obj_) is *true*.
1. If _obj_ has a [[Realm]] internal slot, then
1. Return _obj_.[[Realm]].
1. If _obj_ is a bound function exotic object, then
Expand Down Expand Up @@ -10874,6 +10869,7 @@ <h1>
<dd>It returns the value of its bound identifier whose name is the value of the argument _N_. However, if the binding is an indirect binding the value of the target binding is returned. If the binding exists but is uninitialized a *ReferenceError* is thrown.</dd>
</dl>
<emu-alg>
1. Assert: _S_ is *true*.
1. Assert: _envRec_ has a binding for _N_.
1. If the binding for _N_ is an indirect binding, then
1. Let _M_ and _N2_ be the indirection values provided when this binding for _N_ was created.
Expand Down Expand Up @@ -11265,7 +11261,7 @@ <h1>
<h1>
SetRealmGlobalObject (
_realmRec_: unknown,
_globalObj_: unknown,
_globalObj_: an Object or *undefined*,
_thisValue_: unknown,
)
</h1>
Expand Down Expand Up @@ -11620,7 +11616,6 @@ <h1>
</ul>
<p>The default implementation of HostMakeJobCallback performs the following steps when called:</p>
<emu-alg>
1. Assert: IsCallable(_callback_) is *true*.
1. Return the JobCallback Record { [[Callback]]: _callback_, [[HostDefined]]: ~empty~ }.
</emu-alg>
<p>ECMAScript hosts that are not web browsers must use the default implementation of HostMakeJobCallback.</p>
Expand Down Expand Up @@ -12091,13 +12086,12 @@ <h1>
<h1>
OrdinarySetPrototypeOf (
_O_: an Object,
_V_: an ECMAScript language value,
_V_: an Object or *null*,
)
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: Either Type(_V_) is Object or Type(_V_) is Null.
1. Let _current_ be _O_.[[Prototype]].
1. If SameValue(_V_, _current_) is *true*, return *true*.
1. Let _extensible_ be _O_.[[Extensible]].
Expand Down Expand Up @@ -12576,7 +12570,7 @@ <h1>
<emu-clause id="sec-getprototypefromconstructor" type="abstract operation">
<h1>
GetPrototypeFromConstructor (
_constructor_: unknown,
_constructor_: a function object,
_intrinsicDefaultProto_: a String,
)
</h1>
Expand All @@ -12586,7 +12580,6 @@ <h1>
</dl>
<emu-alg>
1. Assert: _intrinsicDefaultProto_ 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_).
Expand Down Expand Up @@ -14615,13 +14608,12 @@ <h1>
<h1>
SetImmutablePrototype (
_O_: unknown,
_V_: unknown,
_V_: an Object or *null*,
)
</h1>
<dl class="header">
</dl>
<emu-alg>
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*.
Expand Down Expand Up @@ -34465,7 +34457,7 @@ <h1>
<emu-clause id="sec-regexpinitialize" type="abstract operation">
<h1>
RegExpInitialize (
_obj_: an ECMAScript language value,
_obj_: an Object,
_pattern_: an ECMAScript language value,
_flags_: an ECMAScript language value,
)
Expand Down Expand Up @@ -39018,7 +39010,6 @@ <h1>
<dd>It creates a new ArrayBuffer whose data is a copy of _srcBuffer_'s data over the range starting at _srcByteOffset_ and continuing for _srcLength_ bytes.</dd>
</dl>
<emu-alg>
1. Assert: IsConstructor(_cloneConstructor_) is *true*.
1. Let _targetBuffer_ be ? AllocateArrayBuffer(_cloneConstructor_, _srcLength_).
1. If IsDetachedBuffer(_srcBuffer_) is *true*, throw a *TypeError* exception.
1. Let _srcBlock_ be _srcBuffer_.[[ArrayBufferData]].
Expand Down Expand Up @@ -42153,13 +42144,12 @@ <h1>Promise.all ( _iterable_ )</h1>
<emu-clause id="sec-getpromiseresolve" type="abstract operation">
<h1>
GetPromiseResolve (
_promiseConstructor_: unknown,
_promiseConstructor_: a constructor,
)
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: IsConstructor(_promiseConstructor_) is *true*.
1. Let _promiseResolve_ be ? Get(_promiseConstructor_, *"resolve"*).
1. If IsCallable(_promiseResolve_) is *false*, throw a *TypeError* exception.
1. Return _promiseResolve_.
Expand All @@ -42170,16 +42160,14 @@ <h1>
<h1>
PerformPromiseAll (
_iteratorRecord_: unknown,
_constructor_: unknown,
_constructor_: a constructor,
_resultCapability_: a PromiseCapability Record,
_promiseResolve_: unknown,
_promiseResolve_: a function object,
)
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: IsConstructor(_constructor_) is *true*.
1. Assert: IsCallable(_promiseResolve_) is *true*.
1. Let _values_ be a new empty List.
1. Let _remainingElementsCount_ be the Record { [[Value]]: 1 }.
1. Let _index_ be 0.
Expand Down Expand Up @@ -42260,16 +42248,14 @@ <h1>Promise.allSettled ( _iterable_ )</h1>
<h1>
PerformPromiseAllSettled (
_iteratorRecord_: unknown,
_constructor_: unknown,
_constructor_: a constructor,
_resultCapability_: a PromiseCapability Record,
_promiseResolve_: unknown,
_promiseResolve_: a function object,
)
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: ! IsConstructor(_constructor_) is *true*.
1. Assert: IsCallable(_promiseResolve_) is *true*.
1. Let _values_ be a new empty List.
1. Let _remainingElementsCount_ be the Record { [[Value]]: 1 }.
1. Let _index_ be 0.
Expand Down Expand Up @@ -42389,16 +42375,14 @@ <h1>Promise.any ( _iterable_ )</h1>
<h1>
PerformPromiseAny (
_iteratorRecord_: unknown,
_constructor_: unknown,
_constructor_: a constructor,
_resultCapability_: a PromiseCapability Record,
_promiseResolve_: unknown,
_promiseResolve_: a function object,
)
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: ! IsConstructor(_constructor_) is *true*.
1. Assert: ! IsCallable(_promiseResolve_) is *true*.
1. Let _errors_ be a new empty List.
1. Let _remainingElementsCount_ be the Record { [[Value]]: 1 }.
1. Let _index_ be 0.
Expand Down Expand Up @@ -42490,16 +42474,14 @@ <h1>Promise.race ( _iterable_ )</h1>
<h1>
PerformPromiseRace (
_iteratorRecord_: unknown,
_constructor_: unknown,
_constructor_: a constructor,
_resultCapability_: a PromiseCapability Record,
_promiseResolve_: unknown,
_promiseResolve_: a function object,
)
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: IsConstructor(_constructor_) is *true*.
1. Assert: IsCallable(_promiseResolve_) is *true*.
1. Repeat,
1. Let _next_ be IteratorStep(_iteratorRecord_).
1. If _next_ is an abrupt completion, set _iteratorRecord_.[[Done]] to *true*.
Expand Down

0 comments on commit e27dc5e

Please sign in to comment.