operator-properties.h 1.1 KB
Newer Older
1 2 3 4 5 6 7
// Copyright 2013 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_COMPILER_OPERATOR_PROPERTIES_H_
#define V8_COMPILER_OPERATOR_PROPERTIES_H_

8
#include "src/base/macros.h"
9
#include "src/common/globals.h"
10

11 12 13 14
namespace v8 {
namespace internal {
namespace compiler {

15
// Forward declarations.
16 17
class Operator;

18
class V8_EXPORT_PRIVATE OperatorProperties final {
19
 public:
20 21 22 23
  static bool HasContextInput(const Operator* op);
  static int GetContextInputCount(const Operator* op) {
    return HasContextInput(op) ? 1 : 0;
  }
24

25 26
  static bool NeedsExactContext(const Operator* op);

27 28 29 30
  static bool HasFrameStateInput(const Operator* op);
  static int GetFrameStateInputCount(const Operator* op) {
    return HasFrameStateInput(op) ? 1 : 0;
  }
31

32
  static int GetTotalInputCount(const Operator* op);
33

34
  static bool IsBasicBlockBegin(const Operator* op);
35

36 37
 private:
  DISALLOW_COPY_AND_ASSIGN(OperatorProperties);
38
};
39 40 41 42

}  // namespace compiler
}  // namespace internal
}  // namespace v8
43 44

#endif  // V8_COMPILER_OPERATOR_PROPERTIES_H_