mirror of
https://github.com/tc39/test262.git
synced 2025-10-03 15:08:48 +02:00
The RegExpBuiltinExec internal operation was modified in March of 2016 [1]: instead of referencing the `global` and `sticky` properties of the "this" value, the algorithm now infers those values from the object's [[OriginalFlags]] internal slot. This change invalidated a number of tests. In cases where the change resulted in an observable behavior, update the tests to assert the latest specification text. In cases where the change removed a previously-observable behavior, remove the files completely. Specification text change set: > 1. Assert: Type(_S_) is String. > 1. Let _length_ be the number of code units in _S_. > 1. Let _lastIndex_ be ? ToLength(? Get(_R_, `"lastIndex"`)). > - 1. Let _global_ be ToBoolean(? Get(_R_, `"global"`)). > - 1. Let _sticky_ be ToBoolean(? Get(_R_, `"sticky"`)). > + 1. Let _flags_ be the value of _R_'s [[OriginalFlags]] internal slot. > + 1. If _flags_ contains `"g"`, let _global_ be *true*, else let _global_ be *false*. > + 1. If _flags_ contains `"y"`, let _sticky_ be *true*, else let _sticky_ be *false*. > 1. If _global_ is *false* and _sticky_ is *false*, let _lastIndex_ be 0. > 1. Let _matcher_ be the value of _R_'s [[RegExpMatcher]] internal slot. > - 1. Let _flags_ be the value of _R_'s [[OriginalFlags]] internal slot. > 1. If _flags_ contains `"u"`, let _fullUnicode_ be *true*, else let _fullUnicode_ be *false*. > 1. Let _matchSucceeded_ be *false*. > 1. Repeat, while _matchSucceeded_ is *false* [1] https://github.com/tc39/ecma262/pull/494