<?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>146395</bug_id>
          
          <creation_ts>2015-06-28 08:29:32 -0700</creation_ts>
          <short_desc>[ES6] Implement spread for function calls</short_desc>
          <delta_ts>2016-08-30 11:29:20 -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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yusuke Suzuki">ysuzuki</reporter>
          <assigned_to name="Yusuke Suzuki">ysuzuki</assigned_to>
          <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1105273</commentid>
    <comment_count>0</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2015-06-28 08:29:32 -0700</bug_when>
    <thetext>Let&apos;s do that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1109153</commentid>
    <comment_count>1</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2015-07-13 11:46:54 -0700</bug_when>
    <thetext>Let&apos;s consider several things.

1. currently, var args are specially optimized. this optimization does not work fine for iterators. (since we cannot get length).
2. optimized var args are mainly used in @call.

So, my proposal is,

1. the current @call case is transformed into bytecode intrinsic way to keep the current optimization.
2. use var args optimization. so before calling the function, once extract the iterator into the newly allocated array and pass it to var args.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1111489</commentid>
    <comment_count>2</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2015-07-22 17:21:32 -0700</bug_when>
    <thetext>One problem is that, when just using the JS implemented Promise, the class info of the generated Promise becomes the usual JSFinalObject&apos;s info.
If we would like not to break the current

jsDynamicCast&lt;JSPromise*&gt;(promise)

and

promise.inherits(JSPromise::info())

We need to notify the class info into the ObjectAllocationProfile.
And at that time, we need to take care for DFG because DFG assumes that CreateThis results is always JSFinalObject.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1111500</commentid>
    <comment_count>3</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2015-07-22 17:54:39 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; One problem is that, when just using the JS implemented Promise, the class
&gt; info of the generated Promise becomes the usual JSFinalObject&apos;s info.
&gt; If we would like not to break the current
&gt; 
&gt; jsDynamicCast&lt;JSPromise*&gt;(promise)
&gt; 
&gt; and
&gt; 
&gt; promise.inherits(JSPromise::info())
&gt; 
&gt; We need to notify the class info into the ObjectAllocationProfile.
&gt; And at that time, we need to take care for DFG because DFG assumes that
&gt; CreateThis results is always JSFinalObject.

oops, I posted it to the wrong issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>