Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: runtime/vm/isolate.h

Issue 2186423002: Only reload libraries when they may have been modified. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixed bug with prefixed imports Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // By default the reload context is deleted. This parameter allows 258 // By default the reload context is deleted. This parameter allows
259 // the caller to delete is separately if it is still needed. 259 // the caller to delete is separately if it is still needed.
260 void ReloadSources(bool dont_delete_reload_context = false); 260 void ReloadSources(bool force_reload,
261 bool dont_delete_reload_context = false);
261 262
262 bool MakeRunnable(); 263 bool MakeRunnable();
263 void Run(); 264 void Run();
264 265
265 MessageHandler* message_handler() const { return message_handler_; } 266 MessageHandler* message_handler() const { return message_handler_; }
266 void set_message_handler(MessageHandler* value) { message_handler_ = value; } 267 void set_message_handler(MessageHandler* value) { message_handler_ = value; }
267 268
268 bool is_runnable() const { return is_runnable_; } 269 bool is_runnable() const { return is_runnable_; }
269 void set_is_runnable(bool value) { 270 void set_is_runnable(bool value) {
270 is_runnable_ = value; 271 is_runnable_ = value;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 void DeleteReloadContext(); 486 void DeleteReloadContext();
486 487
487 bool HasAttemptedReload() const { 488 bool HasAttemptedReload() const {
488 return has_attempted_reload_; 489 return has_attempted_reload_;
489 } 490 }
490 491
491 bool CanReload() const; 492 bool CanReload() const;
492 493
493 void ReportReloadError(const Error& error); 494 void ReportReloadError(const Error& error);
494 495
496 int64_t reload_timestamp() const {
497 return reload_timestamp_;
498 }
499
495 uword user_tag() const { 500 uword user_tag() const {
496 return user_tag_; 501 return user_tag_;
497 } 502 }
498 static intptr_t user_tag_offset() { 503 static intptr_t user_tag_offset() {
499 return OFFSET_OF(Isolate, user_tag_); 504 return OFFSET_OF(Isolate, user_tag_);
500 } 505 }
501 static intptr_t current_tag_offset() { 506 static intptr_t current_tag_offset() {
502 return OFFSET_OF(Isolate, current_tag_); 507 return OFFSET_OF(Isolate, current_tag_);
503 } 508 }
504 static intptr_t default_tag_offset() { 509 static intptr_t default_tag_offset() {
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 // destroyed while there are child isolates in the midst of a spawn. 829 // destroyed while there are child isolates in the midst of a spawn.
825 Monitor* spawn_count_monitor_; 830 Monitor* spawn_count_monitor_;
826 intptr_t spawn_count_; 831 intptr_t spawn_count_;
827 832
828 // Has a reload ever been attempted? 833 // Has a reload ever been attempted?
829 bool has_attempted_reload_; 834 bool has_attempted_reload_;
830 intptr_t no_reload_scope_depth_; // we can only reload when this is 0. 835 intptr_t no_reload_scope_depth_; // we can only reload when this is 0.
831 // Per-isolate copy of FLAG_reload_every. 836 // Per-isolate copy of FLAG_reload_every.
832 intptr_t reload_every_n_stack_overflow_checks_; 837 intptr_t reload_every_n_stack_overflow_checks_;
833 IsolateReloadContext* reload_context_; 838 IsolateReloadContext* reload_context_;
839 int64_t reload_timestamp_;
834 840
835 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ 841 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \
836 type metric_##variable##_; 842 type metric_##variable##_;
837 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); 843 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE);
838 #undef ISOLATE_METRIC_VARIABLE 844 #undef ISOLATE_METRIC_VARIABLE
839 845
840 846
841 static Dart_IsolateCreateCallback create_callback_; 847 static Dart_IsolateCreateCallback create_callback_;
842 static Dart_IsolateShutdownCallback shutdown_callback_; 848 static Dart_IsolateShutdownCallback shutdown_callback_;
843 static Dart_IsolateInterruptCallback vmstats_callback_; 849 static Dart_IsolateInterruptCallback vmstats_callback_;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 intptr_t* spawn_count_; 1000 intptr_t* spawn_count_;
995 1001
996 Dart_IsolateFlags isolate_flags_; 1002 Dart_IsolateFlags isolate_flags_;
997 bool paused_; 1003 bool paused_;
998 bool errors_are_fatal_; 1004 bool errors_are_fatal_;
999 }; 1005 };
1000 1006
1001 } // namespace dart 1007 } // namespace dart
1002 1008
1003 #endif // VM_ISOLATE_H_ 1009 #endif // VM_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698