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

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

Issue 1412683011: [Interpreter] Enable assignments in expressions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. 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
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..963b498a9a55f6c5659c690b280ebbe754362274 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -22,12 +22,12 @@ class BytecodeArrayBuilderTest : public TestWithIsolateAndZone {
TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
BytecodeArrayBuilder builder(isolate(), zone());
- builder.set_locals_count(1);
+ builder.set_locals_count(2);
builder.set_context_count(1);
builder.set_parameter_count(0);
- CHECK_EQ(builder.locals_count(), 1);
+ CHECK_EQ(builder.locals_count(), 2);
CHECK_EQ(builder.context_count(), 1);
- CHECK_EQ(builder.fixed_register_count(), 2);
+ CHECK_EQ(builder.fixed_register_count(), 3);
// Emit constant loads.
builder.LoadLiteral(Smi::FromInt(0))
@@ -43,6 +43,10 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
Register reg(0);
builder.LoadAccumulatorWithRegister(reg).StoreAccumulatorInRegister(reg);
+ // Emit register-register transfer.
+ Register other(1);
+ builder.MoveRegister(reg, other);
+
// Emit global load / store operations.
builder.LoadGlobal(0, 1, LanguageMode::SLOPPY, TypeofMode::NOT_INSIDE_TYPEOF)
.LoadGlobal(0, 1, LanguageMode::STRICT, TypeofMode::NOT_INSIDE_TYPEOF)
« test/cctest/interpreter/test-interpreter.cc ('K') | « test/cctest/interpreter/test-interpreter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698