1// Copyright 2015 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 --gc-interval=216 6// Flags: --nonative-context-specialization 7 8function PrettyPrint() { return ""; } 9function fail() { } 10assertSame = function assertSame() { if (found === expected) { if (1 / found) return; } else if ((expected !== expected) && (found !== found)) { return; }; }; assertEquals = function assertEquals(expected, found, name_opt) { if ( expected) { fail(PrettyPrint()); } }; 11assertTrue = function assertTrue() { assertEquals(); }; 12assertThrows = function assertThrows(code, type_opt, cause_opt) { var threwException = true; try { if (typeof code == 'function') { code(); } else {; } threwException = false; } catch (e) { if (typeof type_opt == 'function') {; } if (arguments.length >= 3) {; } return; } }; 13assertInstanceof = function assertInstanceof() { if (obj instanceof type) { var actualTypeName = null; var actualConstructor = Object.getPrototypeOf().constructor; if (typeof actualConstructor == "function") {; }; } }; 14function modifyPropertyOrValue() { var names; try {; } catch(e) {; return; } if(!names) return; name = names[rand_value % names.length]; if (isNaN()); } 15function nop() {} 16var __v_5 = {}; 17var __v_12 = {}; 18var __v_13 = {}; 19var __v_16 = {}; 20function __f_0() { 21} 22(function (){ 23 function __f_6() { 24 } 25 a = __f_6(); 26 b = __f_6(); 27 name = "Array"; 28})(); 29(function (){ 30 function __f_1() { 31 assertTrue(); 32 } 33 __f_1(); 34})(); 35__v_10 = { 36} 37__v_11 = new Object(); 38tailee1 = function() { 39 "use strict"; 40 if (__v_12-- == 0) { 41 } 42 return nop(); 43}; 44%OptimizeFunctionOnNextCall(tailee1); 45assertEquals(__v_10, tailee1.call()); 46__v_14 = 100000; 47gc(); 48tailee2 = function() { 49 "use strict"; 50 __v_14 = ((__v_14 | 0) - 1) | 0; 51 if ((__v_14 | 0) === 0) { 52 } 53}; 54%OptimizeFunctionOnNextCall(tailee2); 55assertEquals(__v_11, tailee2.call()); 56__v_13 = 999999; 57tailee3 = function() { 58 "use strict"; 59 if (__v_13-- == 0) { 60 } 61}; 62%OptimizeFunctionOnNextCall(tailee3); 63assertEquals(__v_9, tailee3.call(__v_11, __v_9)); 64tailee4 = function(px) { 65 return nop(tailee4, this, px, undefined); 66}; 67%OptimizeFunctionOnNextCall(tailee4); 68assertThrows(function() { tailee4.call(); }); 69tailee5 = function() { 70 return nop(); 71}; 72%OptimizeFunctionOnNextCall(tailee5); 73assertThrows(function() { tailee5.call(); }); 74tailee6 = function() { 75} 76tailee7 = function( py, pz, pa, pb, pc) { 77 return nop(); 78}; 79%OptimizeFunctionOnNextCall(tailee7); 80 tailee7.call(); 81 82(function() { 83 Number.prototype[0] = "a"; 84 Number.prototype[1] = "b"; 85 Object.defineProperty(Number.prototype, 2, { 86 get: function() { 87 } 88 }); 89 Number.prototype.length = 3; 90Array.prototype.includes.call(5); 91})(); 92var __v_9 = -8; 93var __v_20 = 0; 94