Bug 86059 - DFG should allow inlining in case of certain arity mismatches
Summary: DFG should allow inlining in case of certain arity mismatches
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-05-09 23:06 PDT by Filip Pizlo
Modified: 2012-05-23 00:55 PDT (History)
0 users

See Also:


Attachments
the patch (2.60 KB, patch)
2012-05-09 23:07 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-05-09 23:06:12 PDT
Currently we disallow inlining in case of arity mismatch. This made sense when we were passing arguments in the wrong order, since arity mismatch calls required some call frame ninja work, and it seemed like adding this to the inliner would be sufficiently complex that avoiding it would reduce the bug tail.

But now that we're passing arguments in the right order, inlining calls that pass too many arguments is trivial. There simply isn't anything standing in the way of us doing this. The value recoveries in the inline call frame already do the right things (they track the arguments passed, not the parameters expected). The argument flushing does the right things (it places the arguments where they should be and makes sure that they are really stored to the stack). The rest of the inlining machinery already computes the stack offset correctly.

So while it's still the case that arity mismatches where too few arguments are passed are hard to inline, the ones that involve too many args are trivial and we should just inline those.
Comment 1 Filip Pizlo 2012-05-09 23:07:58 PDT
Created attachment 141089 [details]
the patch
Comment 2 Geoffrey Garen 2012-05-09 23:38:43 PDT
Comment on attachment 141089 [details]
the patch

r=me
Comment 3 Filip Pizlo 2012-05-10 00:52:52 PDT
Landed in http://trac.webkit.org/changeset/116620
Comment 4 Filip Pizlo 2012-05-23 00:54:57 PDT
Landed in http://trac.webkit.org/changeset/118144
Comment 5 Filip Pizlo 2012-05-23 00:55:07 PDT
Excuse me, merged in http://trac.webkit.org/changeset/118144