<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>159081</bug_id>
          
          <creation_ts>2016-06-23 21:09:03 -0700</creation_ts>
          <short_desc>make rest parameters faster</short_desc>
          <delta_ts>2016-07-10 18:54:51 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>159612</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Saam Barati">saam</reporter>
          <assigned_to name="Saam Barati">saam</assigned_to>
          <cc>benjamin</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>gskachkov</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
    
    <cc>sukolsak</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1205023</commentid>
    <comment_count>0</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-06-23 21:09:03 -0700</bug_when>
    <thetext>....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205137</commentid>
    <comment_count>1</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2016-06-24 10:39:25 -0700</bug_when>
    <thetext>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&apos;m not sure how we&apos;ll compile &quot;...args&quot; in the call to bar(), but I&apos;m pretty sure it&apos;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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>