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

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

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/change-lowering.cc ('k') | src/compiler/common-operator-unittest.cc » ('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 16c4c6977aa5c0b6a25e06305747ef676592bd18..95bed128015213784e7f32c14117028fc2f01782 100644
--- a/src/compiler/common-operator.h
+++ b/src/compiler/common-operator.h
@@ -81,104 +81,105 @@ class CommonOperatorBuilder {
return new (zone_) ControlOperator(IrOpcode::k##name, Operator::kFoldable, \
inputs, 0, controls, #name);
- Operator* Start(int num_formal_parameters) {
+ const 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); }
- Operator* IfTrue() { CONTROL_OP(IfTrue, 0, 1); }
- Operator* IfFalse() { CONTROL_OP(IfFalse, 0, 1); }
- Operator* Throw() { CONTROL_OP(Throw, 1, 1); }
+ const Operator* Dead() { CONTROL_OP(Dead, 0, 0); }
+ const Operator* End() { CONTROL_OP(End, 0, 1); }
+ const Operator* Branch() { CONTROL_OP(Branch, 1, 1); }
+ const Operator* IfTrue() { CONTROL_OP(IfTrue, 0, 1); }
+ const Operator* IfFalse() { CONTROL_OP(IfFalse, 0, 1); }
+ const Operator* Throw() { CONTROL_OP(Throw, 1, 1); }
- Operator* Return() {
+ const Operator* Return() {
return new (zone_) ControlOperator(
IrOpcode::kReturn, Operator::kNoProperties, 1, 0, 1, "Return");
}
- Operator* Merge(int controls) {
+ const Operator* Merge(int controls) {
return new (zone_) ControlOperator(IrOpcode::kMerge, Operator::kFoldable, 0,
0, controls, "Merge");
}
- Operator* Loop(int controls) {
+ const Operator* Loop(int controls) {
return new (zone_) ControlOperator(IrOpcode::kLoop, Operator::kFoldable, 0,
0, controls, "Loop");
}
- Operator* Parameter(int index) {
+ const Operator* Parameter(int index) {
return new (zone_) Operator1<int>(IrOpcode::kParameter, Operator::kPure, 1,
1, "Parameter", index);
}
- Operator* Int32Constant(int32_t value) {
+ const Operator* Int32Constant(int32_t value) {
return new (zone_)
Operator1<int32_t>(IrOpcode::kInt32Constant, Operator::kPure, 0, 1,
"Int32Constant", value);
}
- Operator* Int64Constant(int64_t value) {
+ const Operator* Int64Constant(int64_t value) {
return new (zone_)
Operator1<int64_t>(IrOpcode::kInt64Constant, Operator::kPure, 0, 1,
"Int64Constant", value);
}
- Operator* Float64Constant(double value) {
+ const Operator* Float64Constant(double value) {
return new (zone_)
Operator1<double>(IrOpcode::kFloat64Constant, Operator::kPure, 0, 1,
"Float64Constant", value);
}
- Operator* ExternalConstant(ExternalReference value) {
+ const Operator* ExternalConstant(ExternalReference value) {
return new (zone_) Operator1<ExternalReference>(IrOpcode::kExternalConstant,
Operator::kPure, 0, 1,
"ExternalConstant", value);
}
- Operator* NumberConstant(double value) {
+ const Operator* NumberConstant(double value) {
return new (zone_)
Operator1<double>(IrOpcode::kNumberConstant, Operator::kPure, 0, 1,
"NumberConstant", value);
}
- Operator* HeapConstant(Unique<Object> value) {
+ const Operator* HeapConstant(Unique<Object> value) {
return new (zone_) Operator1<Unique<Object> >(
IrOpcode::kHeapConstant, Operator::kPure, 0, 1, "HeapConstant", value);
}
- Operator* Phi(MachineType type, int arguments) {
+ const Operator* Phi(MachineType type, int arguments) {
DCHECK(arguments > 0); // Disallow empty phis.
return new (zone_) Operator1<MachineType>(IrOpcode::kPhi, Operator::kPure,
arguments, 1, "Phi", type);
}
- Operator* EffectPhi(int arguments) {
+ const Operator* EffectPhi(int arguments) {
DCHECK(arguments > 0); // Disallow empty phis.
return new (zone_) Operator1<int>(IrOpcode::kEffectPhi, Operator::kPure, 0,
0, "EffectPhi", arguments);
}
- Operator* ControlEffect() {
+ const Operator* ControlEffect() {
return new (zone_) SimpleOperator(IrOpcode::kControlEffect, Operator::kPure,
0, 0, "ControlEffect");
}
- Operator* ValueEffect(int arguments) {
+ const Operator* ValueEffect(int arguments) {
DCHECK(arguments > 0); // Disallow empty value effects.
return new (zone_) SimpleOperator(IrOpcode::kValueEffect, Operator::kPure,
arguments, 0, "ValueEffect");
}
- Operator* Finish(int arguments) {
+ const Operator* Finish(int arguments) {
DCHECK(arguments > 0); // Disallow empty finishes.
return new (zone_) Operator1<int>(IrOpcode::kFinish, Operator::kPure, 1, 1,
"Finish", arguments);
}
- Operator* StateValues(int arguments) {
+ const Operator* StateValues(int arguments) {
return new (zone_) Operator1<int>(IrOpcode::kStateValues, Operator::kPure,
arguments, 1, "StateValues", arguments);
}
- Operator* FrameState(BailoutId bailout_id, OutputFrameStateCombine combine) {
+ const Operator* FrameState(BailoutId bailout_id,
+ OutputFrameStateCombine combine) {
return new (zone_) Operator1<FrameStateCallInfo>(
IrOpcode::kFrameState, Operator::kPure, 4, 1, "FrameState",
FrameStateCallInfo(bailout_id, combine));
}
- Operator* Call(CallDescriptor* descriptor) {
+ const Operator* Call(CallDescriptor* descriptor) {
return new (zone_) CallOperator(descriptor, "Call");
}
- Operator* Projection(size_t index) {
+ const Operator* Projection(size_t index) {
return new (zone_) Operator1<size_t>(IrOpcode::kProjection, Operator::kPure,
1, 1, "Projection", index);
}
« no previous file with comments | « src/compiler/change-lowering.cc ('k') | src/compiler/common-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698