Skip to content

Commit eeec886

Browse files
bmeurerCommit bot
authored andcommitted
[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}
1 parent d1d9b83 commit eeec886

20 files changed

Lines changed: 55 additions & 46 deletions

BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ source_set("v8_base") {
564564
"src/compiler/node.cc",
565565
"src/compiler/node.h",
566566
"src/compiler/opcodes.h",
567-
"src/compiler/operator-properties-inl.h",
567+
"src/compiler/operator-properties.cc",
568568
"src/compiler/operator-properties.h",
569569
"src/compiler/operator.cc",
570570
"src/compiler/operator.h",

src/compiler/basic-block-instrumentor.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
#include <sstream>
88

9+
#include "src/compiler.h"
910
#include "src/compiler/common-operator.h"
1011
#include "src/compiler/graph.h"
1112
#include "src/compiler/machine-operator.h"
12-
#include "src/compiler/operator-properties-inl.h"
13+
#include "src/compiler/operator-properties.h"
1314
#include "src/compiler/schedule.h"
1415

1516
namespace v8 {

src/compiler/graph-builder.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
#include "src/compiler/graph-builder.h"
66

7+
#include "src/bit-vector.h"
78
#include "src/compiler.h"
89
#include "src/compiler/graph-visualizer.h"
910
#include "src/compiler/node.h"
1011
#include "src/compiler/node-properties.h"
1112
#include "src/compiler/node-properties-inl.h"
1213
#include "src/compiler/operator-properties.h"
13-
#include "src/compiler/operator-properties-inl.h"
1414

1515
namespace v8 {
1616
namespace internal {

src/compiler/graph-replay.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "src/compiler/graph-inl.h"
1010
#include "src/compiler/node.h"
1111
#include "src/compiler/operator.h"
12-
#include "src/compiler/operator-properties-inl.h"
12+
#include "src/compiler/operator-properties.h"
1313

1414
namespace v8 {
1515
namespace internal {

src/compiler/graph.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "src/compiler/node-properties-inl.h"
1313
#include "src/compiler/opcodes.h"
1414
#include "src/compiler/operator-properties.h"
15-
#include "src/compiler/operator-properties-inl.h"
1615

1716
namespace v8 {
1817
namespace internal {

src/compiler/js-context-specialization.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#include "src/compiler/js-context-specialization.h"
6+
7+
#include "src/compiler.h"
58
#include "src/compiler/common-operator.h"
69
#include "src/compiler/graph-inl.h"
7-
#include "src/compiler/js-context-specialization.h"
810
#include "src/compiler/js-operator.h"
911
#include "src/compiler/node-matchers.h"
1012
#include "src/compiler/node-properties-inl.h"
@@ -13,7 +15,6 @@ namespace v8 {
1315
namespace internal {
1416
namespace compiler {
1517

16-
1718
Reduction JSContextSpecializer::Reduce(Node* node) {
1819
if (node == context_) {
1920
Node* constant = jsgraph_->Constant(info_->context());

src/compiler/node-properties-inl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "src/compiler/node-properties.h"
1212
#include "src/compiler/opcodes.h"
1313
#include "src/compiler/operator.h"
14-
#include "src/compiler/operator-properties-inl.h"
1514
#include "src/compiler/operator-properties.h"
1615

1716
namespace v8 {
Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
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

1411
namespace v8 {
1512
namespace internal {
1613
namespace 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_

src/compiler/operator-properties.h

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,33 @@
55
#ifndef V8_COMPILER_OPERATOR_PROPERTIES_H_
66
#define V8_COMPILER_OPERATOR_PROPERTIES_H_
77

8+
#include "src/base/macros.h"
9+
810
namespace v8 {
911
namespace internal {
1012
namespace compiler {
1113

14+
// Forward declarations.
1215
class Operator;
1316

14-
class OperatorProperties {
17+
18+
class OperatorProperties FINAL {
1519
public:
16-
static inline bool HasContextInput(const Operator* op);
17-
static inline bool HasFrameStateInput(const Operator* op);
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);
1830

19-
static inline int GetContextInputCount(const Operator* op);
20-
static inline int GetFrameStateInputCount(const Operator* op);
21-
static inline int GetTotalInputCount(const Operator* op);
31+
static bool IsBasicBlockBegin(const Operator* op);
2232

23-
static inline bool IsBasicBlockBegin(const Operator* op);
33+
private:
34+
DISALLOW_COPY_AND_ASSIGN(OperatorProperties);
2435
};
2536

2637
} // namespace compiler

src/compiler/simplified-lowering.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "src/compiler/common-operator.h"
1212
#include "src/compiler/diamond.h"
1313
#include "src/compiler/graph-inl.h"
14+
#include "src/compiler/linkage.h"
1415
#include "src/compiler/node-matchers.h"
1516
#include "src/compiler/node-properties-inl.h"
1617
#include "src/compiler/representation-change.h"

0 commit comments

Comments
 (0)