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

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

Issue 1604923002: [Interpreter] Always store current context in the frames context slot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_fix_block_context_scope
Patch Set: Rebase Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « test/mjsunit/deopt-with-outer-context.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "test/unittests/compiler/interpreter-assembler-unittest.h" 5 #include "test/unittests/compiler/interpreter-assembler-unittest.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/graph.h" 8 #include "src/compiler/graph.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 #include "src/interface-descriptors.h" 10 #include "src/interface-descriptors.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 EXPECT_EQ(1, end->InputCount()); 402 EXPECT_EQ(1, end->InputCount());
403 Node* tail_call_node = end->InputAt(0); 403 Node* tail_call_node = end->InputAt(0);
404 404
405 EXPECT_THAT(tail_call_node, 405 EXPECT_THAT(tail_call_node,
406 IsTailCall(m.call_descriptor(), _, accumulator_value_2, _, _, _, 406 IsTailCall(m.call_descriptor(), _, accumulator_value_2, _, _, _,
407 _, _, _)); 407 _, _, _));
408 } 408 }
409 } 409 }
410 410
411 411
412 TARGET_TEST_F(InterpreterAssemblerTest, GetSetContext) {
413 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
414 InterpreterAssemblerForTest m(this, bytecode);
415 Node* context_node = m.Int32Constant(100);
416 m.SetContext(context_node);
417 EXPECT_THAT(m.GetContext(), context_node);
418 }
419 }
420
421
412 TARGET_TEST_F(InterpreterAssemblerTest, RegisterLocation) { 422 TARGET_TEST_F(InterpreterAssemblerTest, RegisterLocation) {
413 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { 423 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
414 InterpreterAssemblerForTest m(this, bytecode); 424 InterpreterAssemblerForTest m(this, bytecode);
415 Node* reg_index_node = m.Int32Constant(44); 425 Node* reg_index_node = m.Int32Constant(44);
416 Node* reg_location_node = m.RegisterLocation(reg_index_node); 426 Node* reg_location_node = m.RegisterLocation(reg_index_node);
417 EXPECT_THAT( 427 EXPECT_THAT(
418 reg_location_node, 428 reg_location_node,
419 IsIntPtrAdd( 429 IsIntPtrAdd(
420 IsParameter(Linkage::kInterpreterRegisterFileParameter), 430 IsParameter(Linkage::kInterpreterRegisterFileParameter),
421 IsWordShl(reg_index_node, IsInt32Constant(kPointerSizeLog2)))); 431 IsWordShl(reg_index_node, IsInt32Constant(kPointerSizeLog2))));
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 feedback_vector, 692 feedback_vector,
683 m.IsLoad(MachineType::AnyTagged(), load_shared_function_info_matcher, 693 m.IsLoad(MachineType::AnyTagged(), load_shared_function_info_matcher,
684 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - 694 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset -
685 kHeapObjectTag))); 695 kHeapObjectTag)));
686 } 696 }
687 } 697 }
688 698
689 } // namespace compiler 699 } // namespace compiler
690 } // namespace internal 700 } // namespace internal
691 } // namespace v8 701 } // namespace v8
OLDNEW
« no previous file with comments | « test/mjsunit/deopt-with-outer-context.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698