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-inl.h" | 10 #include "src/types-inl.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 | 96 |
97 size_t hash_value(FieldAccess const& access) { | 97 size_t hash_value(FieldAccess const& access) { |
98 return base::hash_combine(access.base_is_tagged, access.offset, | 98 return base::hash_combine(access.base_is_tagged, access.offset, |
99 access.machine_type); | 99 access.machine_type); |
100 } | 100 } |
101 | 101 |
102 | 102 |
103 std::ostream& operator<<(std::ostream& os, FieldAccess const& access) { | 103 std::ostream& operator<<(std::ostream& os, FieldAccess const& access) { |
104 os << "[" << access.base_is_tagged << ", " << access.offset << ", "; | 104 os << "[" << access.base_is_tagged << ", " << access.offset << ", "; |
105 #ifdef OBJECT_PRINT | 105 if (access.name != nullptr) os << access.name << ", "; |
106 Handle<Name> name; | |
107 if (access.name.ToHandle(&name)) { | |
108 name->Print(os); | |
109 os << ", "; | |
110 } | |
111 #endif | |
112 access.type->PrintTo(os); | 106 access.type->PrintTo(os); |
113 os << ", " << access.machine_type << "]"; | 107 os << ", " << access.machine_type << "]"; |
114 return os; | 108 return os; |
115 } | 109 } |
116 | 110 |
117 | 111 |
118 bool operator==(ElementAccess const& lhs, ElementAccess const& rhs) { | 112 bool operator==(ElementAccess const& lhs, ElementAccess const& rhs) { |
119 return lhs.base_is_tagged == rhs.base_is_tagged && | 113 return lhs.base_is_tagged == rhs.base_is_tagged && |
120 lhs.header_size == rhs.header_size && | 114 lhs.header_size == rhs.header_size && |
121 lhs.machine_type == rhs.machine_type; | 115 lhs.machine_type == rhs.machine_type; |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ | 301 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ |
308 #Name, value_input_count, 1, control_input_count, \ | 302 #Name, value_input_count, 1, control_input_count, \ |
309 output_count, 1, 0, access); \ | 303 output_count, 1, 0, access); \ |
310 } | 304 } |
311 ACCESS_OP_LIST(ACCESS) | 305 ACCESS_OP_LIST(ACCESS) |
312 #undef ACCESS | 306 #undef ACCESS |
313 | 307 |
314 } // namespace compiler | 308 } // namespace compiler |
315 } // namespace internal | 309 } // namespace internal |
316 } // namespace v8 | 310 } // namespace v8 |
OLD | NEW |