Index: test/cctest/interpreter/test-interpreter.cc |
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc |
index 05da5fe304e962ab5bb22d516ff8b91f7ba62d07..8128be5ddf675130ba3f3965fbed306d1a811746 100644 |
--- a/test/cctest/interpreter/test-interpreter.cc |
+++ b/test/cctest/interpreter/test-interpreter.cc |
@@ -780,9 +780,9 @@ TEST(InterpreterLoadNamedProperty) { |
builder.set_locals_count(0); |
builder.set_context_count(0); |
builder.set_parameter_count(1); |
- builder.LoadLiteral(name) |
- .LoadNamedProperty(builder.Parameter(0), vector->GetIndex(slot), |
- i::SLOPPY) |
+ size_t name_index = builder.GetConstantPoolEntry(name); |
+ builder.LoadNamedProperty(builder.Parameter(0), name_index, |
+ vector->GetIndex(slot), i::SLOPPY) |
.Return(); |
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(); |
@@ -879,13 +879,12 @@ TEST(InterpreterStoreNamedProperty) { |
name = factory->string_table()->LookupString(isolate, name); |
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone()); |
- builder.set_locals_count(1); |
+ builder.set_locals_count(0); |
builder.set_context_count(0); |
builder.set_parameter_count(1); |
- builder.LoadLiteral(name) |
- .StoreAccumulatorInRegister(Register(0)) |
- .LoadLiteral(Smi::FromInt(999)) |
- .StoreNamedProperty(builder.Parameter(0), Register(0), |
+ size_t name_index = builder.GetConstantPoolEntry(name); |
+ builder.LoadLiteral(Smi::FromInt(999)) |
+ .StoreNamedProperty(builder.Parameter(0), name_index, |
vector->GetIndex(slot), i::STRICT) |
.Return(); |
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(); |
@@ -998,8 +997,9 @@ TEST(InterpreterCall) { |
builder.set_locals_count(1); |
builder.set_context_count(0); |
builder.set_parameter_count(1); |
- builder.LoadLiteral(name) |
- .LoadNamedProperty(builder.Parameter(0), slot_index, i::SLOPPY) |
+ size_t name_index = builder.GetConstantPoolEntry(name); |
+ builder.LoadNamedProperty(builder.Parameter(0), name_index, slot_index, |
+ i::SLOPPY) |
.StoreAccumulatorInRegister(Register(0)) |
.Call(Register(0), builder.Parameter(0), 0) |
.Return(); |
@@ -1020,8 +1020,9 @@ TEST(InterpreterCall) { |
builder.set_locals_count(1); |
builder.set_context_count(0); |
builder.set_parameter_count(1); |
- builder.LoadLiteral(name) |
- .LoadNamedProperty(builder.Parameter(0), slot_index, i::SLOPPY) |
+ size_t name_index = builder.GetConstantPoolEntry(name); |
+ builder.LoadNamedProperty(builder.Parameter(0), name_index, slot_index, |
+ i::SLOPPY) |
.StoreAccumulatorInRegister(Register(0)) |
.Call(Register(0), builder.Parameter(0), 0) |
.Return(); |
@@ -1045,8 +1046,9 @@ TEST(InterpreterCall) { |
builder.set_locals_count(4); |
builder.set_context_count(0); |
builder.set_parameter_count(1); |
- builder.LoadLiteral(name) |
- .LoadNamedProperty(builder.Parameter(0), slot_index, i::SLOPPY) |
+ size_t name_index = builder.GetConstantPoolEntry(name); |
+ builder.LoadNamedProperty(builder.Parameter(0), name_index, slot_index, |
+ i::SLOPPY) |
.StoreAccumulatorInRegister(Register(0)) |
.LoadAccumulatorWithRegister(builder.Parameter(0)) |
.StoreAccumulatorInRegister(Register(1)) |
@@ -1075,8 +1077,9 @@ TEST(InterpreterCall) { |
builder.set_locals_count(12); |
builder.set_context_count(0); |
builder.set_parameter_count(1); |
- builder.LoadLiteral(name) |
- .LoadNamedProperty(builder.Parameter(0), slot_index, i::SLOPPY) |
+ size_t name_index = builder.GetConstantPoolEntry(name); |
+ builder.LoadNamedProperty(builder.Parameter(0), name_index, slot_index, |
+ i::SLOPPY) |
.StoreAccumulatorInRegister(Register(0)) |
.LoadAccumulatorWithRegister(builder.Parameter(0)) |
.StoreAccumulatorInRegister(Register(1)) |