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

Unified Diff: test/unittests/compiler/instruction-selector-unittest.cc

Issue 1191243003: [turbofan] Factor out the function specific part from the frame state operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 5 years, 6 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/instruction-selector-unittest.cc
diff --git a/test/unittests/compiler/instruction-selector-unittest.cc b/test/unittests/compiler/instruction-selector-unittest.cc
index 857d92fa2d9a766b6bac58f233a82f31b84638b7..4fd35830cfbe357cb49e59c8f572ae189e27c797 100644
--- a/test/unittests/compiler/instruction-selector-unittest.cc
+++ b/test/unittests/compiler/instruction-selector-unittest.cc
@@ -148,6 +148,15 @@ bool InstructionSelectorTest::Stream::IsUsedAtStart(
}
+const FrameStateFunctionInfo*
+InstructionSelectorTest::StreamBuilder::GetFrameStateFunctionInfo(
+ int parameter_count, int local_count) {
+ return common()->CreateFrameStateFunctionInfo(
+ FrameStateType::kJavaScriptFunction, parameter_count, local_count,
+ Handle<SharedFunctionInfo>());
+}
+
+
// -----------------------------------------------------------------------------
// Return.
@@ -362,11 +371,11 @@ TARGET_TEST_F(InstructionSelectorTest, CallJSFunctionWithDeopt) {
Node* stack = m.NewNode(m.common()->TypedStateValues(&empty_types));
Node* context_dummy = m.Int32Constant(0);
- Node* state_node =
- m.NewNode(m.common()->FrameState(JS_FRAME, bailout_id,
- OutputFrameStateCombine::Push()),
- parameters, locals, stack, context_dummy, function_node,
- m.UndefinedConstant());
+ Node* state_node = m.NewNode(
+ m.common()->FrameState(bailout_id, OutputFrameStateCombine::Push(),
+ m.GetFrameStateFunctionInfo(1, 0)),
+ parameters, locals, stack, context_dummy, function_node,
+ m.UndefinedConstant());
Node* call = m.CallJS0(function_node, receiver, context, state_node);
m.Return(call);
@@ -411,11 +420,11 @@ TARGET_TEST_F(InstructionSelectorTest, CallFunctionStubWithDeopt) {
m.UndefinedConstant());
Node* context_sentinel = m.Int32Constant(0);
- Node* frame_state_before =
- m.NewNode(m.common()->FrameState(JS_FRAME, bailout_id_before,
- OutputFrameStateCombine::Push()),
- parameters, locals, stack, context_sentinel, function_node,
- m.UndefinedConstant());
+ Node* frame_state_before = m.NewNode(
+ m.common()->FrameState(bailout_id_before, OutputFrameStateCombine::Push(),
+ m.GetFrameStateFunctionInfo(1, 1)),
+ parameters, locals, stack, context_sentinel, function_node,
+ m.UndefinedConstant());
// Build the call.
Node* call = m.CallFunctionStub0(function_node, receiver, context,
@@ -506,8 +515,9 @@ TARGET_TEST_F(InstructionSelectorTest,
Node* stack =
m.NewNode(m.common()->TypedStateValues(&int32_type), m.Int32Constant(65));
Node* frame_state_parent = m.NewNode(
- m.common()->FrameState(JS_FRAME, bailout_id_parent,
- OutputFrameStateCombine::Ignore()),
+ m.common()->FrameState(bailout_id_parent,
+ OutputFrameStateCombine::Ignore(),
+ m.GetFrameStateFunctionInfo(1, 1)),
parameters, locals, stack, context, function_node, m.UndefinedConstant());
Node* context2 = m.Int32Constant(46);
@@ -517,11 +527,11 @@ TARGET_TEST_F(InstructionSelectorTest,
m.Float64Constant(0.25));
Node* stack2 = m.NewNode(m.common()->TypedStateValues(&int32x2_type),
m.Int32Constant(44), m.Int32Constant(45));
- Node* frame_state_before =
- m.NewNode(m.common()->FrameState(JS_FRAME, bailout_id_before,
- OutputFrameStateCombine::Push()),
- parameters2, locals2, stack2, context2, function_node,
- frame_state_parent);
+ Node* frame_state_before = m.NewNode(
+ m.common()->FrameState(bailout_id_before, OutputFrameStateCombine::Push(),
+ m.GetFrameStateFunctionInfo(1, 1)),
+ parameters2, locals2, stack2, context2, function_node,
+ frame_state_parent);
// Build the call.
Node* call = m.CallFunctionStub0(function_node, receiver, context2,
« no previous file with comments | « test/unittests/compiler/instruction-selector-unittest.h ('k') | test/unittests/compiler/liveness-analyzer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698