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

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

Issue 1116263004: Add 'dart:debugger' library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 {
11 11
12 // Forward declarations. 12 // Forward declarations.
13 class Isolate; 13 class Isolate;
14 class ObjectPointerVisitor; 14 class ObjectPointerVisitor;
15 15
16 // The object store is a per isolate instance which stores references to 16 // The object store is a per isolate instance which stores references to
17 // objects used by the VM. 17 // objects used by the VM.
18 // TODO(iposva): Move the actual store into the object heap for quick handling 18 // TODO(iposva): Move the actual store into the object heap for quick handling
19 // by snapshots eventually. 19 // by snapshots eventually.
20 class ObjectStore { 20 class ObjectStore {
21 public: 21 public:
22 enum BootstrapLibraryId { 22 enum BootstrapLibraryId {
23 kNone = 0, 23 kNone = 0,
24 kAsync, 24 kAsync,
25 kCore, 25 kCore,
26 kCollection, 26 kCollection,
27 kConvert, 27 kConvert,
28 kDebugger,
28 kInternal, 29 kInternal,
29 kIsolate, 30 kIsolate,
30 kMath, 31 kMath,
31 kMirrors, 32 kMirrors,
33 kProfiler,
32 kTypedData, 34 kTypedData,
33 kProfiler,
34 }; 35 };
35 36
36 ~ObjectStore(); 37 ~ObjectStore();
37 38
38 RawClass* object_class() const { 39 RawClass* object_class() const {
39 ASSERT(object_class_ != Object::null()); 40 ASSERT(object_class_ != Object::null());
40 return object_class_; 41 return object_class_;
41 } 42 }
42 void set_object_class(const Class& value) { object_class_ = value.raw(); } 43 void set_object_class(const Class& value) { object_class_ = value.raw(); }
43 static intptr_t object_class_offset() { 44 static intptr_t object_class_offset() {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } 251 }
251 void set_canonical_type_arguments(const Array& value) { 252 void set_canonical_type_arguments(const Array& value) {
252 canonical_type_arguments_ = value.raw(); 253 canonical_type_arguments_ = value.raw();
253 } 254 }
254 255
255 RawLibrary* async_library() const { return async_library_; } 256 RawLibrary* async_library() const { return async_library_; }
256 RawLibrary* builtin_library() const { return builtin_library_; } 257 RawLibrary* builtin_library() const { return builtin_library_; }
257 RawLibrary* core_library() const { return core_library_; } 258 RawLibrary* core_library() const { return core_library_; }
258 RawLibrary* collection_library() const { return collection_library_; } 259 RawLibrary* collection_library() const { return collection_library_; }
259 RawLibrary* convert_library() const { return convert_library_; } 260 RawLibrary* convert_library() const { return convert_library_; }
261 RawLibrary* debugger_library() const { return debugger_library_; }
260 RawLibrary* internal_library() const { return internal_library_; } 262 RawLibrary* internal_library() const { return internal_library_; }
261 RawLibrary* isolate_library() const { return isolate_library_; } 263 RawLibrary* isolate_library() const { return isolate_library_; }
262 RawLibrary* math_library() const { return math_library_; } 264 RawLibrary* math_library() const { return math_library_; }
263 RawLibrary* mirrors_library() const { return mirrors_library_; } 265 RawLibrary* mirrors_library() const { return mirrors_library_; }
266 RawLibrary* profiler_library() const { return profiler_library_; }
264 RawLibrary* typed_data_library() const { return typed_data_library_; } 267 RawLibrary* typed_data_library() const { return typed_data_library_; }
265 RawLibrary* profiler_library() const { return profiler_library_; } 268
266 void set_bootstrap_library(BootstrapLibraryId index, const Library& value) { 269 void set_bootstrap_library(BootstrapLibraryId index, const Library& value) {
267 switch (index) { 270 switch (index) {
268 case kAsync: 271 case kAsync:
269 async_library_ = value.raw(); 272 async_library_ = value.raw();
270 break; 273 break;
271 case kCore: 274 case kCore:
272 core_library_ = value.raw(); 275 core_library_ = value.raw();
273 break; 276 break;
274 case kCollection: 277 case kCollection:
275 collection_library_ = value.raw(); 278 collection_library_ = value.raw();
276 break; 279 break;
277 case kConvert: 280 case kConvert:
278 convert_library_ = value.raw(); 281 convert_library_ = value.raw();
279 break; 282 break;
283 case kDebugger:
284 debugger_library_ = value.raw();
285 break;
280 case kInternal: 286 case kInternal:
281 internal_library_ = value.raw(); 287 internal_library_ = value.raw();
282 break; 288 break;
283 case kIsolate: 289 case kIsolate:
284 isolate_library_ = value.raw(); 290 isolate_library_ = value.raw();
285 break; 291 break;
286 case kMath: 292 case kMath:
287 math_library_ = value.raw(); 293 math_library_ = value.raw();
288 break; 294 break;
289 case kMirrors: 295 case kMirrors:
290 mirrors_library_ = value.raw(); 296 mirrors_library_ = value.raw();
291 break; 297 break;
298 case kProfiler:
299 profiler_library_ = value.raw();
300 break;
292 case kTypedData: 301 case kTypedData:
293 typed_data_library_ = value.raw(); 302 typed_data_library_ = value.raw();
294 break; 303 break;
295 case kProfiler:
296 profiler_library_ = value.raw();
297 break;
298 default: 304 default:
299 UNREACHABLE(); 305 UNREACHABLE();
300 } 306 }
301 } 307 }
302 308
303 void set_builtin_library(const Library& value) { 309 void set_builtin_library(const Library& value) {
304 builtin_library_ = value.raw(); 310 builtin_library_ = value.raw();
305 } 311 }
306 312
307 RawLibrary* native_wrappers_library() const { 313 RawLibrary* native_wrappers_library() const {
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 RawClass* float64x2_class_; 482 RawClass* float64x2_class_;
477 RawClass* error_class_; 483 RawClass* error_class_;
478 RawClass* weak_property_class_; 484 RawClass* weak_property_class_;
479 RawArray* symbol_table_; 485 RawArray* symbol_table_;
480 RawArray* canonical_type_arguments_; 486 RawArray* canonical_type_arguments_;
481 RawLibrary* async_library_; 487 RawLibrary* async_library_;
482 RawLibrary* builtin_library_; 488 RawLibrary* builtin_library_;
483 RawLibrary* core_library_; 489 RawLibrary* core_library_;
484 RawLibrary* collection_library_; 490 RawLibrary* collection_library_;
485 RawLibrary* convert_library_; 491 RawLibrary* convert_library_;
492 RawLibrary* debugger_library_;
486 RawLibrary* internal_library_; 493 RawLibrary* internal_library_;
487 RawLibrary* isolate_library_; 494 RawLibrary* isolate_library_;
488 RawLibrary* math_library_; 495 RawLibrary* math_library_;
489 RawLibrary* mirrors_library_; 496 RawLibrary* mirrors_library_;
490 RawLibrary* native_wrappers_library_; 497 RawLibrary* native_wrappers_library_;
498 RawLibrary* profiler_library_;
491 RawLibrary* root_library_; 499 RawLibrary* root_library_;
492 RawLibrary* typed_data_library_; 500 RawLibrary* typed_data_library_;
493 RawLibrary* profiler_library_;
494 RawGrowableObjectArray* libraries_; 501 RawGrowableObjectArray* libraries_;
495 RawGrowableObjectArray* pending_classes_; 502 RawGrowableObjectArray* pending_classes_;
496 RawGrowableObjectArray* pending_functions_; 503 RawGrowableObjectArray* pending_functions_;
497 RawGrowableObjectArray* pending_deferred_loads_; 504 RawGrowableObjectArray* pending_deferred_loads_;
498 RawGrowableObjectArray* resume_capabilities_; 505 RawGrowableObjectArray* resume_capabilities_;
499 RawGrowableObjectArray* exit_listeners_; 506 RawGrowableObjectArray* exit_listeners_;
500 RawGrowableObjectArray* error_listeners_; 507 RawGrowableObjectArray* error_listeners_;
501 RawError* sticky_error_; 508 RawError* sticky_error_;
502 RawContext* empty_context_; 509 RawContext* empty_context_;
503 RawInstance* stack_overflow_; 510 RawInstance* stack_overflow_;
504 RawInstance* out_of_memory_; 511 RawInstance* out_of_memory_;
505 RawUnhandledException* preallocated_unhandled_exception_; 512 RawUnhandledException* preallocated_unhandled_exception_;
506 RawStacktrace* preallocated_stack_trace_; 513 RawStacktrace* preallocated_stack_trace_;
507 RawFunction* lookup_port_handler_; 514 RawFunction* lookup_port_handler_;
508 RawTypedData* empty_uint32_array_; 515 RawTypedData* empty_uint32_array_;
509 RawFunction* handle_message_function_; 516 RawFunction* handle_message_function_;
510 RawArray* library_load_error_table_; 517 RawArray* library_load_error_table_;
511 RawObject** to() { 518 RawObject** to() {
512 return reinterpret_cast<RawObject**>(&library_load_error_table_); 519 return reinterpret_cast<RawObject**>(&library_load_error_table_);
513 } 520 }
514 521
515 friend class SnapshotReader; 522 friend class SnapshotReader;
516 523
517 DISALLOW_COPY_AND_ASSIGN(ObjectStore); 524 DISALLOW_COPY_AND_ASSIGN(ObjectStore);
518 }; 525 };
519 526
520 } // namespace dart 527 } // namespace dart
521 528
522 #endif // VM_OBJECT_STORE_H_ 529 #endif // VM_OBJECT_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698