Skip to content

Commit

Permalink
Fix conversion of RIA following If.
Browse files Browse the repository at this point in the history
  • Loading branch information
bterlson committed Oct 27, 2015
1 parent ab7183c commit fcb4a71
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -4509,7 +4509,8 @@ <h1>IteratorNext ( _iterator_, _value_ )</h1>
1. If _value_ was not passed, then
1. Let _result_ be Invoke(_iterator_, `"next"`, &laquo; &raquo;).
1. Else,
1. Let _result_ be ?Invoke(_iterator_, `"next"`, &laquo;_value_&raquo;).
1. Let _result_ be Invoke(_iterator_, `"next"`, &laquo;_value_&raquo;).
1. ReturnIfAbrupt(_result_).
1. If Type(_result_) is not Object, throw a *TypeError* exception.
1. Return _result_.
</emu-alg>
Expand Down Expand Up @@ -19491,7 +19492,8 @@ <h1>Runtime Semantics: GlobalDeclarationInstantiation (_script_, _env_)</h1>
1. If IsConstantDeclaration of _d_ is *true*, then
1. Let _status_ be _envRec_.CreateImmutableBinding(_dn_, *true*).
1. Else,
1. Let _status_ be ?_envRec_.CreateMutableBinding(_dn_, *false*).
1. Let _status_ be _envRec_.CreateMutableBinding(_dn_, *false*).
1. ReturnIfAbrupt(_status_).
1. For each production _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 _env_.
Expand Down Expand Up @@ -21605,7 +21607,8 @@ <h1>Runtime Semantics: EvalDeclarationInstantiation( _body_, _varEnv_, _lexEnv_,
1. If IsConstantDeclaration of _d_ is *true*, then
1. Let _status_ be _lexEnvRec_.CreateImmutableBinding(_dn_, *true*).
1. Else,
1. Let _status_ be ?_lexEnvRec_.CreateMutableBinding(_dn_, *false*).
1. Let _status_ be _lexEnvRec_.CreateMutableBinding(_dn_, *false*).
1. ReturnIfAbrupt(_status_).
1. For each production _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_.
Expand Down Expand Up @@ -25404,7 +25407,8 @@ <h1>Date ( _value_ )</h1>
1. If Type(_v_) is String, then
1. Let _tv_ be the result of parsing _v_ as a date, in exactly the same manner as for the `parse` method (<emu-xref href="#sec-date.parse"></emu-xref>). If the parse resulted in an abrupt completion, _tv_ is the Completion Record.
1. Else,
1. Let _tv_ be ?ToNumber(_v_).
1. Let _tv_ be ToNumber(_v_).
1. ReturnIfAbrupt(_tv_).
1. Let _O_ be ?OrdinaryCreateFromConstructor(NewTarget, `"%DatePrototype%"`, &laquo; [[DateValue]]&raquo;).
1. Set the [[DateValue]] internal slot of _O_ to TimeClip(_tv_).
1. Return _O_.
Expand Down Expand Up @@ -26162,7 +26166,8 @@ <h1>String ( _value_ )</h1>
1. If no arguments were passed to this function invocation, let _s_ be `""`.
1. Else,
1. If NewTarget is *undefined* and Type(_value_) is Symbol, return SymbolDescriptiveString(_value_).
1. Let _s_ be ?ToString(_value_).
1. Let _s_ be ToString(_value_).
1. ReturnIfAbrupt(_s_).
1. If NewTarget is *undefined*, return _s_.
1. Return StringCreate(_s_, GetPrototypeFromConstructor(NewTarget, `"%StringPrototype%"`)).
</emu-alg>
Expand Down Expand Up @@ -29004,7 +29009,8 @@ <h1>RegExp.prototype [ @@replace ] ( _string_, _replaceValue_ )</h1>
1. Let _replValue_ be Call(_replaceValue_, *undefined*, _replacerArgs_).
1. Let _replacement_ be ToString(_replValue_).
1. Else,
1. Let _replacement_ be ?GetSubstitution(_matched_, _S_, _position_, _captures_, _replaceValue_).
1. Let _replacement_ be GetSubstitution(_matched_, _S_, _position_, _captures_, _replaceValue_).
1. ReturnIfAbrupt(_replacement_).
1. If _position_ &ge; _nextSourcePosition_, then
1. NOTE _position_ should not normally move backwards. If it does, it is an indication of an ill-behaving RegExp subclass or use of an access triggered side-effect to change the global flag or other characteristics of _rx_. In such cases, the corresponding substitution is ignored.
1. Let _accumulatedResult_ be the String formed by concatenating the code units of the current value of _accumulatedResult_ with the substring of _S_ consisting of the code units from _nextSourcePosition_ (inclusive) up to _position_ (exclusive) and with the code units of _replacement_.
Expand Down Expand Up @@ -29303,7 +29309,8 @@ <h1>Array.from ( _items_ [ , _mapfn_ [ , _thisArg_ ] ] )</h1>
1. If IsConstructor(_C_) is *true*, then
1. Let _A_ be Construct(_C_).
1. Else,
1. Let _A_ be ?ArrayCreate(0).
1. Let _A_ be ArrayCreate(0).
1. ReturnIfAbrupt(_A_).
1. Let _iterator_ be ?GetIterator(_items_, _usingIterator_).
1. Let _k_ be 0.
1. Repeat
Expand All @@ -29327,7 +29334,8 @@ <h1>Array.from ( _items_ [ , _mapfn_ [ , _thisArg_ ] ] )</h1>
1. If IsConstructor(_C_) is *true*, then
1. Let _A_ be Construct(_C_, &laquo;_len_&raquo;).
1. Else,
1. Let _A_ be ?ArrayCreate(_len_).
1. Let _A_ be ArrayCreate(_len_).
1. ReturnIfAbrupt(_A_).
1. Let _k_ be 0.
1. Repeat, while _k_ &lt; _len_
1. Let _Pk_ be ToString(_k_).
Expand Down Expand Up @@ -29366,7 +29374,8 @@ <h1>Array.of ( ..._items_ )</h1>
1. If IsConstructor(_C_) is *true*, then
1. Let _A_ be Construct(_C_, &laquo;_len_&raquo;).
1. Else,
1. Let _A_ be ?ArrayCreate(_len_).
1. Let _A_ be ArrayCreate(_len_).
1. ReturnIfAbrupt(_A_).
1. Let _k_ be 0.
1. Repeat, while _k_ &lt; _len_
1. Let _kValue_ be _items_[_k_].
Expand Down

0 comments on commit fcb4a71

Please sign in to comment.