Ignore:
Timestamp:
Jul 2, 2010, 2:34:43 PM (15 years ago)
Author:
[email protected]
Message:

[ Updated after rollout. ]

Patch by Renata Hodovan <[email protected]> on 2010-07-02
Reviewed by Oliver Hunt.

Merged RegExp constructor and RegExp::create methods.
Both functions are called with three parameters and check whether
flags (the third param) is given or not.
Avoid extra hash lookups in RegExpCache::create by passing a pre-computed
iterator parameter.
https://bugs.webkit.org/show_bug.cgi?id=41055

  • runtime/RegExp.cpp:

(JSC::RegExp::RegExp):

  • runtime/RegExp.h:
  • runtime/RegExpCache.cpp:

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

  • runtime/RegExpCache.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/RegExp.h

    r62148 r62405  
    3838    class RegExp : public RefCounted<RegExp> {
    3939    public:
    40         static PassRefPtr<RegExp> create(JSGlobalData* globalData, const UString& pattern);
    4140        static PassRefPtr<RegExp> create(JSGlobalData* globalData, const UString& pattern, const UString& flags);
    4241#if !ENABLE(YARR)
     
    5756
    5857    private:
    59         RegExp(JSGlobalData* globalData, const UString& pattern);
    6058        RegExp(JSGlobalData* globalData, const UString& pattern, const UString& flags);
    6159
Note: See TracChangeset for help on using the changeset viewer.