Home | History | Annotate | Download | only in regress
      1 // 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 
      7 var f = (function() {
      8   "use asm";
      9   function foo(x) {
     10     return x == 0;
     11   }
     12   return foo;
     13 })();
     14 
     15 function deopt(f) {
     16   return {
     17     toString : function() {
     18       %DeoptimizeFunction(f);
     19       return "2";
     20     }
     21   };
     22 }
     23 
     24 %OptimizeFunctionOnNextCall(f);
     25 assertFalse(f(deopt(f)));
     26