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

Side by Side Diff: runtime/vm/object_store.cc

Issue 10379018: Revert "Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 months 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object_store.h" 5 #include "vm/object_store.h"
6 6
7 #include "vm/exceptions.h" 7 #include "vm/exceptions.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/raw_object.h" 10 #include "vm/raw_object.h"
(...skipping 18 matching lines...) Expand all
29 external_one_byte_string_class_(Class::null()), 29 external_one_byte_string_class_(Class::null()),
30 external_two_byte_string_class_(Class::null()), 30 external_two_byte_string_class_(Class::null()),
31 external_four_byte_string_class_(Class::null()), 31 external_four_byte_string_class_(Class::null()),
32 bool_interface_(Type::null()), 32 bool_interface_(Type::null()),
33 bool_class_(Class::null()), 33 bool_class_(Class::null()),
34 list_interface_(Type::null()), 34 list_interface_(Type::null()),
35 array_class_(Class::null()), 35 array_class_(Class::null()),
36 immutable_array_class_(Class::null()), 36 immutable_array_class_(Class::null()),
37 growable_object_array_class_(Class::null()), 37 growable_object_array_class_(Class::null()),
38 byte_array_interface_(Type::null()), 38 byte_array_interface_(Type::null()),
39 internal_byte_array_class_(Class::null()), 39 int8_array_class_(Class::null()),
40 external_byte_array_class_(Class::null()), 40 uint8_array_class_(Class::null()),
41 int16_array_class_(Class::null()),
42 uint16_array_class_(Class::null()),
43 int32_array_class_(Class::null()),
44 uint32_array_class_(Class::null()),
45 int64_array_class_(Class::null()),
46 uint64_array_class_(Class::null()),
47 float32_array_class_(Class::null()),
48 float64_array_class_(Class::null()),
49 external_int8_array_class_(Class::null()),
50 external_uint8_array_class_(Class::null()),
51 external_int16_array_class_(Class::null()),
52 external_uint16_array_class_(Class::null()),
53 external_int32_array_class_(Class::null()),
54 external_uint32_array_class_(Class::null()),
55 external_int64_array_class_(Class::null()),
56 external_uint64_array_class_(Class::null()),
57 external_float32_array_class_(Class::null()),
58 external_float64_array_class_(Class::null()),
41 stacktrace_class_(Class::null()), 59 stacktrace_class_(Class::null()),
42 jsregexp_class_(Class::null()), 60 jsregexp_class_(Class::null()),
43 true_value_(Bool::null()), 61 true_value_(Bool::null()),
44 false_value_(Bool::null()), 62 false_value_(Bool::null()),
45 empty_array_(Array::null()), 63 empty_array_(Array::null()),
46 symbol_table_(Array::null()), 64 symbol_table_(Array::null()),
47 canonical_type_arguments_(Array::null()), 65 canonical_type_arguments_(Array::null()),
48 core_library_(Library::null()), 66 core_library_(Library::null()),
49 core_impl_library_(Library::null()), 67 core_impl_library_(Library::null()),
50 isolate_library_(Library::null()), 68 isolate_library_(Library::null()),
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 case kOneByteStringClass: return one_byte_string_class_; 147 case kOneByteStringClass: return one_byte_string_class_;
130 case kTwoByteStringClass: return two_byte_string_class_; 148 case kTwoByteStringClass: return two_byte_string_class_;
131 case kFourByteStringClass: return four_byte_string_class_; 149 case kFourByteStringClass: return four_byte_string_class_;
132 case kExternalOneByteStringClass: return external_one_byte_string_class_; 150 case kExternalOneByteStringClass: return external_one_byte_string_class_;
133 case kExternalTwoByteStringClass: return external_two_byte_string_class_; 151 case kExternalTwoByteStringClass: return external_two_byte_string_class_;
134 case kExternalFourByteStringClass: return external_four_byte_string_class_; 152 case kExternalFourByteStringClass: return external_four_byte_string_class_;
135 case kBoolClass: return bool_class_; 153 case kBoolClass: return bool_class_;
136 case kArrayClass: return array_class_; 154 case kArrayClass: return array_class_;
137 case kImmutableArrayClass: return immutable_array_class_; 155 case kImmutableArrayClass: return immutable_array_class_;
138 case kGrowableObjectArrayClass: return growable_object_array_class_; 156 case kGrowableObjectArrayClass: return growable_object_array_class_;
139 case kInternalByteArrayClass: return internal_byte_array_class_; 157 case kInt8ArrayClass: return int8_array_class_;
140 case kExternalByteArrayClass: return external_byte_array_class_; 158 case kUint8ArrayClass: return uint8_array_class_;
159 case kInt16ArrayClass: return int16_array_class_;
160 case kUint16ArrayClass: return uint16_array_class_;
161 case kInt32ArrayClass: return int32_array_class_;
162 case kUint32ArrayClass: return uint32_array_class_;
163 case kInt64ArrayClass: return int64_array_class_;
164 case kUint64ArrayClass: return uint64_array_class_;
165 case kFloat32ArrayClass: return float32_array_class_;
166 case kFloat64ArrayClass: return float64_array_class_;
167 case kExternalInt8ArrayClass: return external_int8_array_class_;
168 case kExternalUint8ArrayClass: return external_uint8_array_class_;
169 case kExternalInt16ArrayClass: return external_int16_array_class_;
170 case kExternalUint16ArrayClass: return external_uint16_array_class_;
171 case kExternalInt32ArrayClass: return external_int32_array_class_;
172 case kExternalUint32ArrayClass: return external_uint32_array_class_;
173 case kExternalInt64ArrayClass: return external_int64_array_class_;
174 case kExternalUint64ArrayClass: return external_uint64_array_class_;
175 case kExternalFloat32ArrayClass: return external_float32_array_class_;
176 case kExternalFloat64ArrayClass: return external_float64_array_class_;
141 case kStacktraceClass: return stacktrace_class_; 177 case kStacktraceClass: return stacktrace_class_;
142 case kJSRegExpClass: return jsregexp_class_; 178 case kJSRegExpClass: return jsregexp_class_;
143 default: break; 179 default: break;
144 } 180 }
145 UNREACHABLE(); 181 UNREACHABLE();
146 return Class::null(); 182 return Class::null();
147 } 183 }
148 184
149 185
150 int ObjectStore::GetClassIndex(const RawClass* raw_class) { 186 int ObjectStore::GetClassIndex(const RawClass* raw_class) {
(...skipping 21 matching lines...) Expand all
172 } else if (raw_class == external_four_byte_string_class_) { 208 } else if (raw_class == external_four_byte_string_class_) {
173 return kExternalFourByteStringClass; 209 return kExternalFourByteStringClass;
174 } else if (raw_class == bool_class_) { 210 } else if (raw_class == bool_class_) {
175 return kBoolClass; 211 return kBoolClass;
176 } else if (raw_class == array_class_) { 212 } else if (raw_class == array_class_) {
177 return kArrayClass; 213 return kArrayClass;
178 } else if (raw_class == immutable_array_class_) { 214 } else if (raw_class == immutable_array_class_) {
179 return kImmutableArrayClass; 215 return kImmutableArrayClass;
180 } else if (raw_class == growable_object_array_class_) { 216 } else if (raw_class == growable_object_array_class_) {
181 return kGrowableObjectArrayClass; 217 return kGrowableObjectArrayClass;
182 } else if (raw_class == internal_byte_array_class_) { 218 } else if (raw_class == int8_array_class_) {
183 return kInternalByteArrayClass; 219 return kInt8ArrayClass;
184 } else if (raw_class == external_byte_array_class_) { 220 } else if (raw_class == uint8_array_class_) {
185 return kExternalByteArrayClass; 221 return kUint8ArrayClass;
222 } else if (raw_class == int16_array_class_) {
223 return kInt16ArrayClass;
224 } else if (raw_class == uint16_array_class_) {
225 return kUint16ArrayClass;
226 } else if (raw_class == int32_array_class_) {
227 return kInt32ArrayClass;
228 } else if (raw_class == uint32_array_class_) {
229 return kUint32ArrayClass;
230 } else if (raw_class == int64_array_class_) {
231 return kInt64ArrayClass;
232 } else if (raw_class == uint64_array_class_) {
233 return kUint64ArrayClass;
234 } else if (raw_class == float32_array_class_) {
235 return kFloat32ArrayClass;
236 } else if (raw_class == float64_array_class_) {
237 return kFloat64ArrayClass;
238 } else if (raw_class == external_int8_array_class_) {
239 return kExternalInt8ArrayClass;
240 } else if (raw_class == external_uint8_array_class_) {
241 return kExternalUint8ArrayClass;
242 } else if (raw_class == external_int16_array_class_) {
243 return kExternalInt16ArrayClass;
244 } else if (raw_class == external_uint16_array_class_) {
245 return kExternalUint16ArrayClass;
246 } else if (raw_class == external_int32_array_class_) {
247 return kExternalInt32ArrayClass;
248 } else if (raw_class == external_uint32_array_class_) {
249 return kExternalUint32ArrayClass;
250 } else if (raw_class == external_int64_array_class_) {
251 return kExternalInt64ArrayClass;
252 } else if (raw_class == external_uint64_array_class_) {
253 return kExternalUint64ArrayClass;
254 } else if (raw_class == external_float32_array_class_) {
255 return kExternalFloat32ArrayClass;
256 } else if (raw_class == external_float64_array_class_) {
257 return kExternalFloat64ArrayClass;
186 } else if (raw_class == stacktrace_class_) { 258 } else if (raw_class == stacktrace_class_) {
187 return kStacktraceClass; 259 return kStacktraceClass;
188 } else if (raw_class == jsregexp_class_) { 260 } else if (raw_class == jsregexp_class_) {
189 return kJSRegExpClass; 261 return kJSRegExpClass;
190 } 262 }
191 return kInvalidIndex; 263 return kInvalidIndex;
192 } 264 }
193 265
194 266
195 RawType* ObjectStore::GetType(int index) { 267 RawType* ObjectStore::GetType(int index) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 return kStringInterface; 309 return kStringInterface;
238 } else if (raw_type == list_interface()) { 310 } else if (raw_type == list_interface()) {
239 return kListInterface; 311 return kListInterface;
240 } else if (raw_type == byte_array_interface()) { 312 } else if (raw_type == byte_array_interface()) {
241 return kByteArrayInterface; 313 return kByteArrayInterface;
242 } 314 }
243 return kInvalidIndex; 315 return kInvalidIndex;
244 } 316 }
245 317
246 } // namespace dart 318 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698