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

Unified Diff: src/compiler/operator-properties-inl.h

Issue 686213002: Inline trivial OperatorProperties methods. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/operator-properties.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/operator-properties-inl.h
diff --git a/src/compiler/operator-properties-inl.h b/src/compiler/operator-properties-inl.h
index 409e4f00dfe5a1c3114a2b0b3e959cd5a8b0842d..f958e74790ada5391c9c4033af2153e38cc6f86f 100644
--- a/src/compiler/operator-properties-inl.h
+++ b/src/compiler/operator-properties-inl.h
@@ -15,23 +15,11 @@ namespace v8 {
namespace internal {
namespace compiler {
-inline bool OperatorProperties::HasValueInput(const Operator* op) {
- return op->ValueInputCount() > 0;
-}
-
inline bool OperatorProperties::HasContextInput(const Operator* op) {
IrOpcode::Value opcode = static_cast<IrOpcode::Value>(op->opcode());
return IrOpcode::IsJsOpcode(opcode);
}
-inline bool OperatorProperties::HasEffectInput(const Operator* op) {
- return op->EffectInputCount() > 0;
-}
-
-inline bool OperatorProperties::HasControlInput(const Operator* op) {
- return op->ControlInputCount() > 0;
-}
-
inline bool OperatorProperties::HasFrameStateInput(const Operator* op) {
if (!FLAG_turbo_deoptimization) {
return false;
@@ -93,10 +81,6 @@ inline bool OperatorProperties::HasFrameStateInput(const Operator* op) {
}
}
-inline int OperatorProperties::GetValueInputCount(const Operator* op) {
- return op->ValueInputCount();
-}
-
inline int OperatorProperties::GetContextInputCount(const Operator* op) {
return OperatorProperties::HasContextInput(op) ? 1 : 0;
}
@@ -105,49 +89,15 @@ inline int OperatorProperties::GetFrameStateInputCount(const Operator* op) {
return OperatorProperties::HasFrameStateInput(op) ? 1 : 0;
}
-inline int OperatorProperties::GetEffectInputCount(const Operator* op) {
- return op->EffectInputCount();
-}
-
-inline int OperatorProperties::GetControlInputCount(const Operator* op) {
- return op->ControlInputCount();
-}
-
inline int OperatorProperties::GetTotalInputCount(const Operator* op) {
- return GetValueInputCount(op) + GetContextInputCount(op) +
- GetFrameStateInputCount(op) + GetEffectInputCount(op) +
- GetControlInputCount(op);
+ return op->ValueInputCount() + GetContextInputCount(op) +
+ GetFrameStateInputCount(op) + op->EffectInputCount() +
+ op->ControlInputCount();
}
// -----------------------------------------------------------------------------
// Output properties.
-inline bool OperatorProperties::HasValueOutput(const Operator* op) {
- return op->ValueOutputCount() > 0;
-}
-
-inline bool OperatorProperties::HasEffectOutput(const Operator* op) {
- return op->EffectOutputCount() > 0;
-}
-
-inline bool OperatorProperties::HasControlOutput(const Operator* op) {
- return op->ControlOutputCount() > 0;
-}
-
-
-inline int OperatorProperties::GetValueOutputCount(const Operator* op) {
- return op->ValueOutputCount();
-}
-
-inline int OperatorProperties::GetEffectOutputCount(const Operator* op) {
- return op->EffectOutputCount();
-}
-
-inline int OperatorProperties::GetControlOutputCount(const Operator* op) {
- return op->ControlOutputCount();
-}
-
-
inline bool OperatorProperties::IsBasicBlockBegin(const Operator* op) {
uint8_t opcode = op->opcode();
return opcode == IrOpcode::kStart || opcode == IrOpcode::kEnd ||
« no previous file with comments | « src/compiler/operator-properties.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698