• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2014 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: --allow-natives-syntax --turbo-filter=test2
6
7function test(n) {
8  return Array(n);
9}
10
11function test2() {
12  return test(2);
13}
14
15function test3(a) {
16  a[0] = 1;
17}
18
19test(0);
20
21var smi_array = [1,2];
22smi_array[2] = 3;
23test3(smi_array);
24
25%OptimizeFunctionOnNextCall(test2);
26
27var broken_array = test2();
28test3(broken_array);
291+broken_array[0];
30