Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(946)

Side by Side Diff: test/cctest/interpreter/test-bytecode-generator.cc

Issue 2176143002: Remove the --ignition-generators flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 " }\n" 2217 " }\n"
2218 " test = new B().constructor;\n" 2218 " test = new B().constructor;\n"
2219 "})();\n", 2219 "})();\n",
2220 }; 2220 };
2221 2221
2222 CHECK(CompareTexts(BuildActual(printer, snippets), 2222 CHECK(CompareTexts(BuildActual(printer, snippets),
2223 LoadGolden("ClassAndSuperClass.golden"))); 2223 LoadGolden("ClassAndSuperClass.golden")));
2224 } 2224 }
2225 2225
2226 TEST(Generators) { 2226 TEST(Generators) {
2227 bool old_flag = FLAG_ignition_generators;
2228 FLAG_ignition_generators = true;
2229
2230 InitializedIgnitionHandleScope scope; 2227 InitializedIgnitionHandleScope scope;
2231 BytecodeExpectationsPrinter printer(CcTest::isolate(), 2228 BytecodeExpectationsPrinter printer(CcTest::isolate(),
2232 ConstantPoolType::kMixed); 2229 ConstantPoolType::kMixed);
2233 printer.set_wrap(false); 2230 printer.set_wrap(false);
2234 printer.set_test_function_name("f"); 2231 printer.set_test_function_name("f");
2235 2232
2236 const char* snippets[] = { 2233 const char* snippets[] = {
2237 "function* f() { }\n" 2234 "function* f() { }\n"
2238 "f();\n", 2235 "f();\n",
2239 2236
2240 "function* f() { yield 42 }\n" 2237 "function* f() { yield 42 }\n"
2241 "f();\n", 2238 "f();\n",
2242 2239
2243 "function* f() { for (let x of [42]) yield x }\n" 2240 "function* f() { for (let x of [42]) yield x }\n"
2244 "f();\n", 2241 "f();\n",
2245 }; 2242 };
2246 2243
2247 CHECK(CompareTexts(BuildActual(printer, snippets), 2244 CHECK(CompareTexts(BuildActual(printer, snippets),
2248 LoadGolden("Generators.golden"))); 2245 LoadGolden("Generators.golden")));
2249
2250 FLAG_ignition_generators = old_flag;
2251 } 2246 }
2252 2247
2253 } // namespace interpreter 2248 } // namespace interpreter
2254 } // namespace internal 2249 } // namespace internal
2255 } // namespace v8 2250 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/interpreter/generate-bytecode-expectations.cc ('k') | test/cctest/interpreter/test-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698