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 #include <fstream> | 5 #include <fstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/interpreter/bytecode-array-iterator.h" | 9 #include "src/interpreter/bytecode-array-iterator.h" |
10 #include "src/interpreter/bytecode-generator.h" | 10 #include "src/interpreter/bytecode-generator.h" |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 "f(" FUNC_ARG ", 1, 2)", | 456 "f(" FUNC_ARG ", 1, 2)", |
457 | 457 |
458 "function f(a, b) { return a.func(b + b, b); }\n" | 458 "function f(a, b) { return a.func(b + b, b); }\n" |
459 "f(" FUNC_ARG ", 1)", | 459 "f(" FUNC_ARG ", 1)", |
460 | 460 |
461 "function f(a) {\n" | 461 "function f(a) {\n" |
462 " a.func;\n" // | 462 " a.func;\n" // |
463 REPEAT_127(" a.func;\n") // | 463 REPEAT_127(" a.func;\n") // |
464 " return a.func(); }\n" | 464 " return a.func(); }\n" |
465 "f(" FUNC_ARG ")", | 465 "f(" FUNC_ARG ")", |
| 466 |
| 467 "function f(a) { return a.func(1).func(2).func(3); }\n" |
| 468 "f(new (function Obj() { this.func = function(a) { return this; }})())", |
466 }; | 469 }; |
467 | 470 |
468 CHECK(CompareTexts(BuildActual(printer, snippets), | 471 CHECK(CompareTexts(BuildActual(printer, snippets), |
469 LoadGolden("PropertyCall.golden"))); | 472 LoadGolden("PropertyCall.golden"))); |
470 } | 473 } |
471 | 474 |
472 TEST(LoadGlobal) { | 475 TEST(LoadGlobal) { |
473 InitializedIgnitionHandleScope scope; | 476 InitializedIgnitionHandleScope scope; |
474 BytecodeExpectationsPrinter printer(CcTest::isolate()); | 477 BytecodeExpectationsPrinter printer(CcTest::isolate()); |
475 printer.set_wrap(false); | 478 printer.set_wrap(false); |
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2312 "})();\n", | 2315 "})();\n", |
2313 }; | 2316 }; |
2314 | 2317 |
2315 CHECK(CompareTexts(BuildActual(printer, snippets), | 2318 CHECK(CompareTexts(BuildActual(printer, snippets), |
2316 LoadGolden("SuperCallAndSpread.golden"))); | 2319 LoadGolden("SuperCallAndSpread.golden"))); |
2317 } | 2320 } |
2318 | 2321 |
2319 } // namespace interpreter | 2322 } // namespace interpreter |
2320 } // namespace internal | 2323 } // namespace internal |
2321 } // namespace v8 | 2324 } // namespace v8 |
OLD | NEW |