From fcb4a717083dab0e2a34480fab0736683c2c04fd Mon Sep 17 00:00:00 2001 From: Brian Terlson Date: Tue, 27 Oct 2015 15:31:31 -0700 Subject: [PATCH] Fix conversion of RIA following If. --- spec.html | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/spec.html b/spec.html index 5c644cc4982..d8d01da714f 100644 --- a/spec.html +++ b/spec.html @@ -4509,7 +4509,8 @@

IteratorNext ( _iterator_, _value_ )

1. If _value_ was not passed, then 1. Let _result_ be Invoke(_iterator_, `"next"`, « »). 1. Else, - 1. Let _result_ be ?Invoke(_iterator_, `"next"`, «_value_»). + 1. Let _result_ be Invoke(_iterator_, `"next"`, «_value_»). + 1. ReturnIfAbrupt(_result_). 1. If Type(_result_) is not Object, throw a *TypeError* exception. 1. Return _result_. @@ -19491,7 +19492,8 @@

Runtime Semantics: GlobalDeclarationInstantiation (_script_, _env_)

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_. @@ -21605,7 +21607,8 @@

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_. @@ -25404,7 +25407,8 @@

Date ( _value_ )

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 (). 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%"`, « [[DateValue]]»). 1. Set the [[DateValue]] internal slot of _O_ to TimeClip(_tv_). 1. Return _O_. @@ -26162,7 +26166,8 @@

String ( _value_ )

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%"`)). @@ -29004,7 +29009,8 @@

RegExp.prototype [ @@replace ] ( _string_, _replaceValue_ )

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_ ≥ _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_. @@ -29303,7 +29309,8 @@

Array.from ( _items_ [ , _mapfn_ [ , _thisArg_ ] ] )

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 @@ -29327,7 +29334,8 @@

Array.from ( _items_ [ , _mapfn_ [ , _thisArg_ ] ] )

1. If IsConstructor(_C_) is *true*, then 1. Let _A_ be Construct(_C_, «_len_»). 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_ < _len_ 1. Let _Pk_ be ToString(_k_). @@ -29366,7 +29374,8 @@

Array.of ( ..._items_ )

1. If IsConstructor(_C_) is *true*, then 1. Let _A_ be Construct(_C_, «_len_»). 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_ < _len_ 1. Let _kValue_ be _items_[_k_].