1- // Copyright 2013 the V8 project authors. All rights reserved.
1+ // Copyright 2014 the V8 project authors. All rights reserved.
22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- #ifndef V8_COMPILER_OPERATOR_PROPERTIES_INL_H_
6- #define V8_COMPILER_OPERATOR_PROPERTIES_INL_H_
5+ #include " src/compiler/operator-properties.h"
76
8- #include " src/compiler/common-operator.h"
97#include " src/compiler/js-operator.h"
108#include " src/compiler/linkage.h"
119#include " src/compiler/opcodes.h"
12- #include " src/compiler/operator-properties.h"
1310
1411namespace v8 {
1512namespace internal {
1613namespace compiler {
1714
18- inline bool OperatorProperties::HasContextInput (const Operator* op) {
15+ // static
16+ bool OperatorProperties::HasContextInput (const Operator* op) {
1917 IrOpcode::Value opcode = static_cast <IrOpcode::Value>(op->opcode ());
2018 return IrOpcode::IsJsOpcode (opcode);
2119}
2220
23- inline bool OperatorProperties::HasFrameStateInput (const Operator* op) {
21+
22+ // static
23+ bool OperatorProperties::HasFrameStateInput (const Operator* op) {
2424 if (!FLAG_turbo_deoptimization) {
2525 return false ;
2626 }
27-
2827 switch (op->opcode ()) {
2928 case IrOpcode::kFrameState :
3029 return true ;
@@ -81,25 +80,18 @@ inline bool OperatorProperties::HasFrameStateInput(const Operator* op) {
8180 }
8281}
8382
84- inline int OperatorProperties::GetContextInputCount (const Operator* op) {
85- return OperatorProperties::HasContextInput (op) ? 1 : 0 ;
86- }
87-
88- inline int OperatorProperties::GetFrameStateInputCount (const Operator* op) {
89- return OperatorProperties::HasFrameStateInput (op) ? 1 : 0 ;
90- }
9183
92- inline int OperatorProperties::GetTotalInputCount (const Operator* op) {
84+ // static
85+ int OperatorProperties::GetTotalInputCount (const Operator* op) {
9386 return op->ValueInputCount () + GetContextInputCount (op) +
9487 GetFrameStateInputCount (op) + op->EffectInputCount () +
9588 op->ControlInputCount ();
9689}
9790
98- // -----------------------------------------------------------------------------
99- // Output properties.
10091
101- inline bool OperatorProperties::IsBasicBlockBegin (const Operator* op) {
102- uint8_t opcode = op->opcode ();
92+ // static
93+ bool OperatorProperties::IsBasicBlockBegin (const Operator* op) {
94+ Operator::Opcode const opcode = op->opcode ();
10395 return opcode == IrOpcode::kStart || opcode == IrOpcode::kEnd ||
10496 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop ||
10597 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue ||
@@ -109,5 +101,3 @@ inline bool OperatorProperties::IsBasicBlockBegin(const Operator* op) {
109101} // namespace compiler
110102} // namespace internal
111103} // namespace v8
112-
113- #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_
0 commit comments