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

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

Issue 492203002: Initial support for debugger frame state in Turbofan. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Another attempt to fix Win64 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/graph-builder.cc
diff --git a/src/compiler/graph-builder.cc b/src/compiler/graph-builder.cc
index 9c414f1bf9b1df5086e683bfdf15536ca85562f7..36d62d4c86b157c925c2aad7edcb0ef81f373580 100644
--- a/src/compiler/graph-builder.cc
+++ b/src/compiler/graph-builder.cc
@@ -30,7 +30,10 @@ StructuredGraphBuilder::StructuredGraphBuilder(Graph* graph,
Node* StructuredGraphBuilder::MakeNode(Operator* op, int value_input_count,
Node** value_inputs) {
+ DCHECK(op->InputCount() == value_input_count);
+
bool has_context = OperatorProperties::HasContextInput(op);
+ bool has_framestate = OperatorProperties::HasFrameStateInput(op);
bool has_control = OperatorProperties::GetControlInputCount(op) == 1;
bool has_effect = OperatorProperties::GetEffectInputCount(op) == 1;
@@ -43,6 +46,7 @@ Node* StructuredGraphBuilder::MakeNode(Operator* op, int value_input_count,
} else {
int input_count_with_deps = value_input_count;
if (has_context) ++input_count_with_deps;
+ if (has_framestate) ++input_count_with_deps;
if (has_control) ++input_count_with_deps;
if (has_effect) ++input_count_with_deps;
void* raw_buffer = alloca(kPointerSize * input_count_with_deps);
@@ -52,6 +56,12 @@ Node* StructuredGraphBuilder::MakeNode(Operator* op, int value_input_count,
if (has_context) {
*current_input++ = current_context();
}
+ if (has_framestate) {
+ // The frame state will be inserted later. Here we misuse
+ // the dead_control node as a sentinel to be later overwritten
+ // with the real frame state.
+ *current_input++ = dead_control();
+ }
if (has_effect) {
*current_input++ = environment_->GetEffectDependency();
}

Powered by Google App Engine
This is Rietveld 408576698