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/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/interpreter/bytecode-array-iterator.h" | 10 #include "src/interpreter/bytecode-array-iterator.h" |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 "f();", | 553 "f();", |
554 | 554 |
555 "function f() { return %spread_iterable([1]) }\n" | 555 "function f() { return %spread_iterable([1]) }\n" |
556 "f();", | 556 "f();", |
557 }; | 557 }; |
558 | 558 |
559 CHECK_EQ(BuildActual(printer, snippets), LoadGolden("CallRuntime.golden")); | 559 CHECK_EQ(BuildActual(printer, snippets), LoadGolden("CallRuntime.golden")); |
560 } | 560 } |
561 | 561 |
562 TEST(IfConditions) { | 562 TEST(IfConditions) { |
563 if (FLAG_harmony_instanceof) { | |
564 // TODO(mvstanton): when ES6 instanceof ships, regenerate the bytecode | |
565 // expectations and remove this flag check. | |
566 return; | |
567 } | |
568 InitializedIgnitionHandleScope scope; | 563 InitializedIgnitionHandleScope scope; |
569 BytecodeExpectationsPrinter printer(CcTest::isolate(), | 564 BytecodeExpectationsPrinter printer(CcTest::isolate(), |
570 ConstantPoolType::kNumber); | 565 ConstantPoolType::kMixed); |
571 printer.set_wrap(false); | 566 printer.set_wrap(false); |
572 printer.set_test_function_name("f"); | 567 printer.set_test_function_name("f"); |
573 | 568 |
574 const char* snippets[] = { | 569 const char* snippets[] = { |
575 "function f() {\n" | 570 "function f() {\n" |
576 " if (0) {\n" | 571 " if (0) {\n" |
577 " return 1;\n" | 572 " return 1;\n" |
578 " } else {\n" | 573 " } else {\n" |
579 " return -1;\n" | 574 " return -1;\n" |
580 " }\n" | 575 " }\n" |
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2150 "})();\n", | 2145 "})();\n", |
2151 }; | 2146 }; |
2152 | 2147 |
2153 CHECK_EQ(BuildActual(printer, snippets), | 2148 CHECK_EQ(BuildActual(printer, snippets), |
2154 LoadGolden("ClassAndSuperClass.golden")); | 2149 LoadGolden("ClassAndSuperClass.golden")); |
2155 } | 2150 } |
2156 | 2151 |
2157 } // namespace interpreter | 2152 } // namespace interpreter |
2158 } // namespace internal | 2153 } // namespace internal |
2159 } // namespace v8 | 2154 } // namespace v8 |
OLD | NEW |