OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/machine-operator.h" | 5 #include "src/compiler/machine-operator.h" |
6 | 6 |
7 #include "src/base/lazy-instance.h" | 7 #include "src/base/lazy-instance.h" |
8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 namespace compiler { | 13 namespace compiler { |
14 | 14 |
| 15 std::ostream& operator<<(std::ostream& os, WriteBarrierKind kind) { |
| 16 switch (kind) { |
| 17 case kNoWriteBarrier: |
| 18 return os << "NoWriteBarrier"; |
| 19 case kMapWriteBarrier: |
| 20 return os << "MapWriteBarrier"; |
| 21 case kPointerWriteBarrier: |
| 22 return os << "PointerWriteBarrier"; |
| 23 case kFullWriteBarrier: |
| 24 return os << "FullWriteBarrier"; |
| 25 } |
| 26 UNREACHABLE(); |
| 27 return os; |
| 28 } |
| 29 |
| 30 |
15 bool operator==(StoreRepresentation lhs, StoreRepresentation rhs) { | 31 bool operator==(StoreRepresentation lhs, StoreRepresentation rhs) { |
16 return lhs.representation() == rhs.representation() && | 32 return lhs.representation() == rhs.representation() && |
17 lhs.write_barrier_kind() == rhs.write_barrier_kind(); | 33 lhs.write_barrier_kind() == rhs.write_barrier_kind(); |
18 } | 34 } |
19 | 35 |
20 | 36 |
21 bool operator!=(StoreRepresentation lhs, StoreRepresentation rhs) { | 37 bool operator!=(StoreRepresentation lhs, StoreRepresentation rhs) { |
22 return !(lhs == rhs); | 38 return !(lhs == rhs); |
23 } | 39 } |
24 | 40 |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 } | 647 } |
632 ATOMIC_TYPE_LIST(LOAD) | 648 ATOMIC_TYPE_LIST(LOAD) |
633 #undef LOAD | 649 #undef LOAD |
634 UNREACHABLE(); | 650 UNREACHABLE(); |
635 return nullptr; | 651 return nullptr; |
636 } | 652 } |
637 | 653 |
638 } // namespace compiler | 654 } // namespace compiler |
639 } // namespace internal | 655 } // namespace internal |
640 } // namespace v8 | 656 } // namespace v8 |
OLD | NEW |