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

Unified Diff: src/compiler/common-operator.h

Issue 437183002: Make start node a value input to parameter nodes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add start node as input to parameter nodes. 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
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator.h
diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h
index a08b8790dd198a8dac76c9e6526c52e720dd51ce..487c4b0020b87068b3845c92df7edbdee437a97c 100644
--- a/src/compiler/common-operator.h
+++ b/src/compiler/common-operator.h
@@ -65,7 +65,12 @@ class CommonOperatorBuilder {
return new (zone_) ControlOperator(IrOpcode::k##name, Operator::kFoldable, \
inputs, 0, controls, #name);
- Operator* Start() { CONTROL_OP(Start, 0, 0); }
+ Operator* Start(int num_formal_parameters) {
+ // Outputs are formal parameters, plus context, receiver, and JSFunction.
+ int outputs = num_formal_parameters + 3;
+ return new (zone_) ControlOperator(IrOpcode::kStart, Operator::kFoldable, 0,
+ outputs, 0, "Start");
+ }
Operator* Dead() { CONTROL_OP(Dead, 0, 0); }
Operator* End() { CONTROL_OP(End, 0, 1); }
Operator* Branch() { CONTROL_OP(Branch, 1, 1); }
@@ -95,7 +100,7 @@ class CommonOperatorBuilder {
}
Operator* Parameter(int index) {
- return new (zone_) Operator1<int>(IrOpcode::kParameter, Operator::kPure, 0,
+ return new (zone_) Operator1<int>(IrOpcode::kParameter, Operator::kPure, 1,
1, "Parameter", index);
}
Operator* Int32Constant(int32_t value) {
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698