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

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

Issue 1435283002: [Interpreter] Adds an optimization to remove redundant Ldar/Star. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased the patch Created 5 years, 1 month 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 30202c9d7252c9b42c544b9778f4782ce430e8df..8972beececb16800b0c4705b58afb32cd689651a 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -39,9 +39,12 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.LoadTrue()
.LoadFalse();
- // Emit accumulator transfers.
+ // Emit accumulator transfers. Stores followed by loads to the same register
+ // are not generated. Hence, a dummy instruction in between.
Register reg(0);
- builder.LoadAccumulatorWithRegister(reg).StoreAccumulatorInRegister(reg);
+ builder.LoadAccumulatorWithRegister(reg)
+ .LoadNull()
+ .StoreAccumulatorInRegister(reg);
// Emit global load / store operations.
builder.LoadGlobal(0, 1, LanguageMode::SLOPPY, TypeofMode::NOT_INSIDE_TYPEOF)
« 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