[turbofan] Deinlinify OperatorProperties implementation.
authorbmeurer <bmeurer@chromium.org>
Tue, 23 Dec 2014 12:50:43 +0000 (04:50 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 23 Dec 2014 12:50:51 +0000 (12:50 +0000)
TEST=cctest,unittests
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25935}

20 files changed:
BUILD.gn
src/compiler/basic-block-instrumentor.cc
src/compiler/graph-builder.cc
src/compiler/graph-replay.cc
src/compiler/graph.cc
src/compiler/js-context-specialization.cc
src/compiler/node-properties-inl.h
src/compiler/operator-properties.cc [moved from src/compiler/operator-properties-inl.h with 71% similarity]
src/compiler/operator-properties.h
src/compiler/simplified-lowering.cc
test/cctest/compiler/simplified-graph-builder.cc
test/cctest/compiler/test-machine-operator-reducer.cc
test/cctest/compiler/test-typer.cc
test/unittests/compiler/change-lowering-unittest.cc
test/unittests/compiler/common-operator-unittest.cc
test/unittests/compiler/control-equivalence-unittest.cc
test/unittests/compiler/js-operator-unittest.cc
test/unittests/compiler/node-test-utils.cc
test/unittests/compiler/simplified-operator-unittest.cc
tools/gyp/v8.gyp

index 728b06f..28695dd 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -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",
index 59bb7f4..d7d3ade 100644 (file)
@@ -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 {
index 0e460aa..6321aaa 100644 (file)
@@ -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 {
index 25a62f3..3a0b783 100644 (file)
@@ -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 {
index 619a8de..995046b 100644 (file)
@@ -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 {
index b2a234b..a700b47 100644 (file)
@@ -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());
index 1ff0938..0d29614 100644 (file)
@@ -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 {
similarity index 71%
rename from src/compiler/operator-properties-inl.h
rename to src/compiler/operator-properties.cc
index f958e74..abfc5fd 100644 (file)
@@ -1,30 +1,29 @@
-// 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_
index 70186c9..37c9755 100644 (file)
@@ -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
index 74ddb53..89c6bce 100644 (file)
@@ -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"
index 4e8a5e3..baa03fb 100644 (file)
@@ -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 {
index b538fb7..648e1b9 100644 (file)
@@ -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"
 
index 2b9d91a..5f7f55a 100644 (file)
@@ -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"
index 199fb30..763a443 100644 (file)
@@ -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"
index b4bd799..d0ac145 100644 (file)
@@ -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 {
index b44f671..56b4a2b 100644 (file)
@@ -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"
index 828db80..7aa0c64 100644 (file)
@@ -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 {
index 90d4889..3162c54 100644 (file)
@@ -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"
 
index b65c0b4..e7fceba 100644 (file)
@@ -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 {
index 388c10f..8901681 100644 (file)
         '../../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',