Ignore:
Timestamp:
Nov 6, 2007, 1:08:56 AM (18 years ago)
Author:
eseidel
Message:

2007-11-06 Eric Seidel <[email protected]>

Reviewed by mjs.


Avoid more UString creation.


SunSpider claims this is a 0.4% speedup.

  • kjs/regexp_object.cpp: (KJS::RegExpObjectImp::construct): use UString::find(UChar)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/regexp_object.cpp

    r27448 r27476  
    432432  RegExpPrototype* proto = static_cast<RegExpPrototype*>(exec->lexicalInterpreter()->builtinRegExpPrototype());
    433433
    434   bool global = (flags.find("g") >= 0);
    435   bool ignoreCase = (flags.find("i") >= 0);
    436   bool multiline = (flags.find("m") >= 0);
     434  bool global = (flags.find('g') >= 0);
     435  bool ignoreCase = (flags.find('i') >= 0);
     436  bool multiline = (flags.find('m') >= 0);
    437437
    438438  int reflags = RegExp::None;
Note: See TracChangeset for help on using the changeset viewer.