Bug 99798 - Clean up RegExpKey
Summary: Clean up RegExpKey
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-18 19:46 PDT by Anders Carlsson
Modified: 2012-10-19 10:10 PDT (History)
0 users

See Also:


Attachments
Patch (2.90 KB, patch)
2012-10-18 19:50 PDT, Anders Carlsson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2012-10-18 19:46:02 PDT
Clean up RegExpKey
Comment 1 Anders Carlsson 2012-10-18 19:50:58 PDT
Created attachment 169538 [details]
Patch
Comment 2 Darin Adler 2012-10-18 20:57:05 PDT
Comment on attachment 169538 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=169538&action=review

> Source/JavaScriptCore/ChangeLog:10
> +        RegExpHash doesn't need to be a class template specialization when the class template is specialized
> +        for JSC::RegExpKey only. Make it a nested class of RegExp instead. Also, make operator== a friend function
> +        and move it inside the class.

Making friend function seems good to me. Moving inside the class does not seem good to me. I find class definitions easier to read when they don’t have long function definitions inside them.
Comment 3 Anders Carlsson 2012-10-19 10:10:05 PDT
Committed r131913: <http://trac.webkit.org/changeset/131913>