Here is a design I came up with yesterday evening (nothing done yet): for
   [a, b, c, ...d]
parser builds an ast:
   %SpreadArrayLiteral([a,b,c], d)
where builtin:
   function SpreadArrayLiteral(lit, rest) {
       let index = lit.length;
       let done = false;
       while (!done) {
           let result = IteratorNext(rest);
           done = result.done;
           if (!done) lit[index+] = result.value;
       }
   }
Codegen will generate the code as-is, whereas PatternRewriter will reinterpret
this as a pattern.

https://codereview.chromium.org/1125183008/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to