OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --strong-mode --harmony-arrow-functions --harmony-reflect | 5 // Flags: --strong-mode --harmony-arrow-functions --harmony-reflect |
6 // Flags: --harmony-spreadcalls --allow-natives-syntax | 6 // Flags: --harmony-spreadcalls --allow-natives-syntax |
7 | 7 |
8 'use strict'; | 8 'use strict'; |
9 | 9 |
10 | 10 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 assertThrows(g, TypeError); | 283 assertThrows(g, TypeError); |
284 %OptimizeFunctionOnNextCall(g); | 284 %OptimizeFunctionOnNextCall(g); |
285 assertThrows(g, TypeError); | 285 assertThrows(g, TypeError); |
286 | 286 |
287 f(1, 2); | 287 f(1, 2); |
288 %OptimizeFunctionOnNextCall(f); | 288 %OptimizeFunctionOnNextCall(f); |
289 f(1, 2); | 289 f(1, 2); |
290 })(); | 290 })(); |
291 | 291 |
292 | 292 |
| 293 (function TestOptimized3() { |
| 294 function f(x, y) {} |
| 295 function g() { |
| 296 'use strong'; |
| 297 f(1); |
| 298 } |
| 299 |
| 300 g(); |
| 301 %OptimizeFunctionOnNextCall(f); |
| 302 g(); |
| 303 })(); |
| 304 |
| 305 |
293 // https://code.google.com/p/v8/issues/detail?id=4077 | 306 // https://code.google.com/p/v8/issues/detail?id=4077 |
294 // (function NoParametersSuper() { | 307 // (function NoParametersSuper() { |
295 // 'use strong'; | 308 // 'use strong'; |
296 // | 309 // |
297 // class B { | 310 // class B { |
298 // m() {} | 311 // m() {} |
299 // } | 312 // } |
300 // class D extends B { | 313 // class D extends B { |
301 // m0() { super.m(); } | 314 // m0() { super.m(); } |
302 // m1() { super.m(1); } | 315 // m1() { super.m(1); } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 // assertThrows(function() { new D().m0(); }, TypeError); | 372 // assertThrows(function() { new D().m0(); }, TypeError); |
360 // assertThrows(function() { new D().m1(); }, TypeError); | 373 // assertThrows(function() { new D().m1(); }, TypeError); |
361 // new D().m2(); | 374 // new D().m2(); |
362 // new D().m3(); | 375 // new D().m3(); |
363 // | 376 // |
364 // assertThrows(function() { new D().s0(); }, TypeError); | 377 // assertThrows(function() { new D().s0(); }, TypeError); |
365 // assertThrows(function() { new D().s1(); }, TypeError); | 378 // assertThrows(function() { new D().s1(); }, TypeError); |
366 // new D().s2(); | 379 // new D().s2(); |
367 // new D().s3(); | 380 // new D().s3(); |
368 // })(); | 381 // })(); |
OLD | NEW |