| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 "f(" FUNC_ARG ", 1, 2)", | 457 "f(" FUNC_ARG ", 1, 2)", |
| 458 | 458 |
| 459 "function f(a, b) { return a.func(b + b, b); }\n" | 459 "function f(a, b) { return a.func(b + b, b); }\n" |
| 460 "f(" FUNC_ARG ", 1)", | 460 "f(" FUNC_ARG ", 1)", |
| 461 | 461 |
| 462 "function f(a) {\n" | 462 "function f(a) {\n" |
| 463 " a.func;\n" // | 463 " a.func;\n" // |
| 464 REPEAT_127(" a.func;\n") // | 464 REPEAT_127(" a.func;\n") // |
| 465 " return a.func(); }\n" | 465 " return a.func(); }\n" |
| 466 "f(" FUNC_ARG ")", | 466 "f(" FUNC_ARG ")", |
| 467 |
| 468 "function f(a) { return a.func(1).func(2).func(3); }\n" |
| 469 "f(new (function Obj() { this.func = function(a) { return this; }})())", |
| 467 }; | 470 }; |
| 468 | 471 |
| 469 CHECK(CompareTexts(BuildActual(printer, snippets), | 472 CHECK(CompareTexts(BuildActual(printer, snippets), |
| 470 LoadGolden("PropertyCall.golden"))); | 473 LoadGolden("PropertyCall.golden"))); |
| 471 } | 474 } |
| 472 | 475 |
| 473 TEST(LoadGlobal) { | 476 TEST(LoadGlobal) { |
| 474 InitializedIgnitionHandleScope scope; | 477 InitializedIgnitionHandleScope scope; |
| 475 BytecodeExpectationsPrinter printer(CcTest::isolate()); | 478 BytecodeExpectationsPrinter printer(CcTest::isolate()); |
| 476 printer.set_wrap(false); | 479 printer.set_wrap(false); |
| (...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2243 "foo.f(foo, foo.x);\n", | 2246 "foo.f(foo, foo.x);\n", |
| 2244 }; | 2247 }; |
| 2245 | 2248 |
| 2246 CHECK(CompareTexts(BuildActual(printer, snippets), | 2249 CHECK(CompareTexts(BuildActual(printer, snippets), |
| 2247 LoadGolden("Modules.golden"))); | 2250 LoadGolden("Modules.golden"))); |
| 2248 } | 2251 } |
| 2249 | 2252 |
| 2250 } // namespace interpreter | 2253 } // namespace interpreter |
| 2251 } // namespace internal | 2254 } // namespace internal |
| 2252 } // namespace v8 | 2255 } // namespace v8 |
| OLD | NEW |