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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 24 08:44:33 PDT 2010


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





--- Comment #3 from Renata Hodovan <hodovan at inf.u-szeged.hu>  2010-06-24 08:44:32 PST ---
> The RegExpCacheMap::iterator will look better.
You're right. This way is really 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?

I agree that we should merge RegExp constructors. But I think it's more prefered to call the public RegExp constructor from the public create function. I have seen examples for this, but maybe I'm wrong. Any comments?

-- 
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