OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 namespace v8 { | 34 namespace v8 { |
35 namespace internal { | 35 namespace internal { |
36 | 36 |
37 | 37 |
38 int ElementsKindToShiftSize(ElementsKind elements_kind) { | 38 int ElementsKindToShiftSize(ElementsKind elements_kind) { |
39 switch (elements_kind) { | 39 switch (elements_kind) { |
40 case EXTERNAL_BYTE_ELEMENTS: | 40 case EXTERNAL_BYTE_ELEMENTS: |
41 case EXTERNAL_PIXEL_ELEMENTS: | 41 case EXTERNAL_PIXEL_ELEMENTS: |
42 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 42 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
| 43 case UINT8_ELEMENTS: |
| 44 case INT8_ELEMENTS: |
| 45 case UINT8_CLAMPED_ELEMENTS: |
43 return 0; | 46 return 0; |
44 case EXTERNAL_SHORT_ELEMENTS: | 47 case EXTERNAL_SHORT_ELEMENTS: |
45 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 48 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
| 49 case UINT16_ELEMENTS: |
| 50 case INT16_ELEMENTS: |
46 return 1; | 51 return 1; |
47 case EXTERNAL_INT_ELEMENTS: | 52 case EXTERNAL_INT_ELEMENTS: |
48 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 53 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
49 case EXTERNAL_FLOAT_ELEMENTS: | 54 case EXTERNAL_FLOAT_ELEMENTS: |
| 55 case UINT32_ELEMENTS: |
| 56 case INT32_ELEMENTS: |
| 57 case FLOAT32_ELEMENTS: |
50 return 2; | 58 return 2; |
51 case EXTERNAL_DOUBLE_ELEMENTS: | 59 case EXTERNAL_DOUBLE_ELEMENTS: |
52 case FAST_DOUBLE_ELEMENTS: | 60 case FAST_DOUBLE_ELEMENTS: |
53 case FAST_HOLEY_DOUBLE_ELEMENTS: | 61 case FAST_HOLEY_DOUBLE_ELEMENTS: |
| 62 case FLOAT64_ELEMENTS: |
54 return 3; | 63 return 3; |
55 case FAST_SMI_ELEMENTS: | 64 case FAST_SMI_ELEMENTS: |
56 case FAST_ELEMENTS: | 65 case FAST_ELEMENTS: |
57 case FAST_HOLEY_SMI_ELEMENTS: | 66 case FAST_HOLEY_SMI_ELEMENTS: |
58 case FAST_HOLEY_ELEMENTS: | 67 case FAST_HOLEY_ELEMENTS: |
59 case DICTIONARY_ELEMENTS: | 68 case DICTIONARY_ELEMENTS: |
60 case NON_STRICT_ARGUMENTS_ELEMENTS: | 69 case NON_STRICT_ARGUMENTS_ELEMENTS: |
61 return kPointerSizeLog2; | 70 return kPointerSizeLog2; |
62 } | 71 } |
63 UNREACHABLE(); | 72 UNREACHABLE(); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 return to_kind == FAST_HOLEY_ELEMENTS; | 178 return to_kind == FAST_HOLEY_ELEMENTS; |
170 case FAST_HOLEY_ELEMENTS: | 179 case FAST_HOLEY_ELEMENTS: |
171 return false; | 180 return false; |
172 default: | 181 default: |
173 return false; | 182 return false; |
174 } | 183 } |
175 } | 184 } |
176 | 185 |
177 | 186 |
178 } } // namespace v8::internal | 187 } } // namespace v8::internal |
OLD | NEW |