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 82ec7120e6887d4a93c32e78aae78868c9a841b7..2a844f3215d49b9d52518d4a79bfb6ba2e572840 100644 |
--- a/test/unittests/compiler/interpreter-assembler-unittest.cc |
+++ b/test/unittests/compiler/interpreter-assembler-unittest.cc |
@@ -471,6 +471,36 @@ TARGET_TEST_F(InterpreterAssemblerTest, LoadConstantPoolEntry) { |
} |
+TARGET_TEST_F(InterpreterAssemblerTest, LoadFixedArrayElement) { |
+ TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
+ InterpreterAssemblerForTest m(this, bytecode); |
+ int index = 3; |
+ Node* fixed_array = m.IntPtrConstant(0xdeadbeef); |
+ Node* load_element = m.LoadFixedArrayElement(fixed_array, index); |
+ EXPECT_THAT( |
+ load_element, |
+ m.IsLoad(kMachAnyTagged, fixed_array, |
+ IsIntPtrAdd( |
+ IsIntPtrConstant(FixedArray::kHeaderSize - kHeapObjectTag), |
+ IsWordShl(IsInt32Constant(index), |
+ IsInt32Constant(kPointerSizeLog2))))); |
+ } |
+} |
+ |
+ |
+TARGET_TEST_F(InterpreterAssemblerTest, LoadObjectField) { |
+ TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
+ InterpreterAssemblerForTest m(this, bytecode); |
+ Node* object = m.IntPtrConstant(0xdeadbeef); |
+ int offset = 16; |
+ Node* load_field = m.LoadObjectField(object, offset); |
+ EXPECT_THAT(load_field, |
+ m.IsLoad(kMachAnyTagged, object, |
+ IsIntPtrConstant(offset - kHeapObjectTag))); |
+ } |
+} |
+ |
+ |
TARGET_TEST_F(InterpreterAssemblerTest, LoadContextSlot) { |
TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
InterpreterAssemblerForTest m(this, bytecode); |
@@ -505,19 +535,6 @@ TARGET_TEST_F(InterpreterAssemblerTest, StoreContextSlot) { |
} |
-TARGET_TEST_F(InterpreterAssemblerTest, LoadObjectField) { |
- TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
- InterpreterAssemblerForTest m(this, bytecode); |
- Node* object = m.IntPtrConstant(0xdeadbeef); |
- int offset = 16; |
- Node* load_field = m.LoadObjectField(object, offset); |
- EXPECT_THAT(load_field, |
- m.IsLoad(kMachAnyTagged, object, |
- IsIntPtrConstant(offset - kHeapObjectTag))); |
- } |
-} |
- |
- |
TARGET_TEST_F(InterpreterAssemblerTest, CallRuntime2) { |
TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
InterpreterAssemblerForTest m(this, bytecode); |