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

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

Issue 11238016: Consolidated all the key store/load classes in the Hydrogen and Lithium (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Last batch of comment response, formatting issues. Created 8 years, 1 month 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/arm/lithium-codegen-arm.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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 LAST_FAST_ELEMENTS_KIND = FAST_HOLEY_DOUBLE_ELEMENTS, 70 LAST_FAST_ELEMENTS_KIND = FAST_HOLEY_DOUBLE_ELEMENTS,
71 FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_BYTE_ELEMENTS, 71 FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_BYTE_ELEMENTS,
72 LAST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_PIXEL_ELEMENTS, 72 LAST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_PIXEL_ELEMENTS,
73 TERMINAL_FAST_ELEMENTS_KIND = FAST_HOLEY_ELEMENTS 73 TERMINAL_FAST_ELEMENTS_KIND = FAST_HOLEY_ELEMENTS
74 }; 74 };
75 75
76 const int kElementsKindCount = LAST_ELEMENTS_KIND - FIRST_ELEMENTS_KIND + 1; 76 const int kElementsKindCount = LAST_ELEMENTS_KIND - FIRST_ELEMENTS_KIND + 1;
77 const int kFastElementsKindCount = LAST_FAST_ELEMENTS_KIND - 77 const int kFastElementsKindCount = LAST_FAST_ELEMENTS_KIND -
78 FIRST_FAST_ELEMENTS_KIND + 1; 78 FIRST_FAST_ELEMENTS_KIND + 1;
79 79
80 const char* ElementsKindToString(ElementsKind kind);
80 void PrintElementsKind(FILE* out, ElementsKind kind); 81 void PrintElementsKind(FILE* out, ElementsKind kind);
81 82
82 ElementsKind GetInitialFastElementsKind(); 83 ElementsKind GetInitialFastElementsKind();
83 84
84 ElementsKind GetFastElementsKindFromSequenceIndex(int sequence_index); 85 ElementsKind GetFastElementsKindFromSequenceIndex(int sequence_index);
85 86
86 int GetSequenceIndexFromFastElementsKind(ElementsKind elements_kind); 87 int GetSequenceIndexFromFastElementsKind(ElementsKind elements_kind);
87 88
88 89
89 inline bool IsDictionaryElementsKind(ElementsKind kind) { 90 inline bool IsDictionaryElementsKind(ElementsKind kind) {
(...skipping 12 matching lines...) Expand all
102 return kind <= FAST_HOLEY_DOUBLE_ELEMENTS; 103 return kind <= FAST_HOLEY_DOUBLE_ELEMENTS;
103 } 104 }
104 105
105 106
106 inline bool IsFastDoubleElementsKind(ElementsKind kind) { 107 inline bool IsFastDoubleElementsKind(ElementsKind kind) {
107 return kind == FAST_DOUBLE_ELEMENTS || 108 return kind == FAST_DOUBLE_ELEMENTS ||
108 kind == FAST_HOLEY_DOUBLE_ELEMENTS; 109 kind == FAST_HOLEY_DOUBLE_ELEMENTS;
109 } 110 }
110 111
111 112
113 inline bool IsDoubleOrFloatElementsKind(ElementsKind kind) {
114 return IsFastDoubleElementsKind(kind) ||
115 kind == EXTERNAL_DOUBLE_ELEMENTS ||
116 kind == EXTERNAL_FLOAT_ELEMENTS;
117 }
118
119
112 inline bool IsFastSmiOrObjectElementsKind(ElementsKind kind) { 120 inline bool IsFastSmiOrObjectElementsKind(ElementsKind kind) {
113 return kind == FAST_SMI_ELEMENTS || 121 return kind == FAST_SMI_ELEMENTS ||
114 kind == FAST_HOLEY_SMI_ELEMENTS || 122 kind == FAST_HOLEY_SMI_ELEMENTS ||
115 kind == FAST_ELEMENTS || 123 kind == FAST_ELEMENTS ||
116 kind == FAST_HOLEY_ELEMENTS; 124 kind == FAST_HOLEY_ELEMENTS;
117 } 125 }
118 126
119 127
120 inline bool IsFastSmiElementsKind(ElementsKind kind) { 128 inline bool IsFastSmiElementsKind(ElementsKind kind) {
121 return kind == FAST_SMI_ELEMENTS || 129 return kind == FAST_SMI_ELEMENTS ||
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 bool allow_only_packed) { 220 bool allow_only_packed) {
213 return IsFastElementsKind(elements_kind) && 221 return IsFastElementsKind(elements_kind) &&
214 (elements_kind != TERMINAL_FAST_ELEMENTS_KIND && 222 (elements_kind != TERMINAL_FAST_ELEMENTS_KIND &&
215 (!allow_only_packed || elements_kind != FAST_ELEMENTS)); 223 (!allow_only_packed || elements_kind != FAST_ELEMENTS));
216 } 224 }
217 225
218 226
219 } } // namespace v8::internal 227 } } // namespace v8::internal
220 228
221 #endif // V8_ELEMENTS_KIND_H_ 229 #endif // V8_ELEMENTS_KIND_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/elements-kind.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698