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 } |
563 InitializedIgnitionHandleScope scope; | 568 InitializedIgnitionHandleScope scope; |
564 BytecodeExpectationsPrinter printer(CcTest::isolate(), | 569 BytecodeExpectationsPrinter printer(CcTest::isolate(), |
565 ConstantPoolType::kNumber); | 570 ConstantPoolType::kNumber); |
566 printer.set_wrap(false); | 571 printer.set_wrap(false); |
567 printer.set_test_function_name("f"); | 572 printer.set_test_function_name("f"); |
568 | 573 |
569 const char* snippets[] = { | 574 const char* snippets[] = { |
570 "function f() {\n" | 575 "function f() {\n" |
571 " if (0) {\n" | 576 " if (0) {\n" |
572 " return 1;\n" | 577 " return 1;\n" |
(...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2186 "})();\n", | 2191 "})();\n", |
2187 }; | 2192 }; |
2188 | 2193 |
2189 CHECK_EQ(BuildActual(printer, snippets), | 2194 CHECK_EQ(BuildActual(printer, snippets), |
2190 LoadGolden("ClassAndSuperClass.golden")); | 2195 LoadGolden("ClassAndSuperClass.golden")); |
2191 } | 2196 } |
2192 | 2197 |
2193 } // namespace interpreter | 2198 } // namespace interpreter |
2194 } // namespace internal | 2199 } // namespace internal |
2195 } // namespace v8 | 2200 } // namespace v8 |
OLD | NEW |