Ignore:
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 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj

    r59955 r61623  
    10901090                        </File>
    10911091                        <File
     1092                                RelativePath="..\..\runtime\RegExpCache.cpp"
     1093                                >
     1094                        </File>
     1095                        <File
     1096                                RelativePath="..\..\runtime\RegExpCache.h"
     1097                                >
     1098                        </File>
     1099                        <File
    10921100                                RelativePath="..\..\runtime\RegExpConstructor.cpp"
    10931101                                >
     
    10951103                        <File
    10961104                                RelativePath="..\..\runtime\RegExpConstructor.h"
     1105                                >
     1106                        </File>
     1107                        <File
     1108                                RelativePath="..\..\runtime\RegExpKey.h"
    10971109                                >
    10981110                        </File>
Note: See TracChangeset for help on using the changeset viewer.