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

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

Issue 9195031: Add ByteArray interface and provide internal and external implementations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address remaining review comments Created 8 years, 11 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_store.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 (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 17 matching lines...) Expand all
28 kNullType, 28 kNullType,
29 kDynamicType, 29 kDynamicType,
30 kVoidType, 30 kVoidType,
31 kFunctionInterface, 31 kFunctionInterface,
32 kNumberInterface, 32 kNumberInterface,
33 kDoubleInterface, 33 kDoubleInterface,
34 kIntInterface, 34 kIntInterface,
35 kBoolInterface, 35 kBoolInterface,
36 kStringInterface, 36 kStringInterface,
37 kListInterface, 37 kListInterface,
38 kByteArrayInterface,
38 kObjectClass, 39 kObjectClass,
39 kSmiClass, 40 kSmiClass,
40 kMintClass, 41 kMintClass,
41 kBigintClass, 42 kBigintClass,
42 kDoubleClass, 43 kDoubleClass,
43 kOneByteStringClass, 44 kOneByteStringClass,
44 kTwoByteStringClass, 45 kTwoByteStringClass,
45 kFourByteStringClass, 46 kFourByteStringClass,
46 kExternalOneByteStringClass, 47 kExternalOneByteStringClass,
47 kExternalTwoByteStringClass, 48 kExternalTwoByteStringClass,
48 kExternalFourByteStringClass, 49 kExternalFourByteStringClass,
49 kBoolClass, 50 kBoolClass,
50 kArrayClass, 51 kArrayClass,
51 kImmutableArrayClass, 52 kImmutableArrayClass,
52 kByteBufferClass, 53 kInternalByteArrayClass,
54 kExternalByteArrayClass,
53 kStacktraceClass, 55 kStacktraceClass,
54 kJSRegExpClass, 56 kJSRegExpClass,
55 kMaxId, 57 kMaxId,
56 kInvalidIndex = -1, 58 kInvalidIndex = -1,
57 }; 59 };
58 60
59 ~ObjectStore(); 61 ~ObjectStore();
60 62
61 RawClass* object_class() const { return object_class_; } 63 RawClass* object_class() const { return object_class_; }
62 void set_object_class(const Class& value) { object_class_ = value.raw(); } 64 void set_object_class(const Class& value) { object_class_ = value.raw(); }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 void set_list_interface(const Type& value) { 176 void set_list_interface(const Type& value) {
175 list_interface_ = value.raw(); 177 list_interface_ = value.raw();
176 } 178 }
177 179
178 RawClass* array_class() const { return array_class_; } 180 RawClass* array_class() const { return array_class_; }
179 void set_array_class(const Class& value) { array_class_ = value.raw(); } 181 void set_array_class(const Class& value) { array_class_ = value.raw(); }
180 static intptr_t array_class_offset() { 182 static intptr_t array_class_offset() {
181 return OFFSET_OF(ObjectStore, array_class_); 183 return OFFSET_OF(ObjectStore, array_class_);
182 } 184 }
183 185
186 RawType* byte_array_interface() const { return byte_array_interface_; }
187 void set_byte_array_interface(const Type& value) {
188 byte_array_interface_ = value.raw();
189 }
190
184 RawClass* immutable_array_class() const { return immutable_array_class_; } 191 RawClass* immutable_array_class() const { return immutable_array_class_; }
185 void set_immutable_array_class(const Class& value) { 192 void set_immutable_array_class(const Class& value) {
186 immutable_array_class_ = value.raw(); 193 immutable_array_class_ = value.raw();
187 } 194 }
188 195
189 RawClass* byte_buffer_class() const { return byte_buffer_class_; } 196 RawClass* internal_byte_array_class() const {
190 void set_byte_buffer_class(const Class& value) { 197 return internal_byte_array_class_;
191 byte_buffer_class_ = value.raw(); 198 }
199 void set_internal_byte_array_class(const Class& value) {
200 internal_byte_array_class_ = value.raw();
201 }
202
203 RawClass* external_byte_array_class() const {
204 return external_byte_array_class_;
205 }
206 void set_external_byte_array_class(const Class& value) {
207 external_byte_array_class_ = value.raw();
192 } 208 }
193 209
194 RawClass* stacktrace_class() const { 210 RawClass* stacktrace_class() const {
195 return stacktrace_class_; 211 return stacktrace_class_;
196 } 212 }
197 void set_stacktrace_class(const Class& value) { 213 void set_stacktrace_class(const Class& value) {
198 stacktrace_class_ = value.raw(); 214 stacktrace_class_ = value.raw();
199 } 215 }
200 static intptr_t stacktrace_class_offset() { 216 static intptr_t stacktrace_class_offset() {
201 return OFFSET_OF(ObjectStore, stacktrace_class_); 217 return OFFSET_OF(ObjectStore, stacktrace_class_);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 RawClass* two_byte_string_class_; 338 RawClass* two_byte_string_class_;
323 RawClass* four_byte_string_class_; 339 RawClass* four_byte_string_class_;
324 RawClass* external_one_byte_string_class_; 340 RawClass* external_one_byte_string_class_;
325 RawClass* external_two_byte_string_class_; 341 RawClass* external_two_byte_string_class_;
326 RawClass* external_four_byte_string_class_; 342 RawClass* external_four_byte_string_class_;
327 RawType* bool_interface_; 343 RawType* bool_interface_;
328 RawClass* bool_class_; 344 RawClass* bool_class_;
329 RawType* list_interface_; 345 RawType* list_interface_;
330 RawClass* array_class_; 346 RawClass* array_class_;
331 RawClass* immutable_array_class_; 347 RawClass* immutable_array_class_;
332 RawClass* byte_buffer_class_; 348 RawType* byte_array_interface_;
349 RawClass* internal_byte_array_class_;
350 RawClass* external_byte_array_class_;
333 RawClass* stacktrace_class_; 351 RawClass* stacktrace_class_;
334 RawClass* jsregexp_class_; 352 RawClass* jsregexp_class_;
335 RawBool* true_value_; 353 RawBool* true_value_;
336 RawBool* false_value_; 354 RawBool* false_value_;
337 RawArray* empty_array_; 355 RawArray* empty_array_;
338 RawArray* symbol_table_; 356 RawArray* symbol_table_;
339 RawArray* canonical_type_arguments_; 357 RawArray* canonical_type_arguments_;
340 RawLibrary* core_library_; 358 RawLibrary* core_library_;
341 RawLibrary* core_impl_library_; 359 RawLibrary* core_impl_library_;
342 RawLibrary* native_wrappers_library_; 360 RawLibrary* native_wrappers_library_;
343 RawLibrary* root_library_; 361 RawLibrary* root_library_;
344 RawLibrary* registered_libraries_; 362 RawLibrary* registered_libraries_;
345 RawArray* pending_classes_; 363 RawArray* pending_classes_;
346 RawError* sticky_error_; 364 RawError* sticky_error_;
347 RawContext* empty_context_; 365 RawContext* empty_context_;
348 RawInstance* stack_overflow_; 366 RawInstance* stack_overflow_;
349 RawInstance* out_of_memory_; 367 RawInstance* out_of_memory_;
350 RawObject** to() { return reinterpret_cast<RawObject**>(&out_of_memory_); } 368 RawObject** to() { return reinterpret_cast<RawObject**>(&out_of_memory_); }
351 369
352 bool preallocate_objects_called_; 370 bool preallocate_objects_called_;
353 371
354 friend class SnapshotReader; 372 friend class SnapshotReader;
355 373
356 DISALLOW_COPY_AND_ASSIGN(ObjectStore); 374 DISALLOW_COPY_AND_ASSIGN(ObjectStore);
357 }; 375 };
358 376
359 } // namespace dart 377 } // namespace dart
360 378
361 #endif // VM_OBJECT_STORE_H_ 379 #endif // VM_OBJECT_STORE_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698