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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 f(input.length - 1, 11.11, 12.12); | 177 f(input.length - 1, 11.11, 12.12); |
178 | 178 |
179 // Add the debug event listener. | 179 // Add the debug event listener. |
180 Debug.setListener(listener); | 180 Debug.setListener(listener); |
181 | 181 |
182 function h(i, x0, y0) { | 182 function h(i, x0, y0) { |
183 var a0 = input[i].a; | 183 var a0 = input[i].a; |
184 var b0 = input[i].b; | 184 var b0 = input[i].b; |
185 a0 = a0 + a0 / 100; | 185 a0 = a0 + a0 / 100; |
186 b0 = b0 + b0 / 100; | 186 b0 = b0 + b0 / 100; |
187 debugger; // Breakpoint. | 187 debugger; // Breakpoint. |
titzer
2013/05/29 16:58:05
Not sure why we are changing these tests. Does som
Jakob Kummerow
2013/06/03 17:50:38
We need to extend the live ranges of the values th
| |
188 return a0 + b0; | |
188 }; | 189 }; |
189 | 190 |
190 function g3(i, x1, y1) { | 191 function g3(i, x1, y1) { |
191 var a1 = input[i].a; | 192 var a1 = input[i].a; |
192 var b1 = input[i].b; | 193 var b1 = input[i].b; |
193 a1 = a1 + a1 / 100; | 194 a1 = a1 + a1 / 100; |
194 b1 = b1 + b1 / 100; | 195 b1 = b1 + b1 / 100; |
195 h(i - 1, a1, b1); | 196 h(i - 1, a1, b1); |
196 return a1+b1; | 197 return a1 + b1; |
197 }; | 198 }; |
198 | 199 |
199 function g2(i) { | 200 function g2(i) { |
200 var a2 = input[i].a; | 201 var a2 = input[i].a; |
201 var b2 = input[i].b; | 202 var b2 = input[i].b; |
202 a2 = a2 + a2 / 100; | 203 a2 = a2 + a2 / 100; |
203 b2 = b2 + b2 / 100; | 204 b2 = b2 + b2 / 100; |
204 g3(i - 1, a2, b2); | 205 g3(i - 1, a2, b2); |
206 return a2 + b2; | |
205 }; | 207 }; |
206 | 208 |
207 function g1(i, x3, y3, z3) { | 209 function g1(i, x3, y3, z3) { |
208 var a3 = input[i].a; | 210 var a3 = input[i].a; |
209 var b3 = input[i].b; | 211 var b3 = input[i].b; |
210 a3 = a3 + a3 / 100; | 212 a3 = a3 + a3 / 100; |
211 b3 = b3 + b3 / 100; | 213 b3 = b3 + b3 / 100; |
212 new g2(i - 1, a3, b3); | 214 new g2(i - 1, a3, b3); |
215 return a3 + b3; | |
213 }; | 216 }; |
214 | 217 |
215 function f(i, x4, y4) { | 218 function f(i, x4, y4) { |
216 var a4 = input[i].a; | 219 var a4 = input[i].a; |
217 var b4 = input[i].b; | 220 var b4 = input[i].b; |
218 a4 = a4 + a4 / 100; | 221 a4 = a4 + a4 / 100; |
219 b4 = b4 + b4 / 100; | 222 b4 = b4 + b4 / 100; |
220 g1(i - 1, a4, b4); | 223 g1(i - 1, a4, b4); |
224 return a4 + b4; | |
221 }; | 225 }; |
222 | 226 |
223 // Test calling f normally and as a constructor. | 227 // Test calling f normally and as a constructor. |
224 f(input.length - 1, 11.11, 12.12); | 228 f(input.length - 1, 11.11, 12.12); |
225 f(input.length - 1, 11.11, 12.12, ""); | 229 f(input.length - 1, 11.11, 12.12, ""); |
226 testingConstructCall = true; | 230 testingConstructCall = true; |
227 new f(input.length - 1, 11.11, 12.12); | 231 new f(input.length - 1, 11.11, 12.12); |
228 new f(input.length - 1, 11.11, 12.12, ""); | 232 new f(input.length - 1, 11.11, 12.12, ""); |
229 | 233 |
230 // Make sure that the debug event listener was invoked. | 234 // Make sure that the debug event listener was invoked. |
231 assertFalse(exception, "exception in listener " + exception) | 235 assertFalse(exception, "exception in listener " + exception) |
232 assertTrue(listenerComplete); | 236 assertTrue(listenerComplete); |
233 | 237 |
234 //Throw away type information for next run. | 238 //Throw away type information for next run. |
235 gc(); | 239 gc(); |
236 | 240 |
237 Debug.setListener(null); | 241 Debug.setListener(null); |
OLD | NEW |