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#include "src/globals.h"
10
11namespace v8 {
12namespace internal {
13namespace compiler {
14
15// Forward declarations.
16class Operator;
17
18class V8_EXPORT_PRIVATE OperatorProperties final {
19 public:
20  static bool HasContextInput(const Operator* op);
21  static int GetContextInputCount(const Operator* op) {
22    return HasContextInput(op) ? 1 : 0;
23  }
24
25  static bool HasFrameStateInput(const Operator* op);
26  static int GetFrameStateInputCount(const Operator* op) {
27    return HasFrameStateInput(op) ? 1 : 0;
28  }
29
30  static int GetTotalInputCount(const Operator* op);
31
32  static bool IsBasicBlockBegin(const Operator* op);
33
34 private:
35  DISALLOW_COPY_AND_ASSIGN(OperatorProperties);
36};
37
38}  // namespace compiler
39}  // namespace internal
40}  // namespace v8
41
42#endif  // V8_COMPILER_OPERATOR_PROPERTIES_H_
43