[Webkit-unassigned] [Bug 41055] Simplify hash lookups at RegExp caching

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 24 01:55:35 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=41055





--- Comment #2 from Gabor Loki <loki at webkit.org>  2010-06-24 01:55:35 PST ---
(From update of attachment 59496)
> +PassRefPtr<RegExp> RegExpCache::create(const UString& patternString, const UString& flags, HashMap<RegExpKey, RefPtr<RegExp> >::iterator iterator) 

The RegExpCacheMap::iterator will look better.

> -PassRefPtr<RegExp> RegExp::create(JSGlobalData* globalData, const UString& pattern)
> -{
> -    return adoptRef(new RegExp(globalData, pattern));
> -}
> -
>  PassRefPtr<RegExp> RegExp::create(JSGlobalData* globalData, const UString& pattern, const UString& flags)
>  {
> +    if (flags.isNull())
> +        return adoptRef(new RegExp(globalData, pattern));
>      return adoptRef(new RegExp(globalData, pattern, flags));
>  }

If you propose this merge, what is the reason not to merge the RegExp constructors and create functions?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list