Bug 143349

Summary: Add Options::dumpSourceAtDFGTime()
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, fpizlo, ggaren, mmirman, msaboff
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
the patch. oliver: review+

Description Mark Lam 2015-04-02 15:27:16 PDT
Sometimes, we will want to see the JSC source code that we're compiling, and it would be nice to be able to do this without having to jump thru a lot of hoops.  So, let's add a Options::dumpSourceAtDFGTime() option just like we have a Options::dumpBytecodeAtDFGTime() option.
Comment 1 Mark Lam 2015-04-02 15:33:12 PDT
(In reply to comment #0)
> Sometimes, we will want to see the JSC source code ...

typo: ... want to see the JS source code ...
Comment 2 Mark Lam 2015-04-02 15:34:29 PDT
Created attachment 250014 [details]
the patch.
Comment 3 Michael Saboff 2015-04-02 15:41:36 PDT
Comment on attachment 250014 [details]
the patch.

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

r=me

> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3988
> +        dataLog("==== begin source ====\n");

Do we this this delimiter?

> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3990
> +        dataLog("\n==== end source ====\n\n");

ditto
Comment 4 Mark Lam 2015-04-02 15:43:40 PDT
(In reply to comment #3)
> Comment on attachment 250014 [details]
> the patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=250014&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3988
> > +        dataLog("==== begin source ====\n");
> 
> Do we this this delimiter?
> 
> > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3990
> > +        dataLog("\n==== end source ====\n\n");
> 
> ditto

It helps.  Consider the case where we actually compile eval or global code which don't have a { } around them.  Plus this is only debugging code.  So, let's go with these for now.
Comment 5 Mark Lam 2015-04-02 15:48:24 PDT
Thanks for the review.  Landed in r182294: <http://trac.webkit.org/r182294>.