OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/simplified-operator.h" | 5 #include "src/compiler/simplified-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 #include "src/types.h" | 10 #include "src/types.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 if (access.name.ToHandle(&name)) { | 117 if (access.name.ToHandle(&name)) { |
118 name->Print(os); | 118 name->Print(os); |
119 os << ", "; | 119 os << ", "; |
120 } | 120 } |
121 #endif | 121 #endif |
122 access.type->PrintTo(os); | 122 access.type->PrintTo(os); |
123 os << ", " << access.machine_type << ", " << access.write_barrier_kind << "]"; | 123 os << ", " << access.machine_type << ", " << access.write_barrier_kind << "]"; |
124 return os; | 124 return os; |
125 } | 125 } |
126 | 126 |
| 127 template <> |
| 128 void Operator1<FieldAccess>::PrintParameter(std::ostream& os, |
| 129 PrintVerbosity verbose) const { |
| 130 if (verbose == PrintVerbosity::kVerbose) { |
| 131 os << parameter(); |
| 132 } else { |
| 133 os << "[+" << parameter().offset << "]"; |
| 134 } |
| 135 } |
127 | 136 |
128 bool operator==(ElementAccess const& lhs, ElementAccess const& rhs) { | 137 bool operator==(ElementAccess const& lhs, ElementAccess const& rhs) { |
129 // On purpose we don't include the write barrier kind here, as this method is | 138 // On purpose we don't include the write barrier kind here, as this method is |
130 // really only relevant for eliminating loads and they don't care about the | 139 // really only relevant for eliminating loads and they don't care about the |
131 // write barrier mode. | 140 // write barrier mode. |
132 return lhs.base_is_tagged == rhs.base_is_tagged && | 141 return lhs.base_is_tagged == rhs.base_is_tagged && |
133 lhs.header_size == rhs.header_size && | 142 lhs.header_size == rhs.header_size && |
134 lhs.machine_type == rhs.machine_type; | 143 lhs.machine_type == rhs.machine_type; |
135 } | 144 } |
136 | 145 |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 Operator::kNoDeopt | Operator::kNoThrow | properties, \ | 553 Operator::kNoDeopt | Operator::kNoThrow | properties, \ |
545 #Name, value_input_count, 1, control_input_count, \ | 554 #Name, value_input_count, 1, control_input_count, \ |
546 output_count, 1, 0, access); \ | 555 output_count, 1, 0, access); \ |
547 } | 556 } |
548 ACCESS_OP_LIST(ACCESS) | 557 ACCESS_OP_LIST(ACCESS) |
549 #undef ACCESS | 558 #undef ACCESS |
550 | 559 |
551 } // namespace compiler | 560 } // namespace compiler |
552 } // namespace internal | 561 } // namespace internal |
553 } // namespace v8 | 562 } // namespace v8 |
OLD | NEW |