Ignore:
Timestamp:
Apr 8, 2020, 1:01:39 PM (5 years ago)
Author:
[email protected]
Message:

[JSC] Threading JSGlobalObject in RegExp::match properly
https://bugs.webkit.org/show_bug.cgi?id=210174

Reviewed by Saam Barati.

We thread JSGlobalObject* properly in RegExp::match instead of accessing VM::topCallFrame, which is too hacky.

  • runtime/RegExp.cpp:

(JSC::RegExp::match):
(JSC::RegExp::matchConcurrently):

  • runtime/RegExp.h:
  • runtime/RegExpGlobalData.h:
  • runtime/RegExpGlobalDataInlines.h:

(JSC::RegExpGlobalData::performMatch):

  • runtime/RegExpInlines.h:

(JSC::RegExp::matchInline):

  • runtime/RegExpMatchesArray.h:

(JSC::createRegExpMatchesArray):

  • runtime/RegExpObjectInlines.h:

(JSC::RegExpObject::matchInline):
(JSC::collectMatches):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncSearchFast):
(JSC::genericSplit):
(JSC::regExpProtoFuncSplitFast):

  • runtime/StringPrototype.cpp:

(JSC::removeUsingRegExpSearch):
(JSC::replaceUsingRegExpSearch):

  • testRegExp.cpp:

(testOneRegExp):
(runFromFiles):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/testRegExp.cpp

    r253443 r259747  
    189189}
    190190
    191 static bool testOneRegExp(VM& vm, RegExp* regexp, RegExpTest* regExpTest, bool verbose, unsigned int lineNumber)
     191static bool testOneRegExp(JSGlobalObject* globalObject, RegExp* regexp, RegExpTest* regExpTest, bool verbose, unsigned lineNumber)
    192192{
    193193    bool result = true;
    194194    Vector<int> outVector;
    195195    outVector.resize(regExpTest->expectVector.size());
    196     int matchResult = regexp->match(vm, regExpTest->subject, regExpTest->offset, outVector);
     196    int matchResult = regexp->match(globalObject, regExpTest->subject, regExpTest->offset, outVector);
    197197
    198198    if (matchResult != regExpTest->result) {
     
    466466                if (regexp && regExpTest) {
    467467                    ++tests;
    468                     if (!testOneRegExp(vm, regexp, regExpTest, verbose, lineNumber)) {
     468                    if (!testOneRegExp(globalObject, regexp, regExpTest, verbose, lineNumber)) {
    469469                        failures++;
    470470                        printf("Failure on line %u\n", lineNumber);
Note: See TracChangeset for help on using the changeset viewer.