Bug 61476

Summary: Generate regexp code lazily
Product: WebKit Reporter: Oliver Hunt <oliver>
Component: New BugsAssignee: Oliver Hunt <oliver>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ggaren: review+

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>