OLD | NEW |
(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 |
OLD | NEW |