OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 assertTrue(true); | 163 assertTrue(true); |
164 a[0] = object; | 164 a[0] = object; |
165 } while (--count > 3); | 165 } while (--count > 3); |
166 } | 166 } |
167 | 167 |
168 testHoistingWithSideEffect(new Array(5)); | 168 testHoistingWithSideEffect(new Array(5)); |
169 %OptimizeFunctionOnNextCall(testHoistingWithSideEffect); | 169 %OptimizeFunctionOnNextCall(testHoistingWithSideEffect); |
170 testHoistingWithSideEffect(new Array(5)); | 170 testHoistingWithSideEffect(new Array(5)); |
171 testHoistingWithSideEffect(new Array(5)); | 171 testHoistingWithSideEffect(new Array(5)); |
172 assertTrue(2 != %GetOptimizationStatus(testHoistingWithSideEffect)); | 172 assertTrue(2 != %GetOptimizationStatus(testHoistingWithSideEffect)); |
173 | |
174 function testStraightLineDupeElinination(a,b,c,d,e,f) { | |
175 var count = 3; | |
176 do { | |
177 assertTrue(true); | |
178 a[0] = b; | |
179 a[1] = c; | |
180 a[2] = d; | |
181 a[3] = e; | |
182 a[4] = f; | |
183 } while (--count > 3); | |
184 } | |
185 | |
186 print("DUDE"); | |
fschneider
2012/02/15 15:36:48
Printing can be removed.
danno
2012/02/16 13:08:52
Done.
| |
187 testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),.5,0,0,0,0); | |
188 testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,.5,0,0,0); | |
189 testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,0,.5,0,0); | |
190 testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,0,0,.5,0); | |
191 testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,0,0,0,.5); | |
192 testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),.5,0,0,0,0); | |
193 testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,.5,0,0,0); | |
194 testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,0,.5,0,0); | |
195 testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,0,0,.5,0); | |
196 testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,0,0,0,.5); | |
197 print("DUDE2"); | |
fschneider
2012/02/15 15:36:48
Printing can be removed.
danno
2012/02/16 13:08:52
Done.
| |
198 testStraightLineDupeElinination(new Array(5),.5,0,0,0,0); | |
199 testStraightLineDupeElinination(new Array(5),0,.5,0,0,0); | |
200 testStraightLineDupeElinination(new Array(5),0,0,.5,0,0); | |
201 testStraightLineDupeElinination(new Array(5),0,0,0,.5,0); | |
202 testStraightLineDupeElinination(new Array(5),0,0,0,0,.5); | |
203 testStraightLineDupeElinination(new Array(5),.5,0,0,0,0); | |
204 testStraightLineDupeElinination(new Array(5),0,.5,0,0,0); | |
205 testStraightLineDupeElinination(new Array(5),0,0,.5,0,0); | |
206 testStraightLineDupeElinination(new Array(5),0,0,0,.5,0); | |
207 testStraightLineDupeElinination(new Array(5),0,0,0,0,.5); | |
208 %OptimizeFunctionOnNextCall(testStraightLineDupeElinination); | |
209 testStraightLineDupeElinination(new Array(5)); | |
210 testStraightLineDupeElinination(new Array(5)); | |
211 assertTrue(2 != %GetOptimizationStatus(testStraightLineDupeElinination)); | |
173 } | 212 } |
OLD | NEW |