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

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

Issue 555283004: [turbofan] Next step towards shared operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/graph-builder.h ('k') | src/compiler/js-context-specialization.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-builder.cc
diff --git a/src/compiler/graph-builder.cc b/src/compiler/graph-builder.cc
index 9f23321ed92d4ece8b6202c0d804250543cdf98c..899288159848f7cacaa52d7d774284c139ba8b1c 100644
--- a/src/compiler/graph-builder.cc
+++ b/src/compiler/graph-builder.cc
@@ -28,7 +28,8 @@ StructuredGraphBuilder::StructuredGraphBuilder(Graph* graph,
exit_control_(NULL) {}
-Node* StructuredGraphBuilder::MakeNode(Operator* op, int value_input_count,
+Node* StructuredGraphBuilder::MakeNode(const Operator* op,
+ int value_input_count,
Node** value_inputs) {
DCHECK(op->InputCount() == value_input_count);
@@ -161,7 +162,7 @@ void StructuredGraphBuilder::Environment::PrepareForLoop() {
Node* StructuredGraphBuilder::NewPhi(int count, Node* input, Node* control) {
- Operator* phi_op = common()->Phi(kMachAnyTagged, count);
+ const Operator* phi_op = common()->Phi(kMachAnyTagged, count);
Node** buffer = zone()->NewArray<Node*>(count + 1);
MemsetPointer(buffer, input, count);
buffer[count] = control;
@@ -172,7 +173,7 @@ Node* StructuredGraphBuilder::NewPhi(int count, Node* input, Node* control) {
// TODO(mstarzinger): Revisit this once we have proper effect states.
Node* StructuredGraphBuilder::NewEffectPhi(int count, Node* input,
Node* control) {
- Operator* phi_op = common()->EffectPhi(count);
+ const Operator* phi_op = common()->EffectPhi(count);
Node** buffer = zone()->NewArray<Node*>(count + 1);
MemsetPointer(buffer, input, count);
buffer[count] = control;
@@ -184,17 +185,17 @@ Node* StructuredGraphBuilder::MergeControl(Node* control, Node* other) {
int inputs = OperatorProperties::GetControlInputCount(control->op()) + 1;
if (control->opcode() == IrOpcode::kLoop) {
// Control node for loop exists, add input.
- Operator* op = common()->Loop(inputs);
+ const Operator* op = common()->Loop(inputs);
control->AppendInput(zone(), other);
control->set_op(op);
} else if (control->opcode() == IrOpcode::kMerge) {
// Control node for merge exists, add input.
- Operator* op = common()->Merge(inputs);
+ const Operator* op = common()->Merge(inputs);
control->AppendInput(zone(), other);
control->set_op(op);
} else {
// Control node is a singleton, introduce a merge.
- Operator* op = common()->Merge(inputs);
+ const Operator* op = common()->Merge(inputs);
control = graph()->NewNode(op, control, other);
}
return control;
« no previous file with comments | « src/compiler/graph-builder.h ('k') | src/compiler/js-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698