| 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 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 "var n0 = 'a';\n" | 2110 "var n0 = 'a';\n" |
| 2111 "var n1 = 'b';\n" | 2111 "var n1 = 'b';\n" |
| 2112 "class N {\n" | 2112 "class N {\n" |
| 2113 " [n0]() { return n0; }\n" | 2113 " [n0]() { return n0; }\n" |
| 2114 " static [n1]() { return n1; }\n" | 2114 " static [n1]() { return n1; }\n" |
| 2115 "}\n", | 2115 "}\n", |
| 2116 | 2116 |
| 2117 "var count = 0;\n" | 2117 "var count = 0;\n" |
| 2118 "class C { constructor() { count++; }}\n" | 2118 "class C { constructor() { count++; }}\n" |
| 2119 "return new C();\n", | 2119 "return new C();\n", |
| 2120 |
| 2121 "(class {})\n" |
| 2122 "class E { static name () {}}\n", |
| 2120 }; | 2123 }; |
| 2121 | 2124 |
| 2122 CHECK(CompareTexts(BuildActual(printer, snippets), | 2125 CHECK(CompareTexts(BuildActual(printer, snippets), |
| 2123 LoadGolden("ClassDeclarations.golden"))); | 2126 LoadGolden("ClassDeclarations.golden"))); |
| 2124 } | 2127 } |
| 2125 | 2128 |
| 2126 TEST(ClassAndSuperClass) { | 2129 TEST(ClassAndSuperClass) { |
| 2127 InitializedIgnitionHandleScope scope; | 2130 InitializedIgnitionHandleScope scope; |
| 2128 BytecodeExpectationsPrinter printer(CcTest::isolate()); | 2131 BytecodeExpectationsPrinter printer(CcTest::isolate()); |
| 2129 printer.set_wrap(false); | 2132 printer.set_wrap(false); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2284 "})();\n", | 2287 "})();\n", |
| 2285 }; | 2288 }; |
| 2286 | 2289 |
| 2287 CHECK(CompareTexts(BuildActual(printer, snippets), | 2290 CHECK(CompareTexts(BuildActual(printer, snippets), |
| 2288 LoadGolden("SuperCallAndSpread.golden"))); | 2291 LoadGolden("SuperCallAndSpread.golden"))); |
| 2289 } | 2292 } |
| 2290 | 2293 |
| 2291 } // namespace interpreter | 2294 } // namespace interpreter |
| 2292 } // namespace internal | 2295 } // namespace internal |
| 2293 } // namespace v8 | 2296 } // namespace v8 |
| OLD | NEW |