Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: src/compiler/operator.cc

Issue 526313002: [turbofan] First step of Operator refactoring. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/operator.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/operator.cc
diff --git a/src/compiler/operator.cc b/src/compiler/operator.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f37f3aacdaabbce077f8e54c72134603836d990e
--- /dev/null
+++ b/src/compiler/operator.cc
@@ -0,0 +1,56 @@
+// 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.
+
+#include "src/compiler/operator.h"
+
+#include "src/assembler.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+Operator::~Operator() {}
+
+
+SimpleOperator::SimpleOperator(Opcode opcode, Properties properties,
+ int input_count, int output_count,
+ const char* mnemonic)
+ : Operator(opcode, properties, mnemonic),
+ input_count_(input_count),
+ output_count_(output_count) {}
+
+
+SimpleOperator::~SimpleOperator() {}
+
+
+// static
+OStream& StaticParameterTraits<ExternalReference>::PrintTo(
+ OStream& os, ExternalReference reference) {
+ os << reference.address();
+ // TODO(bmeurer): Move to operator<<(os, ExternalReference)
+ const Runtime::Function* function =
+ Runtime::FunctionForEntry(reference.address());
+ if (function) {
+ os << " <" << function->name << ".entry>";
+ }
+ return os;
+}
+
+
+// static
+int StaticParameterTraits<ExternalReference>::HashCode(
+ ExternalReference reference) {
+ return reinterpret_cast<intptr_t>(reference.address()) & 0xFFFFFFFF;
+}
+
+
+// static
+bool StaticParameterTraits<ExternalReference>::Equals(ExternalReference lhs,
+ ExternalReference rhs) {
+ return lhs == rhs;
+}
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
« no previous file with comments | « src/compiler/operator.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698