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

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

Issue 585413002: [turbofan] Remove extra attributes from MachineOperatorBuilder methods. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/machine-operator-reducer-unittest.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 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
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 LAZY_INSTANCE_INITIALIZER; 187 LAZY_INSTANCE_INITIALIZER;
188 188
189 189
190 MachineOperatorBuilder::MachineOperatorBuilder(MachineType word) 190 MachineOperatorBuilder::MachineOperatorBuilder(MachineType word)
191 : impl_(kImpl.Get()), word_(word) { 191 : impl_(kImpl.Get()), word_(word) {
192 DCHECK(word == kRepWord32 || word == kRepWord64); 192 DCHECK(word == kRepWord32 || word == kRepWord64);
193 } 193 }
194 194
195 195
196 #define PURE(Name, properties, input_count, output_count) \ 196 #define PURE(Name, properties, input_count, output_count) \
197 const Operator* MachineOperatorBuilder::Name() const { \ 197 const Operator* MachineOperatorBuilder::Name() { return &impl_.k##Name; }
198 return &impl_.k##Name; \
199 }
200 PURE_OP_LIST(PURE) 198 PURE_OP_LIST(PURE)
201 #undef PURE 199 #undef PURE
202 200
203 201
204 const Operator* MachineOperatorBuilder::Load(LoadRepresentation rep) const { 202 const Operator* MachineOperatorBuilder::Load(LoadRepresentation rep) {
205 switch (rep) { 203 switch (rep) {
206 #define LOAD(Type) \ 204 #define LOAD(Type) \
207 case k##Type: \ 205 case k##Type: \
208 return &impl_.k##Load##Type; 206 return &impl_.k##Load##Type;
209 MACHINE_TYPE_LIST(LOAD) 207 MACHINE_TYPE_LIST(LOAD)
210 #undef LOAD 208 #undef LOAD
211 209
212 default: 210 default:
213 break; 211 break;
214 } 212 }
215 UNREACHABLE(); 213 UNREACHABLE();
216 return NULL; 214 return NULL;
217 } 215 }
218 216
219 217
220 const Operator* MachineOperatorBuilder::Store(StoreRepresentation rep) const { 218 const Operator* MachineOperatorBuilder::Store(StoreRepresentation rep) {
221 switch (rep.machine_type()) { 219 switch (rep.machine_type()) {
222 #define STORE(Type) \ 220 #define STORE(Type) \
223 case k##Type: \ 221 case k##Type: \
224 switch (rep.write_barrier_kind()) { \ 222 switch (rep.write_barrier_kind()) { \
225 case kNoWriteBarrier: \ 223 case kNoWriteBarrier: \
226 return &impl_.k##Store##Type##NoWriteBarrier; \ 224 return &impl_.k##Store##Type##NoWriteBarrier; \
227 case kFullWriteBarrier: \ 225 case kFullWriteBarrier: \
228 return &impl_.k##Store##Type##FullWriteBarrier; \ 226 return &impl_.k##Store##Type##FullWriteBarrier; \
229 } \ 227 } \
230 break; 228 break;
231 MACHINE_TYPE_LIST(STORE) 229 MACHINE_TYPE_LIST(STORE)
232 #undef STORE 230 #undef STORE
233 231
234 default: 232 default:
235 break; 233 break;
236 } 234 }
237 UNREACHABLE(); 235 UNREACHABLE();
238 return NULL; 236 return NULL;
239 } 237 }
240 238
241 } // namespace compiler 239 } // namespace compiler
242 } // namespace internal 240 } // namespace internal
243 } // namespace v8 241 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/machine-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698