OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 testDoubleConversion4(new Array(5)); | 60 testDoubleConversion4(new Array(5)); |
61 testDoubleConversion4(new Array(5)); | 61 testDoubleConversion4(new Array(5)); |
62 assertTrue(2 != %GetOptimizationStatus(testDoubleConversion4)); | 62 assertTrue(2 != %GetOptimizationStatus(testDoubleConversion4)); |
63 %ClearFunctionTypeFeedback(testDoubleConversion4); | 63 %ClearFunctionTypeFeedback(testDoubleConversion4); |
64 | 64 |
65 // Make sure that non-element related map checks that are not preceded by | 65 // Make sure that non-element related map checks that are not preceded by |
66 // transitions in a loop still get hoisted in a way that doesn't generate a | 66 // transitions in a loop still get hoisted in a way that doesn't generate a |
67 // deopt in simple cases. | 67 // deopt in simple cases. |
68 function testExactMapHoisting(a) { | 68 function testExactMapHoisting(a) { |
69 var object = new Object(); | 69 var object = new Object(); |
70 a.foo = 0; | 70 a.foo = {}; |
71 a[0] = 0; | 71 a[0] = 0; |
72 a[1] = 1; | 72 a[1] = 1; |
73 var count = 3; | 73 var count = 3; |
74 do { | 74 do { |
75 a.foo = object; // This map check should be hoistable | 75 a.foo = object; // This map check should be hoistable |
76 a[1] = object; | 76 a[1] = object; |
77 result = a.foo == object && a[1] == object; | 77 result = a.foo == object && a[1] == object; |
78 } while (--count > 0); | 78 } while (--count > 0); |
79 } | 79 } |
80 | 80 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 testStraightLineDupeElinination(new Array(5),0,.5,0,0,0); | 229 testStraightLineDupeElinination(new Array(5),0,.5,0,0,0); |
230 testStraightLineDupeElinination(new Array(5),0,0,.5,0,0); | 230 testStraightLineDupeElinination(new Array(5),0,0,.5,0,0); |
231 testStraightLineDupeElinination(new Array(5),0,0,0,.5,0); | 231 testStraightLineDupeElinination(new Array(5),0,0,0,.5,0); |
232 testStraightLineDupeElinination(new Array(5),0,0,0,0,.5); | 232 testStraightLineDupeElinination(new Array(5),0,0,0,0,.5); |
233 %OptimizeFunctionOnNextCall(testStraightLineDupeElinination); | 233 %OptimizeFunctionOnNextCall(testStraightLineDupeElinination); |
234 testStraightLineDupeElinination(new Array(5),0,0,0,0,0); | 234 testStraightLineDupeElinination(new Array(5),0,0,0,0,0); |
235 testStraightLineDupeElinination(new Array(5),0,0,0,0,0); | 235 testStraightLineDupeElinination(new Array(5),0,0,0,0,0); |
236 assertTrue(2 != %GetOptimizationStatus(testStraightLineDupeElinination)); | 236 assertTrue(2 != %GetOptimizationStatus(testStraightLineDupeElinination)); |
237 %ClearFunctionTypeFeedback(testStraightLineDupeElinination); | 237 %ClearFunctionTypeFeedback(testStraightLineDupeElinination); |
238 } | 238 } |
OLD | NEW |