Commit eeec886e authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Deinlinify OperatorProperties implementation.

TEST=cctest,unittests
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/821913002

Cr-Commit-Position: refs/heads/master@{#25935}
parent d1d9b833
......@@ -564,7 +564,7 @@ source_set("v8_base") {
"src/compiler/node.cc",
"src/compiler/node.h",
"src/compiler/opcodes.h",
"src/compiler/operator-properties-inl.h",
"src/compiler/operator-properties.cc",
"src/compiler/operator-properties.h",
"src/compiler/operator.cc",
"src/compiler/operator.h",
......
......@@ -6,10 +6,11 @@
#include <sstream>
#include "src/compiler.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
#include "src/compiler/machine-operator.h"
#include "src/compiler/operator-properties-inl.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/schedule.h"
namespace v8 {
......
......@@ -4,13 +4,13 @@
#include "src/compiler/graph-builder.h"
#include "src/bit-vector.h"
#include "src/compiler.h"
#include "src/compiler/graph-visualizer.h"
#include "src/compiler/node.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/node-properties-inl.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/operator-properties-inl.h"
namespace v8 {
namespace internal {
......
......@@ -9,7 +9,7 @@
#include "src/compiler/graph-inl.h"
#include "src/compiler/node.h"
#include "src/compiler/operator.h"
#include "src/compiler/operator-properties-inl.h"
#include "src/compiler/operator-properties.h"
namespace v8 {
namespace internal {
......
......@@ -12,7 +12,6 @@
#include "src/compiler/node-properties-inl.h"
#include "src/compiler/opcodes.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/operator-properties-inl.h"
namespace v8 {
namespace internal {
......
......@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/compiler/js-context-specialization.h"
#include "src/compiler.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/graph-inl.h"
#include "src/compiler/js-context-specialization.h"
#include "src/compiler/js-operator.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties-inl.h"
......@@ -13,7 +15,6 @@ namespace v8 {
namespace internal {
namespace compiler {
Reduction JSContextSpecializer::Reduce(Node* node) {
if (node == context_) {
Node* constant = jsgraph_->Constant(info_->context());
......
......@@ -11,7 +11,6 @@
#include "src/compiler/node-properties.h"
#include "src/compiler/opcodes.h"
#include "src/compiler/operator.h"
#include "src/compiler/operator-properties-inl.h"
#include "src/compiler/operator-properties.h"
namespace v8 {
......
// Copyright 2013 the V8 project authors. All rights reserved.
// Copyright 2014 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_INL_H_
#define V8_COMPILER_OPERATOR_PROPERTIES_INL_H_
#include "src/compiler/operator-properties.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/js-operator.h"
#include "src/compiler/linkage.h"
#include "src/compiler/opcodes.h"
#include "src/compiler/operator-properties.h"
namespace v8 {
namespace internal {
namespace compiler {
inline bool OperatorProperties::HasContextInput(const Operator* op) {
// static
bool OperatorProperties::HasContextInput(const Operator* op) {
IrOpcode::Value opcode = static_cast<IrOpcode::Value>(op->opcode());
return IrOpcode::IsJsOpcode(opcode);
}
inline bool OperatorProperties::HasFrameStateInput(const Operator* op) {
// static
bool OperatorProperties::HasFrameStateInput(const Operator* op) {
if (!FLAG_turbo_deoptimization) {
return false;
}
switch (op->opcode()) {
case IrOpcode::kFrameState:
return true;
......@@ -81,25 +80,18 @@ inline bool OperatorProperties::HasFrameStateInput(const Operator* op) {
}
}
inline int OperatorProperties::GetContextInputCount(const Operator* op) {
return OperatorProperties::HasContextInput(op) ? 1 : 0;
}
inline int OperatorProperties::GetFrameStateInputCount(const Operator* op) {
return OperatorProperties::HasFrameStateInput(op) ? 1 : 0;
}
inline int OperatorProperties::GetTotalInputCount(const Operator* op) {
// static
int OperatorProperties::GetTotalInputCount(const Operator* op) {
return op->ValueInputCount() + GetContextInputCount(op) +
GetFrameStateInputCount(op) + op->EffectInputCount() +
op->ControlInputCount();
}
// -----------------------------------------------------------------------------
// Output properties.
inline bool OperatorProperties::IsBasicBlockBegin(const Operator* op) {
uint8_t opcode = op->opcode();
// static
bool OperatorProperties::IsBasicBlockBegin(const Operator* op) {
Operator::Opcode const opcode = op->opcode();
return opcode == IrOpcode::kStart || opcode == IrOpcode::kEnd ||
opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop ||
opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue ||
......@@ -109,5 +101,3 @@ inline bool OperatorProperties::IsBasicBlockBegin(const Operator* op) {
} // namespace compiler
} // namespace internal
} // namespace v8
#endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_
......@@ -5,22 +5,33 @@
#ifndef V8_COMPILER_OPERATOR_PROPERTIES_H_
#define V8_COMPILER_OPERATOR_PROPERTIES_H_
#include "src/base/macros.h"
namespace v8 {
namespace internal {
namespace compiler {
// Forward declarations.
class Operator;
class OperatorProperties {
class OperatorProperties FINAL {
public:
static inline bool HasContextInput(const Operator* op);
static inline bool HasFrameStateInput(const Operator* op);
static bool HasContextInput(const Operator* op);
static bool HasFrameStateInput(const Operator* op);
static int GetContextInputCount(const Operator* op) {
return HasContextInput(op) ? 1 : 0;
}
static int GetFrameStateInputCount(const Operator* op) {
return HasFrameStateInput(op) ? 1 : 0;
}
static int GetTotalInputCount(const Operator* op);
static inline int GetContextInputCount(const Operator* op);
static inline int GetFrameStateInputCount(const Operator* op);
static inline int GetTotalInputCount(const Operator* op);
static bool IsBasicBlockBegin(const Operator* op);
static inline bool IsBasicBlockBegin(const Operator* op);
private:
DISALLOW_COPY_AND_ASSIGN(OperatorProperties);
};
} // namespace compiler
......
......@@ -11,6 +11,7 @@
#include "src/compiler/common-operator.h"
#include "src/compiler/diamond.h"
#include "src/compiler/graph-inl.h"
#include "src/compiler/linkage.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties-inl.h"
#include "src/compiler/representation-change.h"
......
......@@ -5,7 +5,6 @@
#include "test/cctest/compiler/simplified-graph-builder.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/operator-properties-inl.h"
namespace v8 {
namespace internal {
......
......@@ -10,7 +10,6 @@
#include "src/compiler/js-graph.h"
#include "src/compiler/machine-operator-reducer.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/operator-properties-inl.h"
#include "src/compiler/typer.h"
#include "test/cctest/compiler/value-helper.h"
......
......@@ -5,6 +5,7 @@
#include <functional>
#include "src/codegen.h"
#include "src/compiler/js-operator.h"
#include "src/compiler/node-properties-inl.h"
#include "src/compiler/typer.h"
#include "test/cctest/cctest.h"
......
......@@ -5,6 +5,7 @@
#include "src/code-stubs.h"
#include "src/compiler/change-lowering.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/linkage.h"
#include "src/compiler/node-properties-inl.h"
#include "src/compiler/simplified-operator.h"
#include "test/unittests/compiler/compiler-test-utils.h"
......
......@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/compiler/common-operator.h"
#include <limits>
#include "src/compiler/operator-properties-inl.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/opcodes.h"
#include "src/compiler/operator.h"
#include "src/compiler/operator-properties.h"
#include "test/unittests/test-utils.h"
namespace v8 {
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/bit-vector.h"
#include "src/compiler/control-equivalence.h"
#include "src/compiler/graph-visualizer.h"
#include "src/compiler/node-properties-inl.h"
......
......@@ -3,7 +3,9 @@
// found in the LICENSE file.
#include "src/compiler/js-operator.h"
#include "src/compiler/operator-properties-inl.h"
#include "src/compiler/opcodes.h"
#include "src/compiler/operator.h"
#include "src/compiler/operator-properties.h"
#include "test/unittests/test-utils.h"
namespace v8 {
......
......@@ -4,6 +4,7 @@
#include "test/unittests/compiler/node-test-utils.h"
#include "src/assembler.h"
#include "src/compiler/node-properties-inl.h"
#include "src/compiler/simplified-operator.h"
......
......@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/compiler/opcodes.h"
#include "src/compiler/operator.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/simplified-operator.h"
#include "src/compiler/operator-properties-inl.h"
#include "src/types-inl.h"
#include "test/unittests/test-utils.h"
namespace v8 {
......
......@@ -491,7 +491,7 @@
'../../src/compiler/node.cc',
'../../src/compiler/node.h',
'../../src/compiler/opcodes.h',
'../../src/compiler/operator-properties-inl.h',
'../../src/compiler/operator-properties.cc',
'../../src/compiler/operator-properties.h',
'../../src/compiler/operator.cc',
'../../src/compiler/operator.h',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment