Bug 129762

Summary: Don't generate bytecode expression range info unless it's needed.
Product: WebKit Reporter: Andreas Kling <kling>
Component: JavaScriptCoreAssignee: Andreas Kling <kling>
Status: NEW ---    
Severity: Normal CC: ggaren, kling, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ggaren: review+

Description Andreas Kling 2014-03-05 15:35:02 PST
Patch a-comin'.
Comment 1 Andreas Kling 2014-03-05 15:42:24 PST
Created attachment 225922 [details]
Patch
Comment 2 Geoffrey Garen 2014-03-05 15:58:38 PST
Comment on attachment 225922 [details]
Patch

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

I'd love to see m_metadataForReparse turned into a ParserContext class, which we also pass as input to the parser. That way, the thing we save is the thing we passed to the parser, an it's more obvious that this is right, and harder to change wrong in future.

I'd also love to shared some code with generateFunctionCodeBlock and/or getGlobalCodeBlock for doing this creation dance. My gut says there's some code that could meaningfully be shared -- but I haven't analyzed it fully.

> Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:322
> +void UnlinkedCodeBlock::materializeExpressionInfo()

materializeExpressionInfoIfNecessary?