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

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

Issue 1254293006: [interpreter] Change interpreter to use an BytecodeArray pointer and and offset. (Closed) Base URL: ssh://rmcilroy.lon.corp.google.com///usr/local/google/code/v8_full/v8@master
Patch Set: Fix MIPS merge error Created 5 years, 5 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
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dcde9a9cb5cefe36f14978d5f52d013487801ac1..7bc91ce994e2698ae7fe854ff6f73dc50eef9ca9 100644
--- a/test/unittests/compiler/interpreter-assembler-unittest.cc
+++ b/test/unittests/compiler/interpreter-assembler-unittest.cc
@@ -52,15 +52,6 @@ Matcher<Node*> IsIntPtrAdd(const Matcher<Node*>& lhs_matcher,
}
-Matcher<Node*> IsIntPtrConstant(intptr_t value) {
-#ifdef V8_TARGET_ARCH_64_BIT
- return IsInt64Constant(value);
-#else
- return IsInt32Constant(value);
-#endif
-}
-
-
TARGET_TEST_F(InterpreterAssemblerTest, Dispatch) {
TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
InterpreterAssemblerForTest m(this, bytecode);
@@ -71,11 +62,12 @@ TARGET_TEST_F(InterpreterAssemblerTest, Dispatch) {
EXPECT_EQ(1, end->InputCount());
Node* tail_call_node = end->InputAt(0);
- Matcher<Node*> next_bytecode_matcher =
- IsIntPtrAdd(IsParameter(Linkage::kInterpreterBytecodeParameter),
+ Matcher<Node*> next_bytecode_offset_matcher =
+ IsIntPtrAdd(IsParameter(Linkage::kInterpreterBytecodeOffsetParameter),
IsInt32Constant(interpreter::Bytecodes::Size(bytecode)));
- Matcher<Node*> target_bytecode_matcher =
- m.IsLoad(kMachUint8, next_bytecode_matcher, IsIntPtrConstant(0));
+ Matcher<Node*> target_bytecode_matcher = m.IsLoad(
+ kMachUint8, IsParameter(Linkage::kInterpreterBytecodeArrayParameter),
+ next_bytecode_offset_matcher);
Matcher<Node*> code_target_matcher = m.IsLoad(
kMachPtr, IsParameter(Linkage::kInterpreterDispatchTableParameter),
IsWord32Shl(target_bytecode_matcher,
@@ -86,7 +78,8 @@ TARGET_TEST_F(InterpreterAssemblerTest, Dispatch) {
EXPECT_THAT(
tail_call_node,
IsTailCall(m.call_descriptor(), code_target_matcher,
- next_bytecode_matcher,
+ next_bytecode_offset_matcher,
+ IsParameter(Linkage::kInterpreterBytecodeArrayParameter),
IsParameter(Linkage::kInterpreterDispatchTableParameter),
graph->start(), graph->start()));
}
@@ -99,10 +92,14 @@ TARGET_TEST_F(InterpreterAssemblerTest, BytecodeArg) {
int number_of_args = interpreter::Bytecodes::NumberOfArguments(bytecode);
for (int i = 0; i < number_of_args; i++) {
Node* load_arg_node = m.BytecodeArg(i);
- EXPECT_THAT(load_arg_node,
- m.IsLoad(kMachUint8,
- IsParameter(Linkage::kInterpreterBytecodeParameter),
- IsInt32Constant(1 + i)));
+ EXPECT_THAT(
+ load_arg_node,
+ m.IsLoad(
+ kMachUint8,
+ IsParameter(Linkage::kInterpreterBytecodeArrayParameter),
+ IsIntPtrAdd(
+ IsParameter(Linkage::kInterpreterBytecodeOffsetParameter),
+ IsInt32Constant(1 + i))));
}
}
}
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698