Bug 61476 - Generate regexp code lazily
Summary: Generate regexp code lazily
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: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-25 15:31 PDT by Oliver Hunt
Modified: 2011-05-25 15:50 PDT (History)
0 users

See Also:


Attachments
Patch (12.81 KB, patch)
2011-05-25 15:33 PDT, Oliver Hunt
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2011-05-25 15:31:43 PDT
Generate regexp code lazily
Comment 1 Oliver Hunt 2011-05-25 15:33:20 PDT
Created attachment 94872 [details]
Patch
Comment 2 Geoffrey Garen 2011-05-25 15:45:30 PDT
Comment on attachment 94872 [details]
Patch

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

r=me

> Source/JavaScriptCore/runtime/RegExp.cpp:113
> +void RegExp::recompile(JSGlobalData& globalData)
> +{
> +    m_representation = adoptPtr(new RegExpRepresentation);
> +    m_state = compile(&globalData);
> +}
> +
>  RegExp::RegExpState RegExp::compile(JSGlobalData* globalData)

I think these two functions should merge into a function called "compile", and "recompileIfNecessary" should be "compileIfNecessary", since it gets called for initial compilation, and not just recompilation.
Comment 3 Oliver Hunt 2011-05-25 15:50:16 PDT
Committed r87327: <http://trac.webkit.org/changeset/87327>