OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/atomic.h" | 10 #include "vm/atomic.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 const uint8_t* instructions_snapshot_buffer); | 248 const uint8_t* instructions_snapshot_buffer); |
249 void SetupDataSnapshotPage( | 249 void SetupDataSnapshotPage( |
250 const uint8_t* instructions_snapshot_buffer); | 250 const uint8_t* instructions_snapshot_buffer); |
251 | 251 |
252 void ScheduleMessageInterrupts(); | 252 void ScheduleMessageInterrupts(); |
253 | 253 |
254 // Marks all libraries as loaded. | 254 // Marks all libraries as loaded. |
255 void DoneLoading(); | 255 void DoneLoading(); |
256 void DoneFinalizing(); | 256 void DoneFinalizing(); |
257 | 257 |
258 void ReloadSources(bool test_mode = false); | 258 // By default the reload context is deleted. This parameter allows |
| 259 // the caller to delete is separately if it is still needed. |
| 260 void ReloadSources(bool dont_delete_reload_context = false); |
259 | 261 |
260 bool MakeRunnable(); | 262 bool MakeRunnable(); |
261 void Run(); | 263 void Run(); |
262 | 264 |
263 MessageHandler* message_handler() const { return message_handler_; } | 265 MessageHandler* message_handler() const { return message_handler_; } |
264 void set_message_handler(MessageHandler* value) { message_handler_ = value; } | 266 void set_message_handler(MessageHandler* value) { message_handler_ = value; } |
265 | 267 |
266 bool is_runnable() const { return is_runnable_; } | 268 bool is_runnable() const { return is_runnable_; } |
267 void set_is_runnable(bool value) { | 269 void set_is_runnable(bool value) { |
268 is_runnable_ = value; | 270 is_runnable_ = value; |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 } | 475 } |
474 | 476 |
475 bool IsReloading() const { | 477 bool IsReloading() const { |
476 return reload_context_ != NULL; | 478 return reload_context_ != NULL; |
477 } | 479 } |
478 | 480 |
479 IsolateReloadContext* reload_context() { | 481 IsolateReloadContext* reload_context() { |
480 return reload_context_; | 482 return reload_context_; |
481 } | 483 } |
482 | 484 |
| 485 void DeleteReloadContext(); |
| 486 |
483 bool HasAttemptedReload() const { | 487 bool HasAttemptedReload() const { |
484 return has_attempted_reload_; | 488 return has_attempted_reload_; |
485 } | 489 } |
486 | 490 |
487 bool CanReload() const; | 491 bool CanReload() const; |
488 | 492 |
489 void ReportReloadError(const Error& error); | 493 void ReportReloadError(const Error& error); |
490 | 494 |
491 uword user_tag() const { | 495 uword user_tag() const { |
492 return user_tag_; | 496 return user_tag_; |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 intptr_t* spawn_count_; | 994 intptr_t* spawn_count_; |
991 | 995 |
992 Dart_IsolateFlags isolate_flags_; | 996 Dart_IsolateFlags isolate_flags_; |
993 bool paused_; | 997 bool paused_; |
994 bool errors_are_fatal_; | 998 bool errors_are_fatal_; |
995 }; | 999 }; |
996 | 1000 |
997 } // namespace dart | 1001 } // namespace dart |
998 | 1002 |
999 #endif // VM_ISOLATE_H_ | 1003 #endif // VM_ISOLATE_H_ |
OLD | NEW |