Chromium Code Reviews| 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 RUNTIME_VM_ISOLATE_H_ | 5 #ifndef RUNTIME_VM_ISOLATE_H_ |
| 6 #define RUNTIME_VM_ISOLATE_H_ | 6 #define RUNTIME_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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 276 } | 276 } |
| 277 | 277 |
| 278 void SetupImagePage(const uint8_t* snapshot_buffer, bool is_executable); | 278 void SetupImagePage(const uint8_t* snapshot_buffer, bool is_executable); |
| 279 | 279 |
| 280 void ScheduleMessageInterrupts(); | 280 void ScheduleMessageInterrupts(); |
| 281 | 281 |
| 282 // Marks all libraries as loaded. | 282 // Marks all libraries as loaded. |
| 283 void DoneLoading(); | 283 void DoneLoading(); |
| 284 void DoneFinalizing(); | 284 void DoneFinalizing(); |
| 285 | 285 |
| 286 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) | |
| 286 // By default the reload context is deleted. This parameter allows | 287 // By default the reload context is deleted. This parameter allows |
| 287 // the caller to delete is separately if it is still needed. | 288 // the caller to delete is separately if it is still needed. |
| 288 bool ReloadSources(JSONStream* js, | 289 bool ReloadSources(JSONStream* js, |
| 289 bool force_reload, | 290 bool force_reload, |
| 290 const char* root_script_url = NULL, | 291 const char* root_script_url = NULL, |
| 291 const char* packages_url = NULL, | 292 const char* packages_url = NULL, |
| 292 bool dont_delete_reload_context = false); | 293 bool dont_delete_reload_context = false); |
| 294 #endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) | |
| 293 | 295 |
| 294 bool MakeRunnable(); | 296 bool MakeRunnable(); |
| 295 void Run(); | 297 void Run(); |
| 296 | 298 |
| 297 MessageHandler* message_handler() const { return message_handler_; } | 299 MessageHandler* message_handler() const { return message_handler_; } |
| 298 void set_message_handler(MessageHandler* value) { message_handler_ = value; } | 300 void set_message_handler(MessageHandler* value) { message_handler_ = value; } |
| 299 | 301 |
| 300 bool is_runnable() const { return IsRunnableBit::decode(isolate_flags_); } | 302 bool is_runnable() const { return IsRunnableBit::decode(isolate_flags_); } |
| 301 void set_is_runnable(bool value) { | 303 void set_is_runnable(bool value) { |
| 302 isolate_flags_ = IsRunnableBit::update(value, isolate_flags_); | 304 isolate_flags_ = IsRunnableBit::update(value, isolate_flags_); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 499 } | 501 } |
| 500 | 502 |
| 501 #if !defined(PRODUCT) | 503 #if !defined(PRODUCT) |
| 502 VMTagCounters* vm_tag_counters() { return &vm_tag_counters_; } | 504 VMTagCounters* vm_tag_counters() { return &vm_tag_counters_; } |
| 503 | 505 |
| 504 #if !defined(DART_PRECOMPILED_RUNTIME) | 506 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 505 bool IsReloading() const { return reload_context_ != NULL; } | 507 bool IsReloading() const { return reload_context_ != NULL; } |
| 506 | 508 |
| 507 IsolateReloadContext* reload_context() { return reload_context_; } | 509 IsolateReloadContext* reload_context() { return reload_context_; } |
| 508 | 510 |
| 511 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) | |
|
Vyacheslav Egorov (Google)
2017/08/25 11:43:41
?
kustermann
2017/08/25 11:46:17
Done.
| |
| 512 bool CanReload() const; | |
| 509 void DeleteReloadContext(); | 513 void DeleteReloadContext(); |
| 514 #endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) | |
| 510 | 515 |
| 511 bool HasAttemptedReload() const { | 516 bool HasAttemptedReload() const { |
| 512 return HasAttemptedReloadBit::decode(isolate_flags_); | 517 return HasAttemptedReloadBit::decode(isolate_flags_); |
| 513 } | 518 } |
| 514 void SetHasAttemptedReload(bool value) { | 519 void SetHasAttemptedReload(bool value) { |
| 515 isolate_flags_ = HasAttemptedReloadBit::update(value, isolate_flags_); | 520 isolate_flags_ = HasAttemptedReloadBit::update(value, isolate_flags_); |
| 516 } | 521 } |
| 517 | 522 |
| 518 bool CanReload() const; | |
| 519 | |
| 520 void set_last_reload_timestamp(int64_t value) { | 523 void set_last_reload_timestamp(int64_t value) { |
| 521 last_reload_timestamp_ = value; | 524 last_reload_timestamp_ = value; |
| 522 } | 525 } |
| 523 int64_t last_reload_timestamp() const { return last_reload_timestamp_; } | 526 int64_t last_reload_timestamp() const { return last_reload_timestamp_; } |
| 524 #else | 527 #else |
| 525 bool IsReloading() const { return false; } | 528 bool IsReloading() const { return false; } |
| 526 bool HasAttemptedReload() const { return false; } | 529 bool HasAttemptedReload() const { return false; } |
| 527 bool CanReload() const { return false; } | 530 bool CanReload() const { return false; } |
| 528 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 531 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| 529 #endif // !defined(PRODUCT) | 532 #endif // !defined(PRODUCT) |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1123 intptr_t* spawn_count_; | 1126 intptr_t* spawn_count_; |
| 1124 | 1127 |
| 1125 Dart_IsolateFlags isolate_flags_; | 1128 Dart_IsolateFlags isolate_flags_; |
| 1126 bool paused_; | 1129 bool paused_; |
| 1127 bool errors_are_fatal_; | 1130 bool errors_are_fatal_; |
| 1128 }; | 1131 }; |
| 1129 | 1132 |
| 1130 } // namespace dart | 1133 } // namespace dart |
| 1131 | 1134 |
| 1132 #endif // RUNTIME_VM_ISOLATE_H_ | 1135 #endif // RUNTIME_VM_ISOLATE_H_ |
| OLD | NEW |