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

Side by Side Diff: src/compiler/simplified-operator.cc

Issue 1514863002: [turbofan] Make FieldAccess::name usable in practice. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment. Created 5 years 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
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698