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

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

Issue 1146403008: [turbofan] Use Start as sentinel for frame states. (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
« no previous file with comments | « src/compiler/js-inlining.h ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index 72f12fc7e0144993d0055e621f9f3b1badfe26d2..6964e5eb4d8390338e4ef7f23e9a6728853676ec 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -116,7 +116,8 @@ class CopyVisitor {
};
-Reduction JSInliner::InlineCall(Node* call, Node* start, Node* end) {
+Reduction JSInliner::InlineCall(Node* call, Node* frame_state, Node* start,
+ Node* end) {
// The scheduler is smart enough to place our code; we just ensure {control}
// becomes the control input of the start of the inlinee, and {effect} becomes
// the effect input of the start of the inlinee.
@@ -158,6 +159,8 @@ Reduction JSInliner::InlineCall(Node* call, Node* start, Node* end) {
edge.UpdateTo(effect);
} else if (NodeProperties::IsControlEdge(edge)) {
edge.UpdateTo(control);
+ } else if (NodeProperties::IsFrameStateEdge(edge)) {
+ edge.UpdateTo(frame_state);
} else {
UNREACHABLE();
}
@@ -284,7 +287,7 @@ Reduction JSInliner::Reduce(Node* node) {
Node* start = visitor.GetCopy(graph.start());
Node* end = visitor.GetCopy(graph.end());
- Node* outer_frame_state = call.frame_state();
+ Node* frame_state = call.frame_state();
size_t const inlinee_formal_parameters = start->op()->ValueOutputCount() - 3;
// Insert argument adaptor frame if required.
if (call.formal_arguments() != inlinee_formal_parameters) {
@@ -294,22 +297,10 @@ Reduction JSInliner::Reduce(Node* node) {
call.formal_arguments() < inlinee_formal_parameters) {
return NoChange();
}
- outer_frame_state = CreateArgumentsAdaptorFrameState(&call, info.zone());
+ frame_state = CreateArgumentsAdaptorFrameState(&call, info.zone());
}
- // Fix up all outer frame states from the inlinee.
- for (Node* const node : visitor.copies()) {
- if (node->opcode() == IrOpcode::kFrameState) {
- DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node->op()));
- // Don't touch this frame state, if it already has an "outer frame state".
- if (NodeProperties::GetFrameStateInput(node, 0)->opcode() !=
- IrOpcode::kFrameState) {
- NodeProperties::ReplaceFrameStateInput(node, 0, outer_frame_state);
- }
- }
- }
-
- return InlineCall(node, start, end);
+ return InlineCall(node, frame_state, start, end);
}
} // namespace compiler
« no previous file with comments | « src/compiler/js-inlining.h ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698