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

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

Issue 522873002: Removal of the deoptimization block from Turbofan (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove deoptimization block 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..88569beb6586948810d58936ca469d2374574c3e 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -217,15 +217,17 @@ void AstGraphBuilder::Environment::UpdateStateValues(Node** state_values,
}
-Node* AstGraphBuilder::Environment::Checkpoint(BailoutId ast_id) {
+Node* AstGraphBuilder::Environment::Checkpoint(
+ BailoutId ast_id, OutputFrameStateCombine combine) {
UpdateStateValues(&parameters_node_, 0, parameters_count());
UpdateStateValues(&locals_node_, parameters_count(), locals_count());
UpdateStateValues(&stack_node_, parameters_count() + locals_count(),
stack_height());
- Operator* op = common()->FrameState(ast_id);
+ Operator* op = common()->FrameState(ast_id, combine);
- return graph()->NewNode(op, parameters_node_, locals_node_, stack_node_);
+ return graph()->NewNode(op, parameters_node_, locals_node_, stack_node_,
+ GetContext());
}
@@ -2009,37 +2011,9 @@ 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, combine);
node->ReplaceInput(frame_state_index, frame_state_node);
}
-
- if (OperatorProperties::CanLazilyDeoptimize(node->op())) {
- // The deopting node should have an outgoing control dependency.
- DCHECK(environment()->GetControlDependency() == node);
-
- StructuredGraphBuilder::Environment* continuation_env = environment();
- // Create environment for the deoptimization block, and build the block.
- StructuredGraphBuilder::Environment* deopt_env =
- CopyEnvironment(continuation_env);
- set_environment(deopt_env);
-
- if (combine == PUSH_OUTPUT) {
- environment()->Push(node);
- }
-
- NewNode(common()->LazyDeoptimization());
-
- // 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* deoptimize_node = NewNode(common()->Deoptimize(), state_node);
- UpdateControlDependencyToLeaveFunction(deoptimize_node);
-
- // Continue with the original environment.
- set_environment(continuation_env);
- NewNode(common()->Continuation());
- }
}
}

Powered by Google App Engine
This is Rietveld 408576698