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

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

Issue 1134973006: [turbofan] Carefully update frame states during inlining. (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 | « no previous file | no next file » | 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 66d71a6e298daf623d612a0f511f6881bb90baec..90c6eecb2e94688016ddeca3e213a4ff50b5b18d 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -351,10 +351,15 @@ Reduction JSInliner::Reduce(Node* node) {
outer_frame_state = CreateArgumentsAdaptorFrameState(&call, info.zone());
}
- for (Node* node : visitor.copies()) {
- if (node && node->opcode() == IrOpcode::kFrameState) {
+ // 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()));
- NodeProperties::ReplaceFrameStateInput(node, 0, outer_frame_state);
+ // 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);
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698