Bug 89632 - DFG should inline 'new Array()'
Summary: DFG should inline 'new Array()'
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-20 20:57 PDT by Filip Pizlo
Modified: 2012-06-21 15:59 PDT (History)
0 users

See Also:


Attachments
work in progress (7.77 KB, patch)
2012-06-20 21:01 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (7.42 KB, patch)
2012-06-21 15:24 PDT, Filip Pizlo
ggaren: 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 2012-06-20 20:57:02 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2012-06-20 21:01:24 PDT
Created attachment 148724 [details]
work in progress

Putting up for EWS.

I haven't really tested this beyond tiny programs, but it's probably good to go.  Will mark r? once I know that it actually works for real.
Comment 2 Filip Pizlo 2012-06-21 15:24:38 PDT
Created attachment 148900 [details]
the patch
Comment 3 Geoffrey Garen 2012-06-21 15:30:19 PDT
Comment on attachment 148900 [details]
the patch

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

r=me

> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:1618
> +        if (kind != CodeForConstruct)
> +            return false;

Actually, 'new Array()' and 'Array()' are equivalent. So, you should remove this check for great good.
Comment 4 Filip Pizlo 2012-06-21 15:32:57 PDT
(In reply to comment #3)
> (From update of attachment 148900 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=148900&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:1618
> > +        if (kind != CodeForConstruct)
> > +            return false;
> 
> Actually, 'new Array()' and 'Array()' are equivalent. So, you should remove this check for great good.

Egads!  You're right!

Will do.
Comment 5 Filip Pizlo 2012-06-21 15:59:52 PDT
Landed in http://trac.webkit.org/changeset/120974