37c9755ed7aceb68536a1823ce22356b51ee1788
[platform/upstream/nodejs.git] / deps / v8 / src / compiler / operator-properties.h
1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_COMPILER_OPERATOR_PROPERTIES_H_
6 #define V8_COMPILER_OPERATOR_PROPERTIES_H_
7
8 #include "src/base/macros.h"
9
10 namespace v8 {
11 namespace internal {
12 namespace compiler {
13
14 // Forward declarations.
15 class Operator;
16
17
18 class OperatorProperties FINAL {
19  public:
20   static bool HasContextInput(const Operator* op);
21   static bool HasFrameStateInput(const Operator* op);
22
23   static int GetContextInputCount(const Operator* op) {
24     return HasContextInput(op) ? 1 : 0;
25   }
26   static int GetFrameStateInputCount(const Operator* op) {
27     return HasFrameStateInput(op) ? 1 : 0;
28   }
29   static int GetTotalInputCount(const Operator* op);
30
31   static bool IsBasicBlockBegin(const Operator* op);
32
33  private:
34   DISALLOW_COPY_AND_ASSIGN(OperatorProperties);
35 };
36
37 }  // namespace compiler
38 }  // namespace internal
39 }  // namespace v8
40
41 #endif  // V8_COMPILER_OPERATOR_PROPERTIES_H_