| Index: test/unittests/compiler/interpreter-assembler-unittest.cc
|
| diff --git a/test/unittests/compiler/interpreter-assembler-unittest.cc b/test/unittests/compiler/interpreter-assembler-unittest.cc
|
| index eb0c2412faec884664c51cf38053c8bdd2eab26e..e4df618394414493cb01a69968356e222624564a 100644
|
| --- a/test/unittests/compiler/interpreter-assembler-unittest.cc
|
| +++ b/test/unittests/compiler/interpreter-assembler-unittest.cc
|
| @@ -447,18 +447,15 @@ TARGET_TEST_F(InterpreterAssemblerTest, LoadConstantPoolEntry) {
|
| TARGET_TEST_F(InterpreterAssemblerTest, LoadContextSlot) {
|
| TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
|
| InterpreterAssemblerForTest m(this, bytecode);
|
| - Node* load_from_current_context = m.LoadContextSlot(22);
|
| - Matcher<Node*> load_from_current_context_matcher = m.IsLoad(
|
| - kMachAnyTagged, IsParameter(Linkage::kInterpreterContextParameter),
|
| - IsIntPtrConstant(Context::SlotOffset(22)));
|
| - EXPECT_THAT(load_from_current_context, load_from_current_context_matcher);
|
| -
|
| - // Let's imagine that the loaded context slot is another context.
|
| - Node* load_from_any_context =
|
| - m.LoadContextSlot(load_from_current_context, 23);
|
| - EXPECT_THAT(load_from_any_context,
|
| - m.IsLoad(kMachAnyTagged, load_from_current_context_matcher,
|
| - IsIntPtrConstant(Context::SlotOffset(23))));
|
| + Node* context = m.Int32Constant(1);
|
| + Node* slot_index = m.Int32Constant(22);
|
| + Node* load_context_slot = m.LoadContextSlot(context, slot_index);
|
| +
|
| + Matcher<Node*> offset = IsIntPtrAdd(
|
| + IsWordShl(slot_index, IsInt32Constant(kPointerSizeLog2)),
|
| + IsInt32Constant(Context::kHeaderSize - kHeapObjectTag));
|
| + EXPECT_THAT(load_context_slot,
|
| + m.IsLoad(kMachAnyTagged, context, offset));
|
| }
|
| }
|
|
|
|
|