blob: cbd3e43b96796677fb8fc2faf77651dce2fa0c1f [file] [log] [blame]
Ben Murdoch61f157c2016-09-16 13:49:30 +01001// Copyright 2016 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-escape
6
7function g(a) {
8 if (a) return arguments;
9 %DeoptimizeNow();
10 return 23;
11}
12function f() {
13 return g(false);
14}
15assertEquals(23, f());
16assertEquals(23, f());
17%OptimizeFunctionOnNextCall(f);
18assertEquals(23, f());