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

Unified Diff: test/unittests/compiler/interpreter-assembler-unittest.cc

Issue 1403943004: [Interpreter] Add support for local context loads and stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_contextchain
Patch Set: Add back outer_ &&] Created 5 years, 2 months 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/compiler/interpreter-assembler-unittest.cc
diff --git a/test/unittests/compiler/interpreter-assembler-unittest.cc b/test/unittests/compiler/interpreter-assembler-unittest.cc
index 0fab029d565c462b82d2bd9a573a4616dbc20170..33630330057b771d4cda1a0c6797a094c200d8d7 100644
--- a/test/unittests/compiler/interpreter-assembler-unittest.cc
+++ b/test/unittests/compiler/interpreter-assembler-unittest.cc
@@ -486,6 +486,24 @@ TARGET_TEST_F(InterpreterAssemblerTest, LoadContextSlot) {
}
+TARGET_TEST_F(InterpreterAssemblerTest, StoreContextSlot) {
+ TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
+ InterpreterAssemblerForTest m(this, bytecode);
+ Node* context = m.Int32Constant(1);
+ Node* slot_index = m.Int32Constant(22);
+ Node* value = m.Int32Constant(100);
+ Node* store_context_slot = m.StoreContextSlot(context, slot_index, value);
+
+ Matcher<Node*> offset =
+ IsIntPtrAdd(IsWordShl(slot_index, IsInt32Constant(kPointerSizeLog2)),
+ IsInt32Constant(Context::kHeaderSize - kHeapObjectTag));
+ EXPECT_THAT(store_context_slot,
+ m.IsStore(StoreRepresentation(kMachAnyTagged, kNoWriteBarrier),
+ context, offset, value));
+ }
+}
+
+
TARGET_TEST_F(InterpreterAssemblerTest, LoadObjectField) {
TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
InterpreterAssemblerForTest m(this, bytecode);

Powered by Google App Engine
This is Rietveld 408576698