Bug 159081

Summary: make rest parameters faster
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: NEW    
Severity: Normal CC: benjamin, fpizlo, ggaren, gskachkov, keith_miller, mark.lam, msaboff, oliver, sukolsak, ysuzuki
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 159612    
Bug Blocks:    

Saam Barati
Reported 2016-06-23 21:09:03 PDT
....
Attachments
Filip Pizlo
Comment 1 2016-06-24 10:39:25 PDT
Thought about this more. I like that CopyRest is a node. If only we could make it so that the use of the rest array for forwarding arguments was also a node so that: function foo(a, b, c, ...args) { return bar(b, c, d, ...args); } looked like this: w: CopyRest(...) x: NewArray(b, c, d) y: ConcatArray(@x, @w) z: TailCallVarargs(bar, @y) I'm not sure how we'll compile "...args" in the call to bar(), but I'm pretty sure it'll be more obfuscated than this. If we could get to a point where the DFG saw this, then we could have arguments forwarding turn this into code that never allocated anything.
Note You need to log in before you can comment on or make changes to this bug.