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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 517323002: Make FrameStates recursive (to be used for inlining). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix bug in GetParentCount Created 6 years, 4 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/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 9ec91e53324e91fb48dedf9115d6027d26399bc7..2e4b4fa67d400bcf0eae1fc8458ce1472bd078c9 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -217,7 +217,7 @@ void AstGraphBuilder::Environment::UpdateStateValues(Node** state_values,
}
-Node* AstGraphBuilder::Environment::Checkpoint(BailoutId ast_id) {
+Node* AstGraphBuilder::Environment::Checkpoint(BailoutId ast_id, Node* parent) {
UpdateStateValues(&parameters_node_, 0, parameters_count());
UpdateStateValues(&locals_node_, parameters_count(), locals_count());
UpdateStateValues(&stack_node_, parameters_count() + locals_count(),
@@ -225,7 +225,8 @@ Node* AstGraphBuilder::Environment::Checkpoint(BailoutId ast_id) {
Operator* op = common()->FrameState(ast_id);
- return graph()->NewNode(op, parameters_node_, locals_node_, stack_node_);
+ return graph()->NewNode(op, parameters_node_, locals_node_, stack_node_,
+ parent);
}
@@ -2009,7 +2010,8 @@ void AstGraphBuilder::PrepareFrameState(Node* node, BailoutId ast_id,
DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead);
- Node* frame_state_node = environment()->Checkpoint(ast_id);
+ Node* frame_state_node =
+ environment()->Checkpoint(ast_id, jsgraph()->UndefinedConstant());
node->ReplaceInput(frame_state_index, frame_state_node);
}
@@ -2032,7 +2034,8 @@ void AstGraphBuilder::PrepareFrameState(Node* node, BailoutId ast_id,
// TODO(jarin) If ast_id.IsNone(), perhaps we should generate an empty
// deopt block and make sure there is no patch entry for this (so
// that the deoptimizer dies when trying to deoptimize here).
- Node* state_node = environment()->Checkpoint(ast_id);
+ Node* state_node =
+ environment()->Checkpoint(ast_id, jsgraph()->UndefinedConstant());
Node* deoptimize_node = NewNode(common()->Deoptimize(), state_node);
UpdateControlDependencyToLeaveFunction(deoptimize_node);

Powered by Google App Engine
This is Rietveld 408576698