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 --expose-gc
6
7var global = { };
8
9function do_nothing() { }
10
11function f(opt_gc) {
12  var x = new Array(3);
13  x[0] = 10;
14  opt_gc();
15  global[1] = 15.5;
16  return x;
17}
18
19gc();
20global = f(gc);
21global = f(do_nothing);
22%OptimizeFunctionOnNextCall(f);
23global = f(do_nothing);
24