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

Unified Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 1664593003: [Interpreter] Adds support for rest parameters to interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes comments. Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/test262/test262.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/interpreter/bytecode-array-builder-unittest.cc
diff --git a/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
index 4dc5d5d32dbae3dcf08a0d8ec63b7b5220cf9373..0c4f431dbe405ee0fd83222e56502bd036f42fe1 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -30,6 +30,12 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
CHECK_EQ(builder.context_count(), 1);
CHECK_EQ(builder.fixed_register_count(), 132);
+ // Emit argument creation operations. CreateRestArguments should
+ // be output before any bytecodes that change constant pool.
+ builder.CreateArguments(CreateArgumentsType::kMappedArguments)
+ .CreateArguments(CreateArgumentsType::kUnmappedArguments)
+ .CreateRestArguments(0);
+
// Emit constant loads.
builder.LoadLiteral(Smi::FromInt(0))
.LoadLiteral(Smi::FromInt(8))
@@ -91,10 +97,6 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
false);
builder.CreateClosure(shared_info, NOT_TENURED);
- // Emit argument creation operations.
- builder.CreateArguments(CreateArgumentsType::kMappedArguments)
- .CreateArguments(CreateArgumentsType::kUnmappedArguments);
-
// Emit literal creation operations.
builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0)
.CreateArrayLiteral(factory->NewFixedArray(1), 0, 0)
« no previous file with comments | « test/test262/test262.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698