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

Side by Side Diff: src/elements-kind.h

Issue 90643003: Experimental implementation: Exposing SIMD instructions into JavaScript Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/elements.cc ('k') | src/elements-kind.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 // 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 DICTIONARY_ELEMENTS, 53 DICTIONARY_ELEMENTS,
54 NON_STRICT_ARGUMENTS_ELEMENTS, 54 NON_STRICT_ARGUMENTS_ELEMENTS,
55 // The "fast" kind for external arrays 55 // The "fast" kind for external arrays
56 EXTERNAL_BYTE_ELEMENTS, 56 EXTERNAL_BYTE_ELEMENTS,
57 EXTERNAL_UNSIGNED_BYTE_ELEMENTS, 57 EXTERNAL_UNSIGNED_BYTE_ELEMENTS,
58 EXTERNAL_SHORT_ELEMENTS, 58 EXTERNAL_SHORT_ELEMENTS,
59 EXTERNAL_UNSIGNED_SHORT_ELEMENTS, 59 EXTERNAL_UNSIGNED_SHORT_ELEMENTS,
60 EXTERNAL_INT_ELEMENTS, 60 EXTERNAL_INT_ELEMENTS,
61 EXTERNAL_UNSIGNED_INT_ELEMENTS, 61 EXTERNAL_UNSIGNED_INT_ELEMENTS,
62 EXTERNAL_FLOAT_ELEMENTS, 62 EXTERNAL_FLOAT_ELEMENTS,
63 EXTERNAL_FLOAT32x4_ELEMENTS,
64 EXTERNAL_INT32x4_ELEMENTS,
63 EXTERNAL_DOUBLE_ELEMENTS, 65 EXTERNAL_DOUBLE_ELEMENTS,
64 EXTERNAL_PIXEL_ELEMENTS, 66 EXTERNAL_PIXEL_ELEMENTS,
65 67
66 // Derived constants from ElementsKind 68 // Derived constants from ElementsKind
67 FIRST_ELEMENTS_KIND = FAST_SMI_ELEMENTS, 69 FIRST_ELEMENTS_KIND = FAST_SMI_ELEMENTS,
68 LAST_ELEMENTS_KIND = EXTERNAL_PIXEL_ELEMENTS, 70 LAST_ELEMENTS_KIND = EXTERNAL_PIXEL_ELEMENTS,
69 FIRST_FAST_ELEMENTS_KIND = FAST_SMI_ELEMENTS, 71 FIRST_FAST_ELEMENTS_KIND = FAST_SMI_ELEMENTS,
70 LAST_FAST_ELEMENTS_KIND = FAST_HOLEY_DOUBLE_ELEMENTS, 72 LAST_FAST_ELEMENTS_KIND = FAST_HOLEY_DOUBLE_ELEMENTS,
71 FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_BYTE_ELEMENTS, 73 FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_BYTE_ELEMENTS,
72 LAST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_PIXEL_ELEMENTS, 74 LAST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_PIXEL_ELEMENTS,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 kind == FAST_HOLEY_DOUBLE_ELEMENTS; 116 kind == FAST_HOLEY_DOUBLE_ELEMENTS;
115 } 117 }
116 118
117 119
118 inline bool IsExternalFloatOrDoubleElementsKind(ElementsKind kind) { 120 inline bool IsExternalFloatOrDoubleElementsKind(ElementsKind kind) {
119 return kind == EXTERNAL_DOUBLE_ELEMENTS || 121 return kind == EXTERNAL_DOUBLE_ELEMENTS ||
120 kind == EXTERNAL_FLOAT_ELEMENTS; 122 kind == EXTERNAL_FLOAT_ELEMENTS;
121 } 123 }
122 124
123 125
126 inline bool IsExternalFloat32x4ElementsKind(ElementsKind kind) {
127 return kind == EXTERNAL_FLOAT32x4_ELEMENTS;
128 }
129
130
131 inline bool IsExternalInt32x4ElementsKind(ElementsKind kind) {
132 return kind == EXTERNAL_INT32x4_ELEMENTS;
133 }
134
135
124 inline bool IsDoubleOrFloatElementsKind(ElementsKind kind) { 136 inline bool IsDoubleOrFloatElementsKind(ElementsKind kind) {
125 return IsFastDoubleElementsKind(kind) || 137 return IsFastDoubleElementsKind(kind) ||
126 IsExternalFloatOrDoubleElementsKind(kind); 138 IsExternalFloatOrDoubleElementsKind(kind);
127 } 139 }
128 140
129 141
130 inline bool IsFastSmiOrObjectElementsKind(ElementsKind kind) { 142 inline bool IsFastSmiOrObjectElementsKind(ElementsKind kind) {
131 return kind == FAST_SMI_ELEMENTS || 143 return kind == FAST_SMI_ELEMENTS ||
132 kind == FAST_HOLEY_SMI_ELEMENTS || 144 kind == FAST_HOLEY_SMI_ELEMENTS ||
133 kind == FAST_ELEMENTS || 145 kind == FAST_ELEMENTS ||
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 bool allow_only_packed) { 242 bool allow_only_packed) {
231 return IsFastElementsKind(elements_kind) && 243 return IsFastElementsKind(elements_kind) &&
232 (elements_kind != TERMINAL_FAST_ELEMENTS_KIND && 244 (elements_kind != TERMINAL_FAST_ELEMENTS_KIND &&
233 (!allow_only_packed || elements_kind != FAST_ELEMENTS)); 245 (!allow_only_packed || elements_kind != FAST_ELEMENTS));
234 } 246 }
235 247
236 248
237 } } // namespace v8::internal 249 } } // namespace v8::internal
238 250
239 #endif // V8_ELEMENTS_KIND_H_ 251 #endif // V8_ELEMENTS_KIND_H_
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/elements-kind.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698