Summary: | [ES6] Implement spread for function calls | ||
---|---|---|---|
Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> |
Component: | JavaScriptCore | Assignee: | Yusuke Suzuki <ysuzuki> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | sam |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Yusuke Suzuki
2015-06-28 08:29:32 PDT
Let'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. One problem is that, when just using the JS implemented Promise, the class info of the generated Promise becomes the usual JSFinalObject's info. If we would like not to break the current jsDynamicCast<JSPromise*>(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. (In reply to comment #2) > One problem is that, when just using the JS implemented Promise, the class > info of the generated Promise becomes the usual JSFinalObject's info. > If we would like not to break the current > > jsDynamicCast<JSPromise*>(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. oops, I posted it to the wrong issue. |