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

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

Issue 1503963002: [Interpreter] Adds wide variant of CreateLiterals. Adds CreateLiterals to BytecodeGraphBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: renamed BuildLiteral to BuildCreateLiteral. Created 5 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/test-bytecode-generator.cc ('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 e9dd452f95ae9a796a0c4457e8074af7e2384153..d15fc0a7bf4ae988c1e35642dbd3abef39575414 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -104,10 +104,10 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
builder.CreateArguments(CreateArgumentsType::kMappedArguments)
.CreateArguments(CreateArgumentsType::kUnmappedArguments);
- // Emit literal creation operations
- builder.CreateRegExpLiteral(0, 0)
- .CreateArrayLiteral(0, 0)
- .CreateObjectLiteral(0, 0);
+ // Emit literal creation operations.
+ builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0)
+ .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0)
+ .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0);
// Call operations.
builder.Call(reg, reg, 0, 0)
@@ -225,6 +225,12 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
false);
builder.CreateClosure(shared_info2, NOT_TENURED);
+ // Emit wide variant of literal creation operations.
+ builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("wide_literal"),
+ 0, 0)
+ .CreateArrayLiteral(factory->NewFixedArray(2), 0, 0)
+ .CreateObjectLiteral(factory->NewFixedArray(2), 0, 0);
+
builder.Return();
// Generate BytecodeArray.
« no previous file with comments | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698