| OLD | NEW |
| 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 RUNTIME_VM_OBJECT_STORE_H_ | 5 #ifndef RUNTIME_VM_OBJECT_STORE_H_ |
| 6 #define RUNTIME_VM_OBJECT_STORE_H_ | 6 #define RUNTIME_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 // A list of the bootstrap libraries including CamelName and name. | 16 // A list of the bootstrap libraries including CamelName and name. |
| 17 // | 17 // |
| 18 // These are listed in the order that they are compiled (see vm/bootstrap.cc). | 18 // These are listed in the order that they are compiled (see vm/bootstrap.cc). |
| 19 #define FOR_EACH_PRODUCT_LIBRARY(M) \ | 19 #define FOR_EACH_BOOTSTRAP_LIBRARY(M) \ |
| 20 M(Core, core) \ | 20 M(Core, core) \ |
| 21 M(Async, async) \ | 21 M(Async, async) \ |
| 22 M(Collection, collection) \ | 22 M(Collection, collection) \ |
| 23 M(Convert, convert) \ | 23 M(Convert, convert) \ |
| 24 M(Developer, developer) \ | 24 M(Developer, developer) \ |
| 25 M(Internal, _internal) \ | 25 M(Internal, _internal) \ |
| 26 M(Isolate, isolate) \ | 26 M(Isolate, isolate) \ |
| 27 M(Math, math) \ | 27 M(Math, math) \ |
| 28 M(Mirrors, mirrors) \ |
| 28 M(Profiler, profiler) \ | 29 M(Profiler, profiler) \ |
| 29 M(TypedData, typed_data) \ | 30 M(TypedData, typed_data) \ |
| 30 M(VMService, _vmservice) | 31 M(VMService, _vmservice) |
| 31 | 32 |
| 32 #ifdef PRODUCT | |
| 33 #define FOR_EACH_BOOTSTRAP_LIBRARY(M) FOR_EACH_PRODUCT_LIBRARY(M) | |
| 34 | |
| 35 #else | |
| 36 #define FOR_EACH_BOOTSTRAP_LIBRARY(M) \ | |
| 37 FOR_EACH_PRODUCT_LIBRARY(M) \ | |
| 38 M(Mirrors, mirrors) | |
| 39 | |
| 40 #endif | |
| 41 | |
| 42 // The object store is a per isolate instance which stores references to | 33 // The object store is a per isolate instance which stores references to |
| 43 // objects used by the VM. | 34 // objects used by the VM. |
| 44 // TODO(iposva): Move the actual store into the object heap for quick handling | 35 // TODO(iposva): Move the actual store into the object heap for quick handling |
| 45 // by snapshots eventually. | 36 // by snapshots eventually. |
| 46 class ObjectStore { | 37 class ObjectStore { |
| 47 public: | 38 public: |
| 48 enum BootstrapLibraryId { | 39 enum BootstrapLibraryId { |
| 49 #define MAKE_ID(Name, _) k##Name, | 40 #define MAKE_ID(Name, _) k##Name, |
| 50 | 41 |
| 51 FOR_EACH_BOOTSTRAP_LIBRARY(MAKE_ID) | 42 FOR_EACH_BOOTSTRAP_LIBRARY(MAKE_ID) |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 | 612 |
| 622 friend class Serializer; | 613 friend class Serializer; |
| 623 friend class Deserializer; | 614 friend class Deserializer; |
| 624 | 615 |
| 625 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 616 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
| 626 }; | 617 }; |
| 627 | 618 |
| 628 } // namespace dart | 619 } // namespace dart |
| 629 | 620 |
| 630 #endif // RUNTIME_VM_OBJECT_STORE_H_ | 621 #endif // RUNTIME_VM_OBJECT_STORE_H_ |
| OLD | NEW |