Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(568)

Side by Side Diff: test/mjsunit/harmony/destructuring-parameters-literalcount-nolazy.js

Issue 1212473002: [destructuring] Re-index materialized literals in arrow function parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CR feedback Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/harmony/destructuring-parameters-literalcount.js ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // Flags: --harmony-destructuring --harmony-computed-property-names
6 // Flags: --harmony-arrow-functions --no-lazy --allow-natives-syntax
7
8
9 var t1 = [1];
10 var t2 = [2];
11 var t3 = [3];
12 var t4 = [4];
13 var t5 = [5];
14 function g({x = {a:10,b:20}},
15 {y = [1,2,3],
16 n = [],
17 p = /abc/}) {
18 assertSame(10, x.a);
19 assertSame(20, x.b);
20 assertSame(2, y[1]);
21 assertSame(0, n.length);
22 assertTrue(p.test("abc"));
23 }
24 g({},{});
25 %OptimizeFunctionOnNextCall(g);
26 g({},{});
27
28
29 var h = ({x = {a:10,b:20}},
30 {y = [1,2,3],
31 n = [],
32 p = /abc/ }) => {
33 assertSame(10, x.a);
34 assertSame(20, x.b);
35 assertSame(2, y[1]);
36 assertSame(0, n.length);
37 assertTrue(p.test("abc"));
38 };
39 h({},{});
40 %OptimizeFunctionOnNextCall(h);
41 h({},{});
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/destructuring-parameters-literalcount.js ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698