blob: 5441705d546c9d9a7ad21164f6c42f9a106864a1 [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +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
6
7var f = (function() {
8 "use asm";
9 function foo(x) {
10 return x < x;
11 }
12 return foo;
13})();
14
15function deopt(f) {
16 return {
17 toString : function() {
18 %DeoptimizeFunction(f);
19 return "2";
20 }
21 };
22}
23
24%OptimizeFunctionOnNextCall(f);
25assertFalse(f(deopt(f)));