| 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_BIN_ISOLATE_DATA_H_ | 5 #ifndef RUNTIME_BIN_ISOLATE_DATA_H_ |
| 6 #define RUNTIME_BIN_ISOLATE_DATA_H_ | 6 #define RUNTIME_BIN_ISOLATE_DATA_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
| 11 | 11 |
| 12 namespace dart { | 12 namespace dart { |
| 13 |
| 14 // Forward declaration. |
| 15 template <typename T> |
| 16 class MallocGrowableArray; |
| 17 |
| 18 } // namespace dart |
| 19 |
| 20 namespace dart { |
| 13 namespace bin { | 21 namespace bin { |
| 14 | 22 |
| 15 // Forward declaration. | 23 // Forward declaration. |
| 16 class AppSnapshot; | 24 class AppSnapshot; |
| 17 class EventHandler; | 25 class EventHandler; |
| 18 class Loader; | 26 class Loader; |
| 19 | 27 |
| 20 // Data associated with every isolate in the standalone VM | 28 // Data associated with every isolate in the standalone VM |
| 21 // embedding. This is used to free external resources for each isolate | 29 // embedding. This is used to free external resources for each isolate |
| 22 // when the isolate shuts down. | 30 // when the isolate shuts down. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 48 // While loading a loader is associated with the isolate. | 56 // While loading a loader is associated with the isolate. |
| 49 bool HasLoader() const { return loader_ != NULL; } | 57 bool HasLoader() const { return loader_ != NULL; } |
| 50 Loader* loader() const { | 58 Loader* loader() const { |
| 51 ASSERT(loader_ != NULL); | 59 ASSERT(loader_ != NULL); |
| 52 return loader_; | 60 return loader_; |
| 53 } | 61 } |
| 54 void set_loader(Loader* loader) { | 62 void set_loader(Loader* loader) { |
| 55 ASSERT((loader_ == NULL) || (loader == NULL)); | 63 ASSERT((loader_ == NULL) || (loader == NULL)); |
| 56 loader_ = loader; | 64 loader_ = loader; |
| 57 } | 65 } |
| 66 MallocGrowableArray<char*>* dependencies() const { return dependencies_; } |
| 67 void set_dependencies(MallocGrowableArray<char*>* deps) { |
| 68 dependencies_ = deps; |
| 69 } |
| 58 | 70 |
| 59 private: | 71 private: |
| 60 Dart_Handle builtin_lib_; | 72 Dart_Handle builtin_lib_; |
| 61 Loader* loader_; | 73 Loader* loader_; |
| 62 AppSnapshot* app_snapshot_; | 74 AppSnapshot* app_snapshot_; |
| 75 MallocGrowableArray<char*>* dependencies_; |
| 63 | 76 |
| 64 DISALLOW_COPY_AND_ASSIGN(IsolateData); | 77 DISALLOW_COPY_AND_ASSIGN(IsolateData); |
| 65 }; | 78 }; |
| 66 | 79 |
| 67 } // namespace bin | 80 } // namespace bin |
| 68 } // namespace dart | 81 } // namespace dart |
| 69 | 82 |
| 70 #endif // RUNTIME_BIN_ISOLATE_DATA_H_ | 83 #endif // RUNTIME_BIN_ISOLATE_DATA_H_ |
| OLD | NEW |