Changeset 260312 in webkit
- Timestamp:
- Apr 18, 2020 9:01:02 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r260289 r260312 1 2020-04-18 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 RegExp.prototype[@@search] should use SameValue 4 https://bugs.webkit.org/show_bug.cgi?id=173226 5 6 Reviewed by Yusuke Suzuki. 7 8 * stress/same-value-intrinsic.js: Added. 9 * test262/expectations.yaml: Mark 4 test cases as passing. 10 1 11 2020-04-17 Saam Barati <sbarati@apple.com> 2 12 -
trunk/JSTests/test262/expectations.yaml
r260273 r260312 1658 1658 default: 'Test262Error: Expected SameValue(«�», «null») to be true' 1659 1659 strict mode: 'Test262Error: Expected SameValue(«�», «null») to be true' 1660 test/built-ins/RegExp/prototype/Symbol.search/set-lastindex-init-samevalue.js:1661 default: 'Test262Error: Expected SameValue(«-0», «0») to be true'1662 strict mode: 'Test262Error: Expected SameValue(«-0», «0») to be true'1663 test/built-ins/RegExp/prototype/Symbol.search/set-lastindex-restore-samevalue.js:1664 default: 'Test262Error: Expected SameValue(«-0», «0») to be true'1665 strict mode: 'Test262Error: Expected SameValue(«-0», «0») to be true'1666 1660 test/built-ins/RegExp/prototype/Symbol.search/u-lastindex-advance.js: 1667 1661 default: 'Test262Error: Expected SameValue(«1», «-1») to be true' -
trunk/Source/JavaScriptCore/ChangeLog
r260310 r260312 1 2020-04-18 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 RegExp.prototype[@@search] should use SameValue 4 https://bugs.webkit.org/show_bug.cgi?id=173226 5 6 Reviewed by Yusuke Suzuki. 7 8 This change exposes Object.is implementation as link-time-constant @sameValue and utilizes 9 it in RegExp.prototype[@@search] per spec [1], aligning JSC with V8 and SpiderMonkey. 10 11 [1]: https://tc39.es/ecma262/#sec-regexp.prototype-@@search (steps 5, 8) 12 13 * builtins/BuiltinNames.h: 14 * builtins/RegExpPrototype.js: 15 (Symbol.search): 16 * bytecode/LinkTimeConstant.h: 17 * runtime/JSGlobalObject.cpp: 18 (JSC::JSGlobalObject::init): 19 * runtime/ObjectConstructor.cpp: 20 * runtime/ObjectConstructor.h: 21 1 22 2020-04-18 Angelos Oikonomopoulos <angelos@igalia.com> 2 23 -
trunk/Source/JavaScriptCore/builtins/BuiltinNames.h
r260273 r260312 123 123 macro(isArraySlow) \ 124 124 macro(isConstructor) \ 125 macro(sameValue) \ 125 126 macro(concatMemcpy) \ 126 127 macro(appendMemcpy) \ -
trunk/Source/JavaScriptCore/builtins/RegExpPrototype.js
r259029 r260312 404 404 var previousLastIndex = regexp.lastIndex; 405 405 406 // 5. If SameValue(previousLastIndex, 0) is false, then406 // 5. If SameValue(previousLastIndex, 0) is false, then 407 407 // 5.a. Perform ? Set(rx, "lastIndex", 0, true). 408 // FIXME: Add SameValue support. https://bugs.webkit.org/show_bug.cgi?id=173226 409 if (previousLastIndex !== 0) 408 if (!@sameValue(previousLastIndex, 0)) 410 409 regexp.lastIndex = 0; 411 410 … … 416 415 // 8. If SameValue(currentLastIndex, previousLastIndex) is false, then 417 416 // 8.a. Perform ? Set(rx, "lastIndex", previousLastIndex, true). 418 // FIXME: Add SameValue support. https://bugs.webkit.org/show_bug.cgi?id=173226 419 if (regexp.lastIndex !== previousLastIndex) 417 if (!@sameValue(regexp.lastIndex, previousLastIndex)) 420 418 regexp.lastIndex = previousLastIndex; 421 419 -
trunk/Source/JavaScriptCore/bytecode/LinkTimeConstant.h
r260273 r260312 75 75 v(thisTimeValue, nullptr) \ 76 76 v(isConstructor, nullptr) \ 77 v(sameValue, nullptr) \ 77 78 v(regExpProtoFlagsGetter, nullptr) \ 78 79 v(regExpProtoGlobalGetter, nullptr) \ -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r260273 r260312 1136 1136 init.set(JSFunction::create(init.vm, jsCast<JSGlobalObject*>(init.owner), 1, String(), esSpecIsConstructor, NoIntrinsic)); 1137 1137 }); 1138 m_linkTimeConstants[static_cast<unsigned>(LinkTimeConstant::sameValue)].initLater([] (const Initializer<JSCell>& init) { 1139 init.set(JSFunction::create(init.vm, jsCast<JSGlobalObject*>(init.owner), 2, String(), objectConstructorIs, ObjectIsIntrinsic)); 1140 }); 1138 1141 1139 1142 // RegExp.prototype helpers. -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
r254626 r260312 55 55 EncodedJSValue JSC_HOST_CALL objectConstructorIsFrozen(JSGlobalObject*, CallFrame*); 56 56 EncodedJSValue JSC_HOST_CALL objectConstructorIsExtensible(JSGlobalObject*, CallFrame*); 57 EncodedJSValue JSC_HOST_CALL objectConstructorIs(JSGlobalObject*, CallFrame*);58 57 59 58 } -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h
r253019 r260312 126 126 bool toPropertyDescriptor(JSGlobalObject*, JSValue, PropertyDescriptor&); 127 127 128 EncodedJSValue JSC_HOST_CALL objectConstructorIs(JSGlobalObject*, CallFrame*); 129 128 130 } // namespace JSC
Note: See TracChangeset
for help on using the changeset viewer.