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

Unified Diff: src/compiler/js-inlining.cc

Issue 1134713004: [turbofan] Pass closure as node to FrameState. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index af47cb81a4dfdab00201e6d1eca3b47a3c70c1ab..66d71a6e298daf623d612a0f511f6881bb90baec 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -264,22 +264,11 @@ Reduction JSInliner::InlineCall(Node* call, Inlinee& inlinee) {
}
-void JSInliner::AddClosureToFrameState(Node* frame_state,
- Handle<JSFunction> jsfunction) {
- FrameStateCallInfo call_info = OpParameter<FrameStateCallInfo>(frame_state);
- const Operator* op = jsgraph_->common()->FrameState(
- FrameStateType::JS_FRAME, call_info.bailout_id(),
- call_info.state_combine(), jsfunction);
- frame_state->set_op(op);
-}
-
-
Node* JSInliner::CreateArgumentsAdaptorFrameState(JSCallFunctionAccessor* call,
- Handle<JSFunction> jsfunction,
Zone* temp_zone) {
const Operator* op = jsgraph_->common()->FrameState(
FrameStateType::ARGUMENTS_ADAPTOR, BailoutId(-1),
- OutputFrameStateCombine::Ignore(), jsfunction);
+ OutputFrameStateCombine::Ignore());
const Operator* op0 = jsgraph_->common()->StateValues(0);
Node* node0 = jsgraph_->graph()->NewNode(op0);
NodeVector params(temp_zone);
@@ -293,7 +282,7 @@ Node* JSInliner::CreateArgumentsAdaptorFrameState(JSCallFunctionAccessor* call,
op_param, static_cast<int>(params.size()), &params.front());
return jsgraph_->graph()->NewNode(op, params_node, node0, node0,
jsgraph_->UndefinedConstant(),
- call->frame_state());
+ call->jsfunction(), call->frame_state());
}
@@ -359,14 +348,12 @@ Reduction JSInliner::Reduce(Node* node) {
call.formal_arguments() < inlinee.formal_parameters()) {
return NoChange();
}
- outer_frame_state =
- CreateArgumentsAdaptorFrameState(&call, function, info.zone());
+ outer_frame_state = CreateArgumentsAdaptorFrameState(&call, info.zone());
}
for (Node* node : visitor.copies()) {
if (node && node->opcode() == IrOpcode::kFrameState) {
DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node->op()));
- AddClosureToFrameState(node, function);
NodeProperties::ReplaceFrameStateInput(node, 0, outer_frame_state);
}
}

Powered by Google App Engine
This is Rietveld 408576698