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

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

Issue 1513543003: [turbofan] Make MachineType a pair of enums. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar rebase 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-lowering.cc ('k') | src/compiler/state-values-utils.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 11 matching lines...) Expand all
22 } 22 }
23 UNREACHABLE(); 23 UNREACHABLE();
24 return os; 24 return os;
25 } 25 }
26 26
27 27
28 MachineType BufferAccess::machine_type() const { 28 MachineType BufferAccess::machine_type() const {
29 switch (external_array_type_) { 29 switch (external_array_type_) {
30 case kExternalUint8Array: 30 case kExternalUint8Array:
31 case kExternalUint8ClampedArray: 31 case kExternalUint8ClampedArray:
32 return kMachUint8; 32 return MachineType::Uint8();
33 case kExternalInt8Array: 33 case kExternalInt8Array:
34 return kMachInt8; 34 return MachineType::Int8();
35 case kExternalUint16Array: 35 case kExternalUint16Array:
36 return kMachUint16; 36 return MachineType::Uint16();
37 case kExternalInt16Array: 37 case kExternalInt16Array:
38 return kMachInt16; 38 return MachineType::Int16();
39 case kExternalUint32Array: 39 case kExternalUint32Array:
40 return kMachUint32; 40 return MachineType::Uint32();
41 case kExternalInt32Array: 41 case kExternalInt32Array:
42 return kMachInt32; 42 return MachineType::Int32();
43 case kExternalFloat32Array: 43 case kExternalFloat32Array:
44 return kMachFloat32; 44 return MachineType::Float32();
45 case kExternalFloat64Array: 45 case kExternalFloat64Array:
46 return kMachFloat64; 46 return MachineType::Float64();
47 } 47 }
48 UNREACHABLE(); 48 UNREACHABLE();
49 return kMachNone; 49 return MachineType::None();
50 } 50 }
51 51
52 52
53 bool operator==(BufferAccess lhs, BufferAccess rhs) { 53 bool operator==(BufferAccess lhs, BufferAccess rhs) {
54 return lhs.external_array_type() == rhs.external_array_type(); 54 return lhs.external_array_type() == rhs.external_array_type();
55 } 55 }
56 56
57 57
58 bool operator!=(BufferAccess lhs, BufferAccess rhs) { return !(lhs == rhs); } 58 bool operator!=(BufferAccess lhs, BufferAccess rhs) { return !(lhs == rhs); }
59 59
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ 307 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \
308 #Name, value_input_count, 1, control_input_count, \ 308 #Name, value_input_count, 1, control_input_count, \
309 output_count, 1, 0, access); \ 309 output_count, 1, 0, access); \
310 } 310 }
311 ACCESS_OP_LIST(ACCESS) 311 ACCESS_OP_LIST(ACCESS)
312 #undef ACCESS 312 #undef ACCESS
313 313
314 } // namespace compiler 314 } // namespace compiler
315 } // namespace internal 315 } // namespace internal
316 } // namespace v8 316 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/state-values-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698