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

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

Issue 1413863010: [Interpreter] Add wide varients of bytecodes with feedback and constant pool indexes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_fixbuiltinstacklimit
Patch Set: Rebased Created 5 years, 2 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/unittests/compiler/interpreter-assembler-unittest.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 cd6270ec6fdae24fd2120fb3c64251ae1fa6508c..20c4e38a788d00c923428f406e7f68c711d686cf 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -49,6 +49,12 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.StoreGlobal(0, 1, LanguageMode::SLOPPY)
.StoreGlobal(0, 1, LanguageMode::STRICT);
+ // Emit wide global load / store operations.
+ builder.LoadGlobal(0, 1024, LanguageMode::SLOPPY)
+ .LoadGlobal(1024, 1, LanguageMode::STRICT)
+ .StoreGlobal(0, 1024, LanguageMode::SLOPPY)
+ .StoreGlobal(1024, 1, LanguageMode::STRICT);
+
// Emit context operations.
builder.PushContext(reg);
builder.PopContext(reg);
@@ -65,6 +71,16 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.StoreNamedProperty(reg, 0, 0, LanguageMode::STRICT)
.StoreKeyedProperty(reg, reg, 0, LanguageMode::STRICT);
+ // Emit wide load / store property operations.
+ builder.LoadNamedProperty(reg, 2056, 0, LanguageMode::SLOPPY)
+ .LoadKeyedProperty(reg, 2056, LanguageMode::SLOPPY)
+ .StoreNamedProperty(reg, 0, 2056, LanguageMode::SLOPPY)
+ .StoreKeyedProperty(reg, reg, 2056, LanguageMode::SLOPPY)
+ .LoadNamedProperty(reg, 2056, 0, LanguageMode::STRICT)
+ .LoadKeyedProperty(reg, 2056, LanguageMode::STRICT)
+ .StoreNamedProperty(reg, 0, 2056, LanguageMode::STRICT)
+ .StoreKeyedProperty(reg, reg, 2056, LanguageMode::STRICT);
+
// Emit closure operations.
builder.CreateClosure(NOT_TENURED);
@@ -160,6 +176,13 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
builder.ForInPrepare(reg).ForInDone(reg).ForInNext(reg, reg);
+ // Wide constant pool loads
+ for (int i = 0; i < 256; i++) {
+ // Emit junk in constant pool to force wide constant pool index.
+ builder.GetConstantPoolEntry(handle(Smi::FromInt(i), isolate()));
+ }
+ builder.LoadLiteral(Smi::FromInt(20000000));
+
builder.Return();
// Generate BytecodeArray.
« no previous file with comments | « test/unittests/compiler/interpreter-assembler-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698