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 10 matching lines...) Expand all Loading... |
21 return os << "tagged base"; | 21 return os << "tagged base"; |
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 return kMachUint8; | 32 return kMachUint8; |
32 case kExternalInt8Array: | 33 case kExternalInt8Array: |
33 return kMachInt8; | 34 return kMachInt8; |
34 case kExternalUint16Array: | 35 case kExternalUint16Array: |
35 return kMachUint16; | 36 return kMachUint16; |
36 case kExternalInt16Array: | 37 case kExternalInt16Array: |
37 return kMachInt16; | 38 return kMachInt16; |
38 case kExternalUint32Array: | 39 case kExternalUint32Array: |
39 return kMachUint32; | 40 return kMachUint32; |
40 case kExternalInt32Array: | 41 case kExternalInt32Array: |
41 return kMachInt32; | 42 return kMachInt32; |
42 case kExternalFloat32Array: | 43 case kExternalFloat32Array: |
43 return kMachFloat32; | 44 return kMachFloat32; |
44 case kExternalFloat64Array: | 45 case kExternalFloat64Array: |
45 return kMachFloat64; | 46 return kMachFloat64; |
46 case kExternalUint8ClampedArray: | |
47 break; | |
48 } | 47 } |
49 UNREACHABLE(); | 48 UNREACHABLE(); |
50 return kMachNone; | 49 return kMachNone; |
51 } | 50 } |
52 | 51 |
53 | 52 |
54 bool operator==(BufferAccess lhs, BufferAccess rhs) { | 53 bool operator==(BufferAccess lhs, BufferAccess rhs) { |
55 return lhs.external_array_type() == rhs.external_array_type(); | 54 return lhs.external_array_type() == rhs.external_array_type(); |
56 } | 55 } |
57 | 56 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ | 281 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ |
283 #Name, value_input_count, 1, control_input_count, \ | 282 #Name, value_input_count, 1, control_input_count, \ |
284 output_count, 1, 0, access); \ | 283 output_count, 1, 0, access); \ |
285 } | 284 } |
286 ACCESS_OP_LIST(ACCESS) | 285 ACCESS_OP_LIST(ACCESS) |
287 #undef ACCESS | 286 #undef ACCESS |
288 | 287 |
289 } // namespace compiler | 288 } // namespace compiler |
290 } // namespace internal | 289 } // namespace internal |
291 } // namespace v8 | 290 } // namespace v8 |
OLD | NEW |