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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/operator.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "src/compiler/operator.h"
6
7 #include "src/assembler.h"
8
9 namespace v8 {
10 namespace internal {
11 namespace compiler {
12
13 Operator::~Operator() {}
14
15
16 SimpleOperator::SimpleOperator(Opcode opcode, Properties properties,
17 int input_count, int output_count,
18 const char* mnemonic)
19 : Operator(opcode, properties, mnemonic),
20 input_count_(input_count),
21 output_count_(output_count) {}
22
23
24 SimpleOperator::~SimpleOperator() {}
25
26
27 // static
28 OStream& StaticParameterTraits<ExternalReference>::PrintTo(
29 OStream& os, ExternalReference reference) {
30 os << reference.address();
31 // TODO(bmeurer): Move to operator<<(os, ExternalReference)
32 const Runtime::Function* function =
33 Runtime::FunctionForEntry(reference.address());
34 if (function) {
35 os << " <" << function->name << ".entry>";
36 }
37 return os;
38 }
39
40
41 // static
42 int StaticParameterTraits<ExternalReference>::HashCode(
43 ExternalReference reference) {
44 return reinterpret_cast<intptr_t>(reference.address()) & 0xFFFFFFFF;
45 }
46
47
48 // static
49 bool StaticParameterTraits<ExternalReference>::Equals(ExternalReference lhs,
50 ExternalReference rhs) {
51 return lhs == rhs;
52 }
53
54 } // namespace compiler
55 } // namespace internal
56 } // namespace v8
OLDNEW
« 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