Bug 116847 - testRunner should be able to tell you if a function is DFG compiled
Summary: testRunner should be able to tell you if a function is DFG compiled
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: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-27 17:02 PDT by Filip Pizlo
Modified: 2013-05-28 10:09 PDT (History)
1 user (show)

See Also:


Attachments
Patch (26.23 KB, patch)
2013-05-27 17:06 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
Patch (26.33 KB, patch)
2013-05-28 09:31 PDT, Filip Pizlo
mhahnenberg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2013-05-27 17:02:23 PDT
testRunner should be able to tell you if a function is DFG compiled
Comment 1 Filip Pizlo 2013-05-27 17:06:48 PDT
Created attachment 203017 [details]
Patch
Comment 2 Mark Hahnenberg 2013-05-27 18:42:07 PDT
Comment on attachment 203017 [details]
Patch

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

> Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp:52
> +        return 0;

Is this meant to return the JSValueRef of 0 or a null JSValueRef? I ask because everywhere else we return undefined.
Comment 3 Filip Pizlo 2013-05-27 18:48:22 PDT
(In reply to comment #2)
> (From update of attachment 203017 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=203017&action=review
> 
> > Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp:52
> > +        return 0;
> 
> Is this meant to return the JSValueRef of 0 or a null JSValueRef? I ask because everywhere else we return undefined.

It's meant to return 0. 

We return undefined if the user didn't pass a function. 

Here, the user passed a function. If it doesn't have a code block that just means that it hasn't been called yet so by definition it has had zero DFG compiles.
Comment 4 Mark Hahnenberg 2013-05-28 08:22:00 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 203017 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=203017&action=review
> > 
> > > Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp:52
> > > +        return 0;
> > 
> > Is this meant to return the JSValueRef of 0 or a null JSValueRef? I ask because everywhere else we return undefined.
> 
> It's meant to return 0. 
> 
> We return undefined if the user didn't pass a function. 
> 
> Here, the user passed a function. If it doesn't have a code block that just means that it hasn't been called yet so by definition it has had zero DFG compiles.

In that case, don't you need to make a JSValueRef that contains zero instead of returning a null JSValueRef?
Comment 5 Filip Pizlo 2013-05-28 09:27:34 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > (From update of attachment 203017 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=203017&action=review
> > > 
> > > > Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp:52
> > > > +        return 0;
> > > 
> > > Is this meant to return the JSValueRef of 0 or a null JSValueRef? I ask because everywhere else we return undefined.
> > 
> > It's meant to return 0. 
> > 
> > We return undefined if the user didn't pass a function. 
> > 
> > Here, the user passed a function. If it doesn't have a code block that just means that it hasn't been called yet so by definition it has had zero DFG compiles.
> 
> In that case, don't you need to make a JSValueRef that contains zero instead of returning a null JSValueRef?

Oh.  Good point!
Comment 6 Filip Pizlo 2013-05-28 09:31:02 PDT
Created attachment 203062 [details]
Patch
Comment 7 Mark Hahnenberg 2013-05-28 09:41:31 PDT
Comment on attachment 203062 [details]
Patch

r=me
Comment 8 Filip Pizlo 2013-05-28 10:09:18 PDT
Landed in http://trac.webkit.org/changeset/150807