v8/test/mjsunit/function-length-accessor.js
yangguo 5414c39974 Slightly improve tests that rely on lazy compilation.
R=rossberg@chromium.org
BUG=v8:3712
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25463}
2014-11-21 12:41:06 +00:00

36 lines
1.4 KiB
JavaScript

// Copyright 2014 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: --harmony-scoping --lazy
function foo(a, b, c, d) {
"use strict"
const x = 10;
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
x = 20; // This will trigger compile error with harmony scoping.
}
assertThrows("foo.length()");