Timestamp:
Jun 22, 2010, 12:16:57 PM (15 years ago)
Author:
[email protected]
Message:

Adding regular expression caching to JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=38142

Patch by Renata Hodovan <[email protected]> on 2010-06-22
Reviewed by Geoffrey Garen.

The cache is based on Round Robin eviction policy, and
can cache at most 256 character long regular expressions,
and at most 256 of them. These values can be changed at compile time.

(JSC::RegExpNode::emitBytecode):

  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData):

  • runtime/JSGlobalData.h:

(JSC::JSGlobalData::regExpCache):

  • runtime/RegExpCache.cpp: Added.

(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
(JSC::RegExpCache::RegExpCache):

  • runtime/RegExpCache.h: Added.
  • runtime/RegExpConstructor.cpp:

(JSC::constructRegExp):

  • runtime/RegExpKey.h: Added.

(JSC::RegExpKey::RegExpKey):
(JSC::RegExpKey::getFlagsValue):
(WTF::operator==):
(WTF::):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncCompile):

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):

File:
1 added

Note: See TracChangeset for help on using the changeset viewer.