v8/test/mjsunit/es6/destructuring-parameters-literalcount.js
adamk dea9559457 Remove destructuring and default arguments runtime flags
These flags have been on by default since version 4.9, which has been
in stable Chrome for over a week now, demonstrating that they're
here to stay.

Also moved the tests out of harmony/ and into es6/.

Review URL: https://codereview.chromium.org/1776683003

Cr-Commit-Position: refs/heads/master@{#34692}
2016-03-10 23:22:30 +00:00

41 lines
846 B
JavaScript

// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --allow-natives-syntax
var t1 = [1];
var t2 = [2];
var t3 = [3];
var t4 = [4];
var t5 = [5];
function g({x = {a:10,b:20}},
{y = [1,2,3],
n = [],
p = /abc/}) {
assertSame(10, x.a);
assertSame(20, x.b);
assertSame(2, y[1]);
assertSame(0, n.length);
assertTrue(p.test("abc"));
}
g({},{});
%OptimizeFunctionOnNextCall(g);
g({},{});
var h = ({x = {a:10,b:20}},
{y = [1,2,3],
n = [],
p = /abc/ }) => {
assertSame(10, x.a);
assertSame(20, x.b);
assertSame(2, y[1]);
assertSame(0, n.length);
assertTrue(p.test("abc"));
};
h({},{});
%OptimizeFunctionOnNextCall(h);
h({},{});