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

Unified Diff: test/cctest/interpreter/test-bytecode-generator.cc

Issue 2540593003: Move desugaring of super calls with trailing spread to one runtime call. (Closed)
Patch Set: fix potential evaluation order issue Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/interpreter/test-bytecode-generator.cc
diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc
index 235ebacf8e83601a717f8a069b4ac3954244763e..b583b331fda90871f081cec742db6ed5b5061290 100644
--- a/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/test/cctest/interpreter/test-bytecode-generator.cc
@@ -2246,6 +2246,48 @@ TEST(Modules) {
LoadGolden("Modules.golden")));
}
+TEST(SuperCallAndSpread) {
+ InitializedIgnitionHandleScope scope;
+ BytecodeExpectationsPrinter printer(CcTest::isolate());
+ printer.set_wrap(false);
+ printer.set_test_function_name("test");
+ const char* snippets[] = {
+ "var test;\n"
+ "(function() {\n"
+ " class A {\n"
+ " constructor(...args) { this.baseArgs = args; }\n"
+ " }\n"
+ " class B extends A {}\n"
+ " test = new B(1, 2, 3).constructor;\n"
+ "})();\n",
+
+ "var test;\n"
+ "(function() {\n"
+ " class A {\n"
+ " constructor(...args) { this.baseArgs = args; }\n"
+ " }\n"
+ " class B extends A {\n"
+ " constructor(...args) { super(1, ...args); }\n"
+ " }\n"
+ " test = new B(1, 2, 3).constructor;\n"
+ "})();\n",
+
+ "var test;\n"
+ "(function() {\n"
+ " class A {\n"
+ " constructor(...args) { this.baseArgs = args; }\n"
+ " }\n"
+ " class B extends A {\n"
+ " constructor(...args) { super(1, ...args, 1); }\n"
+ " }\n"
+ " test = new B(1, 2, 3).constructor;\n"
+ "})();\n",
+ };
+
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("SuperCallAndSpread.golden")));
+}
+
} // namespace interpreter
} // namespace internal
} // namespace v8
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698