OLD | NEW |
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_ISOLATE_H_ | 5 #ifndef VM_ISOLATE_H_ |
6 #define VM_ISOLATE_H_ | 6 #define VM_ISOLATE_H_ |
7 | 7 |
8 #include <limits.h> | 8 #include <limits.h> |
9 | 9 |
10 #include "include/dart_api.h" | 10 #include "include/dart_api.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 static void InitOnce(); | 40 static void InitOnce(); |
41 static Isolate* Init(); | 41 static Isolate* Init(); |
42 void Shutdown(); | 42 void Shutdown(); |
43 | 43 |
44 // Visit all object pointers. | 44 // Visit all object pointers. |
45 void VisitObjectPointers(ObjectPointerVisitor* visitor, bool validate_frames); | 45 void VisitObjectPointers(ObjectPointerVisitor* visitor, bool validate_frames); |
46 | 46 |
47 StoreBufferBlock* store_buffer() { return &store_buffer_; } | 47 StoreBufferBlock* store_buffer() { return &store_buffer_; } |
48 | 48 |
| 49 Dart_CreatePortCallback create_port_callback() const { |
| 50 return create_port_callback_; |
| 51 } |
| 52 void set_create_port_callback(Dart_CreatePortCallback value) { |
| 53 create_port_callback_ = value; |
| 54 } |
| 55 |
49 Dart_PostMessageCallback post_message_callback() const { | 56 Dart_PostMessageCallback post_message_callback() const { |
50 return post_message_callback_; | 57 return post_message_callback_; |
51 } | 58 } |
52 void set_post_message_callback(Dart_PostMessageCallback value) { | 59 void set_post_message_callback(Dart_PostMessageCallback value) { |
53 post_message_callback_ = value; | 60 post_message_callback_ = value; |
54 } | 61 } |
55 | 62 |
56 Dart_ClosePortCallback close_port_callback() const { | 63 Dart_ClosePortCallback close_port_callback() const { |
57 return close_port_callback_; | 64 return close_port_callback_; |
58 } | 65 } |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 void PrintInvokedFunctions(); | 238 void PrintInvokedFunctions(); |
232 | 239 |
233 static uword GetSpecifiedStackSize(); | 240 static uword GetSpecifiedStackSize(); |
234 | 241 |
235 static const uword kStackSizeBuffer = (128 * KB); | 242 static const uword kStackSizeBuffer = (128 * KB); |
236 static const uword kDefaultStackSize = (1 * MB); | 243 static const uword kDefaultStackSize = (1 * MB); |
237 | 244 |
238 StoreBufferBlock store_buffer_; | 245 StoreBufferBlock store_buffer_; |
239 Monitor* monitor_; | 246 Monitor* monitor_; |
240 MessageQueue* message_queue_; | 247 MessageQueue* message_queue_; |
| 248 Dart_CreatePortCallback create_port_callback_; |
241 Dart_PostMessageCallback post_message_callback_; | 249 Dart_PostMessageCallback post_message_callback_; |
242 Dart_ClosePortCallback close_port_callback_; | 250 Dart_ClosePortCallback close_port_callback_; |
243 intptr_t active_ports_; | 251 intptr_t active_ports_; |
244 Heap* heap_; | 252 Heap* heap_; |
245 ObjectStore* object_store_; | 253 ObjectStore* object_store_; |
246 StackResource* top_resource_; | 254 StackResource* top_resource_; |
247 RawContext* top_context_; | 255 RawContext* top_context_; |
248 Zone* current_zone_; | 256 Zone* current_zone_; |
249 #if defined(DEBUG) | 257 #if defined(DEBUG) |
250 int32_t no_gc_scope_depth_; | 258 int32_t no_gc_scope_depth_; |
(...skipping 25 matching lines...) Expand all Loading... |
276 #include "vm/isolate_linux.h" | 284 #include "vm/isolate_linux.h" |
277 #elif defined(TARGET_OS_MACOS) | 285 #elif defined(TARGET_OS_MACOS) |
278 #include "vm/isolate_macos.h" | 286 #include "vm/isolate_macos.h" |
279 #elif defined(TARGET_OS_WINDOWS) | 287 #elif defined(TARGET_OS_WINDOWS) |
280 #include "vm/isolate_win.h" | 288 #include "vm/isolate_win.h" |
281 #else | 289 #else |
282 #error Unknown target os. | 290 #error Unknown target os. |
283 #endif | 291 #endif |
284 | 292 |
285 #endif // VM_ISOLATE_H_ | 293 #endif // VM_ISOLATE_H_ |
OLD | NEW |