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

Side by Side Diff: vm/object_store.h

Issue 9594028: Add a first class GrowableObjectArray type in the VM and use it internally in the VM at all spots w… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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 #ifndef VM_OBJECT_STORE_H_ 5 #ifndef VM_OBJECT_STORE_H_
6 #define VM_OBJECT_STORE_H_ 6 #define VM_OBJECT_STORE_H_
7 7
8 #include "vm/object.h" 8 #include "vm/object.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 kDoubleClass, 43 kDoubleClass,
44 kOneByteStringClass, 44 kOneByteStringClass,
45 kTwoByteStringClass, 45 kTwoByteStringClass,
46 kFourByteStringClass, 46 kFourByteStringClass,
47 kExternalOneByteStringClass, 47 kExternalOneByteStringClass,
48 kExternalTwoByteStringClass, 48 kExternalTwoByteStringClass,
49 kExternalFourByteStringClass, 49 kExternalFourByteStringClass,
50 kBoolClass, 50 kBoolClass,
51 kArrayClass, 51 kArrayClass,
52 kImmutableArrayClass, 52 kImmutableArrayClass,
53 kGrowableObjectArrayClass,
53 kInternalByteArrayClass, 54 kInternalByteArrayClass,
54 kExternalByteArrayClass, 55 kExternalByteArrayClass,
55 kStacktraceClass, 56 kStacktraceClass,
56 kJSRegExpClass, 57 kJSRegExpClass,
57 kMaxId, 58 kMaxId,
58 kInvalidIndex = -1, 59 kInvalidIndex = -1,
59 }; 60 };
60 61
61 ~ObjectStore(); 62 ~ObjectStore();
62 63
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 RawType* byte_array_interface() const { return byte_array_interface_; } 187 RawType* byte_array_interface() const { return byte_array_interface_; }
187 void set_byte_array_interface(const Type& value) { 188 void set_byte_array_interface(const Type& value) {
188 byte_array_interface_ = value.raw(); 189 byte_array_interface_ = value.raw();
189 } 190 }
190 191
191 RawClass* immutable_array_class() const { return immutable_array_class_; } 192 RawClass* immutable_array_class() const { return immutable_array_class_; }
192 void set_immutable_array_class(const Class& value) { 193 void set_immutable_array_class(const Class& value) {
193 immutable_array_class_ = value.raw(); 194 immutable_array_class_ = value.raw();
194 } 195 }
195 196
197 RawClass* growable_object_array_class() const {
198 return growable_object_array_class_;
199 }
200 void set_growable_object_array_class(const Class& value) {
201 growable_object_array_class_ = value.raw();
202 }
203 static intptr_t growable_object_array_class_offset() {
204 return OFFSET_OF(ObjectStore, growable_object_array_class_);
205 }
206
196 RawClass* internal_byte_array_class() const { 207 RawClass* internal_byte_array_class() const {
197 return internal_byte_array_class_; 208 return internal_byte_array_class_;
198 } 209 }
199 void set_internal_byte_array_class(const Class& value) { 210 void set_internal_byte_array_class(const Class& value) {
200 internal_byte_array_class_ = value.raw(); 211 internal_byte_array_class_ = value.raw();
201 } 212 }
202 213
203 RawClass* external_byte_array_class() const { 214 RawClass* external_byte_array_class() const {
204 return external_byte_array_class_; 215 return external_byte_array_class_;
205 } 216 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 void set_root_library(const Library& value) { 277 void set_root_library(const Library& value) {
267 root_library_ = value.raw(); 278 root_library_ = value.raw();
268 } 279 }
269 280
270 // Returns head of list of registered libraries. 281 // Returns head of list of registered libraries.
271 RawLibrary* registered_libraries() const { return registered_libraries_; } 282 RawLibrary* registered_libraries() const { return registered_libraries_; }
272 void set_registered_libraries(const Library& value) { 283 void set_registered_libraries(const Library& value) {
273 registered_libraries_ = value.raw(); 284 registered_libraries_ = value.raw();
274 } 285 }
275 286
276 RawArray* pending_classes() const { return pending_classes_; } 287 RawGrowableObjectArray* pending_classes() const { return pending_classes_; }
277 void set_pending_classes(const Array& value) { 288 void set_pending_classes(const GrowableObjectArray& value) {
278 ASSERT(!value.IsNull()); 289 ASSERT(!value.IsNull());
279 pending_classes_ = value.raw(); 290 pending_classes_ = value.raw();
280 } 291 }
281 292
282 RawError* sticky_error() const { return sticky_error_; } 293 RawError* sticky_error() const { return sticky_error_; }
283 void set_sticky_error(const Error& value) { 294 void set_sticky_error(const Error& value) {
284 ASSERT(!value.IsNull()); 295 ASSERT(!value.IsNull());
285 sticky_error_ = value.raw(); 296 sticky_error_ = value.raw();
286 } 297 }
287 void clear_sticky_error() { sticky_error_ = Error::null(); } 298 void clear_sticky_error() { sticky_error_ = Error::null(); }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 RawClass* two_byte_string_class_; 364 RawClass* two_byte_string_class_;
354 RawClass* four_byte_string_class_; 365 RawClass* four_byte_string_class_;
355 RawClass* external_one_byte_string_class_; 366 RawClass* external_one_byte_string_class_;
356 RawClass* external_two_byte_string_class_; 367 RawClass* external_two_byte_string_class_;
357 RawClass* external_four_byte_string_class_; 368 RawClass* external_four_byte_string_class_;
358 RawType* bool_interface_; 369 RawType* bool_interface_;
359 RawClass* bool_class_; 370 RawClass* bool_class_;
360 RawType* list_interface_; 371 RawType* list_interface_;
361 RawClass* array_class_; 372 RawClass* array_class_;
362 RawClass* immutable_array_class_; 373 RawClass* immutable_array_class_;
374 RawClass* growable_object_array_class_;
363 RawType* byte_array_interface_; 375 RawType* byte_array_interface_;
364 RawClass* internal_byte_array_class_; 376 RawClass* internal_byte_array_class_;
365 RawClass* external_byte_array_class_; 377 RawClass* external_byte_array_class_;
366 RawClass* stacktrace_class_; 378 RawClass* stacktrace_class_;
367 RawClass* jsregexp_class_; 379 RawClass* jsregexp_class_;
368 RawBool* true_value_; 380 RawBool* true_value_;
369 RawBool* false_value_; 381 RawBool* false_value_;
370 RawArray* empty_array_; 382 RawArray* empty_array_;
371 RawArray* symbol_table_; 383 RawArray* symbol_table_;
372 RawArray* canonical_type_arguments_; 384 RawArray* canonical_type_arguments_;
373 RawLibrary* core_library_; 385 RawLibrary* core_library_;
374 RawLibrary* core_impl_library_; 386 RawLibrary* core_impl_library_;
375 RawLibrary* isolate_library_; 387 RawLibrary* isolate_library_;
376 RawLibrary* native_wrappers_library_; 388 RawLibrary* native_wrappers_library_;
377 RawLibrary* root_library_; 389 RawLibrary* root_library_;
378 RawLibrary* registered_libraries_; 390 RawLibrary* registered_libraries_;
379 RawArray* pending_classes_; 391 RawGrowableObjectArray* pending_classes_;
380 RawError* sticky_error_; 392 RawError* sticky_error_;
381 RawContext* empty_context_; 393 RawContext* empty_context_;
382 RawInstance* stack_overflow_; 394 RawInstance* stack_overflow_;
383 RawInstance* out_of_memory_; 395 RawInstance* out_of_memory_;
384 RawArray* keyword_symbols_; 396 RawArray* keyword_symbols_;
385 RawObject** to() { return reinterpret_cast<RawObject**>(&keyword_symbols_); } 397 RawObject** to() { return reinterpret_cast<RawObject**>(&keyword_symbols_); }
386 398
387 friend class SnapshotReader; 399 friend class SnapshotReader;
388 400
389 DISALLOW_COPY_AND_ASSIGN(ObjectStore); 401 DISALLOW_COPY_AND_ASSIGN(ObjectStore);
390 }; 402 };
391 403
392 } // namespace dart 404 } // namespace dart
393 405
394 #endif // VM_OBJECT_STORE_H_ 406 #endif // VM_OBJECT_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698