Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 8 function PrettyPrint() { return ""; } | |
| 9 function fail() { } | |
| 10 assertSame = function assertSame() { if (found === expected) { if (1 / found) re turn; } else if ((expected !== expected) && (found !== found)) { return; }; }; a ssertEquals = function assertEquals(expected, found, name_opt) { if ( expected) { fail(PrettyPrint()); } }; | |
| 11 assertTrue = function assertTrue() { assertEquals(); }; | |
| 12 assertThrows = function assertThrows(code, type_opt, cause_opt) { var threwExcep tion = true; try { if (typeof code == 'function') { code(); } else {; } threwExc eption = false; } catch (e) { if (typeof type_opt == 'function') {; } if (argume nts.length >= 3) {; } return; } }; | |
| 13 assertInstanceof = function assertInstanceof() { if (obj instanceof type) { var actualTypeName = null; var actualConstructor = Object.getPrototypeOf().construct or; if (typeof actualConstructor == "function") {; }; } }; | |
| 14 function modifyPropertyOrValue() { var names; try {; } catch(e) {; return; } if( !names) return; name = names[rand_value % names.length]; if (isNaN()); } | |
| 15 function nop() {} | |
| 16 var __v_5 = {}; | |
| 17 var __v_12 = {}; | |
| 18 var __v_13 = {}; | |
| 19 var __v_16 = {}; | |
| 20 function __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(); | |
| 38 tailee1 = function() { | |
| 39 "use strict"; | |
| 40 if (__v_12-- == 0) { | |
| 41 } | |
| 42 return nop(); | |
| 43 }; | |
| 44 %OptimizeFunctionOnNextCall(tailee1); | |
| 45 assertEquals(__v_10, tailee1.call()); | |
| 46 __v_14 = 100000; | |
| 47 gc(); | |
| 48 tailee2 = function() { | |
| 49 "use strict"; | |
| 50 __v_14 = ((__v_14 | 0) - 1) | 0; | |
| 51 if ((__v_14 | 0) === 0) { | |
| 52 } | |
| 53 }; | |
| 54 %OptimizeFunctionOnNextCall(tailee2); | |
| 55 assertEquals(__v_11, tailee2.call()); | |
| 56 __v_13 = 999999; | |
| 57 tailee3 = function() { | |
| 58 "use strict"; | |
| 59 if (__v_13-- == 0) { | |
| 60 } | |
| 61 }; | |
| 62 %OptimizeFunctionOnNextCall(tailee3); | |
| 63 assertEquals(__v_9, tailee3.call(__v_11, __v_9)); | |
| 64 tailee4 = function(px) { | |
| 65 return nop(tailee4, this, px, undefined); | |
| 66 }; | |
| 67 %OptimizeFunctionOnNextCall(tailee4); | |
| 68 assertThrows(function() { tailee4.call(); }); | |
| 69 tailee5 = function() { | |
| 70 return nop(); | |
| 71 }; | |
| 72 %OptimizeFunctionOnNextCall(tailee5); | |
| 73 assertThrows(function() { tailee5.call(); }); | |
| 74 tailee6 = function() { | |
| 75 } | |
| 76 tailee7 = 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; | |
| 90 Array.prototype.includes.call(5); | |
| 91 })(); | |
| 92 for (var __v_20 = 0; __v_20 <= 20; __v_20++) { | |
|
Jakob Kummerow
2015/12/16 15:24:20
Does the test still trigger the issue without this
mvstanton
2015/12/16 15:53:18
as long as I defined __v_20 and __v_9 it's okay, s
| |
| 93 for (var __v_9 = -8; __v_9 < __v_20; __v_9++) { | |
| 94 } | |
| 95 } | |
| OLD | NEW |