Ignore:
Timestamp:
Nov 18, 2008, 1:52:48 PM (17 years ago)
Author:
[email protected]
Message:

2008-11-18 Geoffrey Garen <[email protected]>

Reviewed by Sam Weinig.


Minor RegExp cleanup.


SunSpider says no change.

  • runtime/RegExpObject.cpp: (JSC::RegExpObject::match): Renamed "regExpObj" to "regExpConstructor".
  • wrec/WREC.cpp: (JSC::WREC::compileRegExp): Instead of checking for a NULL output vector, ASSERT that the output vector is not NULL. (The rest of WREC is not safe to use with a NULL output vector, and we probably don't want to spend the time and/or performance to make it safe.)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/RegExpObject.cpp

    r38440 r38575  
    109109bool RegExpObject::match(ExecState* exec, const ArgList& args)
    110110{
    111     RegExpConstructor* regExpObj = exec->lexicalGlobalObject()->regExpConstructor();
     111    RegExpConstructor* regExpConstructor = exec->lexicalGlobalObject()->regExpConstructor();
    112112
    113113    UString input;
     
    115115        input = args.at(exec, 0)->toString(exec);
    116116    else {
    117         input = regExpObj->input();
     117        input = regExpConstructor->input();
    118118        if (input.isNull()) {
    119119            throwError(exec, GeneralError, "No input.");
     
    134134    int foundIndex;
    135135    int foundLength;
    136     regExpObj->performMatch(d->regExp.get(), input, lastIndex, foundIndex, foundLength);
     136    regExpConstructor->performMatch(d->regExp.get(), input, lastIndex, foundIndex, foundLength);
    137137
    138138    if (global) {
Note: See TracChangeset for help on using the changeset viewer.