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

Unified Diff: test/cctest/interpreter/test-interpreter.cc

Issue 1546643002: [Interpreter] Updates load/store global and named property to accept variable name. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
Index: test/cctest/interpreter/test-interpreter.cc
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc
index 979d723bc7fa375223f1114f21598dd6a7c4cc95..4e0c9176a4cd426d62829999ac60e8561a837c7a 100644
--- a/test/cctest/interpreter/test-interpreter.cc
+++ b/test/cctest/interpreter/test-interpreter.cc
@@ -774,9 +774,8 @@ TEST(InterpreterLoadNamedProperty) {
builder.set_locals_count(0);
builder.set_context_count(0);
builder.set_parameter_count(1);
- size_t name_index = builder.GetConstantPoolEntry(name);
- builder.LoadNamedProperty(builder.Parameter(0), name_index,
- vector->GetIndex(slot), i::SLOPPY)
+ builder.LoadNamedProperty(builder.Parameter(0), name, vector->GetIndex(slot),
+ i::SLOPPY)
.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
@@ -876,10 +875,9 @@ TEST(InterpreterStoreNamedProperty) {
builder.set_locals_count(0);
builder.set_context_count(0);
builder.set_parameter_count(1);
- size_t name_index = builder.GetConstantPoolEntry(name);
builder.LoadLiteral(Smi::FromInt(999))
- .StoreNamedProperty(builder.Parameter(0), name_index,
- vector->GetIndex(slot), i::STRICT)
+ .StoreNamedProperty(builder.Parameter(0), name, vector->GetIndex(slot),
+ i::STRICT)
.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
@@ -991,9 +989,7 @@ TEST(InterpreterCall) {
builder.set_locals_count(1);
builder.set_context_count(0);
builder.set_parameter_count(1);
- size_t name_index = builder.GetConstantPoolEntry(name);
- builder.LoadNamedProperty(builder.Parameter(0), name_index, slot_index,
- i::SLOPPY)
+ builder.LoadNamedProperty(builder.Parameter(0), name, slot_index, i::SLOPPY)
.StoreAccumulatorInRegister(Register(0))
.Call(Register(0), builder.Parameter(0), 0, 0)
.Return();
@@ -1014,9 +1010,7 @@ TEST(InterpreterCall) {
builder.set_locals_count(1);
builder.set_context_count(0);
builder.set_parameter_count(1);
- size_t name_index = builder.GetConstantPoolEntry(name);
- builder.LoadNamedProperty(builder.Parameter(0), name_index, slot_index,
- i::SLOPPY)
+ builder.LoadNamedProperty(builder.Parameter(0), name, slot_index, i::SLOPPY)
.StoreAccumulatorInRegister(Register(0))
.Call(Register(0), builder.Parameter(0), 0, 0)
.Return();
@@ -1040,9 +1034,7 @@ TEST(InterpreterCall) {
builder.set_locals_count(4);
builder.set_context_count(0);
builder.set_parameter_count(1);
- size_t name_index = builder.GetConstantPoolEntry(name);
- builder.LoadNamedProperty(builder.Parameter(0), name_index, slot_index,
- i::SLOPPY)
+ builder.LoadNamedProperty(builder.Parameter(0), name, slot_index, i::SLOPPY)
.StoreAccumulatorInRegister(Register(0))
.LoadAccumulatorWithRegister(builder.Parameter(0))
.StoreAccumulatorInRegister(Register(1))
@@ -1071,9 +1063,7 @@ TEST(InterpreterCall) {
builder.set_locals_count(12);
builder.set_context_count(0);
builder.set_parameter_count(1);
- size_t name_index = builder.GetConstantPoolEntry(name);
- builder.LoadNamedProperty(builder.Parameter(0), name_index, slot_index,
- i::SLOPPY)
+ builder.LoadNamedProperty(builder.Parameter(0), name, slot_index, i::SLOPPY)
.StoreAccumulatorInRegister(Register(0))
.LoadAccumulatorWithRegister(builder.Parameter(0))
.StoreAccumulatorInRegister(Register(1))
« no previous file with comments | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | test/unittests/interpreter/bytecode-array-builder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698