WebKit Bugzilla
Attachment 372055 Details for
Bug 186694
: [ESNExt] String.prototype.matchAll
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186694-20190613185011.patch (text/plain), 23.90 KB, created by
Alexey Shvayka
on 2019-06-13 08:50:13 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alexey Shvayka
Created:
2019-06-13 08:50:13 PDT
Size:
23.90 KB
patch
obsolete
>Index: JSTests/ChangeLog >=================================================================== >--- JSTests/ChangeLog (revision 246397) >+++ JSTests/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2019-06-13 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ [ESNExt] String.prototype.matchAll >+ https://bugs.webkit.org/show_bug.cgi?id=186694 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Implement String.prototype.matchAll. >+ (https://tc39.es/ecma262/#sec-string.prototype.matchall) >+ >+ * test262/config.yaml: >+ > 2019-06-12 Yusuke Suzuki <ysuzuki@apple.com> > > [JSC] Polymorphic call stub's slow path should restore callee saves before performing tail call >Index: JSTests/test262/config.yaml >=================================================================== >--- JSTests/test262/config.yaml (revision 246067) >+++ JSTests/test262/config.yaml (working copy) >@@ -12,9 +12,6 @@ skip: > - BigInt > # https://bugs.webkit.org/show_bug.cgi?id=166693 > - async-iteration >- # https://bugs.webkit.org/show_bug.cgi?id=186694 >- - String.prototype.matchAll >- - Symbol.matchAll > # https://bugs.webkit.org/show_bug.cgi?id=174931 > - regexp-lookbehind > >Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 246302) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,37 @@ >+2019-06-13 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ [ESNExt] String.prototype.matchAll >+ https://bugs.webkit.org/show_bug.cgi?id=186694 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Implement String.prototype.matchAll. >+ (https://tc39.es/ecma262/#sec-string.prototype.matchall) >+ >+ Shipping in Chrome since version 73. >+ Shipping in Firefox since version 67. >+ >+ * CMakeLists.txt: >+ * DerivedSources.make: >+ * Sources.txt: >+ * builtins/BuiltinNames.h: >+ * builtins/RegExpPrototype.js: >+ (globalPrivate.RegExpStringIteratorConstructor): >+ (overriddenName.string_appeared_here.matchAll): >+ * builtins/RegExpStringIteratorPrototype.js: Added. >+ (next): >+ * builtins/StringPrototype.js: >+ (matchAll): >+ * runtime/CommonIdentifiers.h: >+ * runtime/JSGlobalObject.cpp: >+ (JSC::JSGlobalObject::init): >+ * runtime/RegExpPrototype.cpp: >+ (JSC::RegExpPrototype::finishCreation): >+ * runtime/RegExpStringIteratorPrototype.cpp: Added. >+ (JSC::RegExpStringIteratorPrototype::finishCreation): >+ * runtime/RegExpStringIteratorPrototype.h: Added. >+ * runtime/StringPrototype.cpp: >+ > 2019-06-10 Basuke Suzuki <Basuke.Suzuki@sony.com> > > [WinCairo] Remove build warning from RemoteInspector. >Index: Source/JavaScriptCore/CMakeLists.txt >=================================================================== >--- Source/JavaScriptCore/CMakeLists.txt (revision 246067) >+++ Source/JavaScriptCore/CMakeLists.txt (working copy) >@@ -88,6 +88,7 @@ set(JavaScriptCore_OBJECT_LUT_SOURCES > runtime/ReflectObject.cpp > runtime/RegExpConstructor.cpp > runtime/RegExpPrototype.cpp >+ runtime/RegExpStringIteratorPrototype.cpp > runtime/SetPrototype.cpp > runtime/StringConstructor.cpp > runtime/StringPrototype.cpp >@@ -930,6 +931,7 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEA > runtime/RegExpGlobalData.h > runtime/RegExpKey.h > runtime/RegExpObject.h >+ runtime/RegExpStringIteratorPrototype.h > runtime/RuntimeFlags.h > runtime/RuntimeType.h > runtime/SamplingProfiler.h >@@ -1203,6 +1205,7 @@ set(JavaScriptCore_BUILTINS_SOURCES > ${JAVASCRIPTCORE_DIR}/builtins/PromisePrototype.js > ${JAVASCRIPTCORE_DIR}/builtins/ReflectObject.js > ${JAVASCRIPTCORE_DIR}/builtins/RegExpPrototype.js >+ ${JAVASCRIPTCORE_DIR}/builtins/RegExpStringIteratorPrototype.js > ${JAVASCRIPTCORE_DIR}/builtins/SetIteratorPrototype.js > ${JAVASCRIPTCORE_DIR}/builtins/SetPrototype.js > ${JAVASCRIPTCORE_DIR}/builtins/StringConstructor.js >Index: Source/JavaScriptCore/DerivedSources.make >=================================================================== >--- Source/JavaScriptCore/DerivedSources.make (revision 246067) >+++ Source/JavaScriptCore/DerivedSources.make (working copy) >@@ -111,6 +111,7 @@ JavaScriptCore_BUILTINS_SOURCES = \ > $(JavaScriptCore)/builtins/PromisePrototype.js \ > $(JavaScriptCore)/builtins/ReflectObject.js \ > $(JavaScriptCore)/builtins/RegExpPrototype.js \ >+ ${JavaScriptCore}/builtins/RegExpStringIteratorPrototype.js \ > $(JavaScriptCore)/builtins/SetIteratorPrototype.js \ > $(JavaScriptCore)/builtins/SetPrototype.js \ > $(JavaScriptCore)/builtins/StringConstructor.js \ >Index: Source/JavaScriptCore/Sources.txt >=================================================================== >--- Source/JavaScriptCore/Sources.txt (revision 246067) >+++ Source/JavaScriptCore/Sources.txt (working copy) >@@ -922,6 +922,7 @@ runtime/RegExpGlobalData.cpp > runtime/RegExpMatchesArray.cpp > runtime/RegExpObject.cpp > runtime/RegExpPrototype.cpp >+runtime/RegExpStringIteratorPrototype.cpp > runtime/RuntimeType.cpp > runtime/SamplingCounter.cpp > runtime/SamplingProfiler.cpp >Index: Source/JavaScriptCore/builtins/BuiltinNames.h >=================================================================== >--- Source/JavaScriptCore/builtins/BuiltinNames.h (revision 246067) >+++ Source/JavaScriptCore/builtins/BuiltinNames.h (working copy) >@@ -164,6 +164,11 @@ namespace JSC { > macro(regExpSearchFast) \ > macro(regExpSplitFast) \ > macro(regExpTestFast) \ >+ macro(regExpStringIteratorRegExp) \ >+ macro(regExpStringIteratorString) \ >+ macro(regExpStringIteratorGlobal) \ >+ macro(regExpStringIteratorUnicode) \ >+ macro(regExpStringIteratorDone) \ > macro(stringIncludesInternal) \ > macro(stringSplitFast) \ > macro(stringSubstrInternal) \ >Index: Source/JavaScriptCore/builtins/RegExpPrototype.js >=================================================================== >--- Source/JavaScriptCore/builtins/RegExpPrototype.js (revision 246067) >+++ Source/JavaScriptCore/builtins/RegExpPrototype.js (working copy) >@@ -24,6 +24,19 @@ > */ > > @globalPrivate >+@constructor >+function RegExpStringIteratorConstructor(R, S, global, fullUnicode) >+{ >+ "use strict"; >+ >+ @putByIdDirectPrivate(this, "regExpStringIteratorRegExp", R); >+ @putByIdDirectPrivate(this, "regExpStringIteratorString", S); >+ @putByIdDirectPrivate(this, "regExpStringIteratorGlobal", global); >+ @putByIdDirectPrivate(this, "regExpStringIteratorUnicode", fullUnicode); >+ @putByIdDirectPrivate(this, "regExpStringIteratorDone", false); >+} >+ >+@globalPrivate > function advanceStringIndex(string, index, unicode) > { > // This function implements AdvanceStringIndex described in ES6 21.2.5.2.3. >@@ -142,6 +155,28 @@ function match(strArg) > return @matchSlow(this, str); > } > >+@overriddenName="[Symbol.matchAll]" >+function matchAll(string) >+{ >+ "use strict"; >+ >+ let R = this; >+ if (!@isObject(R)) >+ @throwTypeError("RegExp.prototype.@@matchAll requires |this| to be an Object"); >+ >+ let S = @toString(string); >+ let C = @speciesConstructor(R, @RegExp); >+ >+ let flags = @toString(R.flags); >+ let matcher = new C(R, flags); >+ matcher.lastIndex = @toLength(matcher.lastIndex); >+ >+ let global = @stringIncludesInternal.@call(flags, "g"); >+ let fullUnicode = @stringIncludesInternal.@call(flags, "u"); >+ >+ return new @RegExpStringIteratorConstructor(matcher, S, global, fullUnicode); >+} >+ > @overriddenName="[Symbol.replace]" > function replace(strArg, replace) > { >Index: Source/JavaScriptCore/builtins/RegExpStringIteratorPrototype.js >=================================================================== >--- Source/JavaScriptCore/builtins/RegExpStringIteratorPrototype.js (nonexistent) >+++ Source/JavaScriptCore/builtins/RegExpStringIteratorPrototype.js (working copy) >@@ -0,0 +1,60 @@ >+/* >+ * Copyright (C) 2019 Alexey Shvayka <shvaikalesh@gmail.com>. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+function next() >+{ >+ "use strict"; >+ >+ if (!@isObject(this)) >+ @throwTypeError("%RegExpStringIteratorPrototype%.next requires |this| to be an Object"); >+ >+ let done = @getByIdDirectPrivate(this, "regExpStringIteratorDone"); >+ if (done === @undefined) >+ @throwTypeError("%RegExpStringIteratorPrototype%.next requires |this| to be an RegExp String Iterator instance"); >+ >+ if (done) >+ return { value: @undefined, done: true }; >+ >+ let R = @getByIdDirectPrivate(this, "regExpStringIteratorRegExp"); >+ let S = @getByIdDirectPrivate(this, "regExpStringIteratorString"); >+ let global = @getByIdDirectPrivate(this, "regExpStringIteratorGlobal"); >+ let fullUnicode = @getByIdDirectPrivate(this, "regExpStringIteratorUnicode"); >+ let match = @regExpExec(R, S); >+ if (match === null) { >+ @putByIdDirectPrivate(this, "regExpStringIteratorDone", true); >+ return { value: @undefined, done: true }; >+ } >+ >+ if (global) { >+ let matchStr = @toString(match[0]); >+ if (matchStr === "") { >+ let thisIndex = @toLength(R.lastIndex); >+ R.lastIndex = @advanceStringIndex(S, thisIndex, fullUnicode); >+ } >+ } else >+ @putByIdDirectPrivate(this, "regExpStringIteratorDone", true); >+ >+ return { value: match, done: false }; >+} >Index: Source/JavaScriptCore/builtins/StringPrototype.js >=================================================================== >--- Source/JavaScriptCore/builtins/StringPrototype.js (revision 246067) >+++ Source/JavaScriptCore/builtins/StringPrototype.js (working copy) >@@ -43,6 +43,24 @@ function match(regexp) > return createdRegExp.@matchSymbol(thisString); > } > >+function matchAll(regexp) >+{ >+ "use strict"; >+ >+ if (@isUndefinedOrNull(this)) >+ @throwTypeError("String.prototype.matchAll requires |this| not to be null nor undefined"); >+ >+ if (!@isUndefinedOrNull(regexp)) { >+ let matcher = regexp.@matchAllSymbol; >+ if (!@isUndefinedOrNull(matcher)) >+ return matcher.@call(regexp, this); >+ } >+ >+ let S = @toString(this); >+ let rx = @regExpCreate(regexp, "g"); >+ return rx.@matchAllSymbol(S); >+} >+ > @globalPrivate > function repeatSlowPath(string, count) > { >Index: Source/JavaScriptCore/runtime/CommonIdentifiers.h >=================================================================== >--- Source/JavaScriptCore/runtime/CommonIdentifiers.h (revision 246067) >+++ Source/JavaScriptCore/runtime/CommonIdentifiers.h (working copy) >@@ -254,6 +254,7 @@ > macro(asyncIterator) \ > macro(iterator) \ > macro(match) \ >+ macro(matchAll) \ > macro(replace) \ > macro(search) \ > macro(species) \ >Index: Source/JavaScriptCore/runtime/JSGlobalObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSGlobalObject.cpp (revision 246067) >+++ Source/JavaScriptCore/runtime/JSGlobalObject.cpp (working copy) >@@ -155,6 +155,7 @@ > #include "RegExpMatchesArray.h" > #include "RegExpObject.h" > #include "RegExpPrototype.h" >+#include "RegExpStringIteratorPrototype.h" > #include "ScopedArguments.h" > #include "SetConstructor.h" > #include "SetIteratorPrototype.h" >@@ -947,6 +948,9 @@ putDirectWithoutTransition(vm, vm.proper > JSObject* mapIteratorPrototype = MapIteratorPrototype::create(vm, this, MapIteratorPrototype::createStructure(vm, this, m_iteratorPrototype.get())); > createMapIteratorPrivateFunction->putDirect(vm, vm.propertyNames->prototype, mapIteratorPrototype); > >+ JSObject* regExpStringIteratorPrototype = RegExpStringIteratorPrototype::create(vm, this, m_iteratorPrototype.get()); >+ RegExpStringIteratorConstructorPrivateFunction->putDirect(vm, vm.propertyNames->prototype, regExpStringIteratorPrototype); >+ > JSObject* setIteratorPrototype = SetIteratorPrototype::create(vm, this, SetIteratorPrototype::createStructure(vm, this, m_iteratorPrototype.get())); > createSetIteratorPrivateFunction->putDirect(vm, vm.propertyNames->prototype, setIteratorPrototype); > >Index: Source/JavaScriptCore/runtime/RegExpPrototype.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/RegExpPrototype.cpp (revision 246067) >+++ Source/JavaScriptCore/runtime/RegExpPrototype.cpp (working copy) >@@ -77,6 +77,7 @@ void RegExpPrototype::finishCreation(VM& > JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->source, regExpProtoGetterSource, PropertyAttribute::DontEnum | PropertyAttribute::Accessor); > JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->flags, regExpProtoGetterFlags, PropertyAttribute::DontEnum | PropertyAttribute::Accessor); > JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->matchSymbol, regExpPrototypeMatchCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); >+ JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->matchAllSymbol, regExpPrototypeMatchAllCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); > JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->replaceSymbol, regExpPrototypeReplaceCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); > JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->searchSymbol, regExpPrototypeSearchCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); > JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->splitSymbol, regExpPrototypeSplitCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); >Index: Source/JavaScriptCore/runtime/RegExpStringIteratorPrototype.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/RegExpStringIteratorPrototype.cpp (nonexistent) >+++ Source/JavaScriptCore/runtime/RegExpStringIteratorPrototype.cpp (working copy) >@@ -0,0 +1,51 @@ >+/* >+ * Copyright (C) 2019 Alexey Shvayka <shvaikalesh@gmail.com>. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "RegExpStringIteratorPrototype.h" >+ >+#include "IteratorOperations.h" >+#include "JSCBuiltins.h" >+#include "JSCInlines.h" >+#include "JSCJSValueInlines.h" >+#include "JSCellInlines.h" >+#include "JSGlobalObject.h" >+#include "ObjectConstructor.h" >+#include "StructureInlines.h" >+ >+namespace JSC { >+ >+const ClassInfo RegExpStringIteratorPrototype::s_info = { "RegExp String Iterator", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(RegExpStringIteratorPrototype) }; >+ >+void RegExpStringIteratorPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject) >+{ >+ Base::finishCreation(vm); >+ ASSERT(inherits(vm, info())); >+ putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "RegExp String Iterator"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); >+ JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->next, regExpStringIteratorPrototypeNextCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); >+ didBecomePrototype(); >+} >+ >+} // namespace JSC >Index: Source/JavaScriptCore/runtime/RegExpStringIteratorPrototype.h >=================================================================== >--- Source/JavaScriptCore/runtime/RegExpStringIteratorPrototype.h (nonexistent) >+++ Source/JavaScriptCore/runtime/RegExpStringIteratorPrototype.h (working copy) >@@ -0,0 +1,56 @@ >+/* >+ * Copyright (C) 2019 Alexey Shvayka <shvaikalesh@gmail.com>. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "JSObject.h" >+ >+namespace JSC { >+ >+class RegExpStringIteratorPrototype final : public JSNonFinalObject { >+public: >+ typedef JSNonFinalObject Base; >+ static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable; >+ >+ static RegExpStringIteratorPrototype* create(VM& vm, JSGlobalObject* globalObject, JSValue iteratorPrototype) >+ { >+ auto structure = Structure::create(vm, globalObject, iteratorPrototype, TypeInfo(ObjectType, StructureFlags), info()); >+ auto prototype = new (NotNull, allocateCell<RegExpStringIteratorPrototype>(vm.heap)) RegExpStringIteratorPrototype(vm, structure); >+ prototype->finishCreation(vm, globalObject); >+ return prototype; >+ } >+ >+ DECLARE_INFO; >+ >+private: >+ RegExpStringIteratorPrototype(VM& vm, Structure* structure) >+ : Base(vm, structure) >+ { >+ } >+ >+ void finishCreation(VM&, JSGlobalObject*); >+}; >+ >+} // namespace JSC >Index: Source/JavaScriptCore/runtime/StringPrototype.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/StringPrototype.cpp (revision 246067) >+++ Source/JavaScriptCore/runtime/StringPrototype.cpp (working copy) >@@ -98,6 +98,7 @@ const ClassInfo StringPrototype::s_info > @begin stringPrototypeTable > concat JSBuiltin DontEnum|Function 1 > match JSBuiltin DontEnum|Function 1 >+ matchAll JSBuiltin DontEnum|Function 1 > padStart JSBuiltin DontEnum|Function 1 > padEnd JSBuiltin DontEnum|Function 1 > repeat JSBuiltin DontEnum|Function 1 >Index: LayoutTests/js/script-tests/Object-getOwnPropertyNames.js >=================================================================== >--- LayoutTests/js/script-tests/Object-getOwnPropertyNames.js (revision 246067) >+++ LayoutTests/js/script-tests/Object-getOwnPropertyNames.js (working copy) >@@ -58,7 +58,7 @@ var expectedPropertyNamesSet = { > "Array": "['from', 'isArray', 'length', 'name', 'of', 'prototype']", > "Array.prototype": "['concat', 'constructor', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'length', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values']", > "String": "['fromCharCode', 'fromCodePoint', 'length', 'name', 'prototype', 'raw']", >- "String.prototype": "['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'codePointAt', 'concat', 'constructor', 'endsWith', 'fixed', 'fontcolor', 'fontsize', 'includes', 'indexOf', 'italics', 'lastIndexOf', 'length', 'link', 'localeCompare', 'match', 'normalize', 'padEnd', 'padStart', 'repeat', 'replace', 'search', 'slice', 'small', 'split', 'startsWith', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toString', 'toUpperCase', 'trim', 'trimEnd', 'trimLeft', 'trimRight', 'trimStart', 'valueOf']", >+ "String.prototype": "['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'codePointAt', 'concat', 'constructor', 'endsWith', 'fixed', 'fontcolor', 'fontsize', 'includes', 'indexOf', 'italics', 'lastIndexOf', 'length', 'link', 'localeCompare', 'match', 'matchAll', 'normalize', 'padEnd', 'padStart', 'repeat', 'replace', 'search', 'slice', 'small', 'split', 'startsWith', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toString', 'toUpperCase', 'trim', 'trimEnd', 'trimLeft', 'trimRight', 'trimStart', 'valueOf']", > "Boolean": "['length', 'name', 'prototype']", > "Boolean.prototype": "['constructor', 'toString', 'valueOf']", > "Number": "['EPSILON', 'MAX_SAFE_INTEGER', 'MAX_VALUE', 'MIN_SAFE_INTEGER', 'MIN_VALUE', 'NEGATIVE_INFINITY', 'NaN', 'POSITIVE_INFINITY', 'isFinite', 'isInteger', 'isNaN', 'isSafeInteger', 'length', 'name', 'parseFloat', 'parseInt', 'prototype']", >@@ -71,7 +71,7 @@ var expectedPropertyNamesSet = { > "Error.prototype": "['constructor', 'message', 'name', 'toString']", > "Math": "['E','LN10','LN2','LOG10E','LOG2E','PI','SQRT1_2','SQRT2','abs','acos','acosh','asin','asinh','atan','atan2','atanh','cbrt','ceil','clz32','cos','cosh','exp','expm1','floor','fround','hypot','imul','log','log10','log1p','log2','max','min','pow','random','round','sign','sin','sinh','sqrt','tan','tanh','trunc']", > "JSON": "['parse', 'stringify']", >- "Symbol": "['asyncIterator','for', 'hasInstance', 'isConcatSpreadable', 'iterator', 'keyFor', 'length', 'match', 'name', 'prototype', 'replace', 'search', 'species', 'split', 'toPrimitive', 'toStringTag', 'unscopables']", >+ "Symbol": "['asyncIterator','for', 'hasInstance', 'isConcatSpreadable', 'iterator', 'keyFor', 'length', 'match', 'matchAll', 'name', 'prototype', 'replace', 'search', 'species', 'split', 'toPrimitive', 'toStringTag', 'unscopables']", > "Symbol.prototype": "['constructor', 'description', 'toString', 'valueOf']", > "Map": "['length', 'name', 'prototype']", > "Map.prototype": "['clear', 'constructor', 'delete', 'entries', 'forEach', 'get', 'has', 'keys', 'set', 'size', 'values']",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186694
:
372025
|
372031
|
372032
|
372033
|
372035
|
372036
|
372055
|
372062
|
372064
|
372067
|
372068
|
372069
|
372089
|
372361