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

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: Code review 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
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 void set_last_reload_timestamp(int64_t value) {
497 last_reload_timestamp_ = value;
498 }
499 int64_t last_reload_timestamp() const {
500 return last_reload_timestamp_;
501 }
502
495 uword user_tag() const { 503 uword user_tag() const {
496 return user_tag_; 504 return user_tag_;
497 } 505 }
498 static intptr_t user_tag_offset() { 506 static intptr_t user_tag_offset() {
499 return OFFSET_OF(Isolate, user_tag_); 507 return OFFSET_OF(Isolate, user_tag_);
500 } 508 }
501 static intptr_t current_tag_offset() { 509 static intptr_t current_tag_offset() {
502 return OFFSET_OF(Isolate, current_tag_); 510 return OFFSET_OF(Isolate, current_tag_);
503 } 511 }
504 static intptr_t default_tag_offset() { 512 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. 832 // destroyed while there are child isolates in the midst of a spawn.
825 Monitor* spawn_count_monitor_; 833 Monitor* spawn_count_monitor_;
826 intptr_t spawn_count_; 834 intptr_t spawn_count_;
827 835
828 // Has a reload ever been attempted? 836 // Has a reload ever been attempted?
829 bool has_attempted_reload_; 837 bool has_attempted_reload_;
830 intptr_t no_reload_scope_depth_; // we can only reload when this is 0. 838 intptr_t no_reload_scope_depth_; // we can only reload when this is 0.
831 // Per-isolate copy of FLAG_reload_every. 839 // Per-isolate copy of FLAG_reload_every.
832 intptr_t reload_every_n_stack_overflow_checks_; 840 intptr_t reload_every_n_stack_overflow_checks_;
833 IsolateReloadContext* reload_context_; 841 IsolateReloadContext* reload_context_;
842 int64_t last_reload_timestamp_;
834 843
835 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ 844 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \
836 type metric_##variable##_; 845 type metric_##variable##_;
837 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); 846 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE);
838 #undef ISOLATE_METRIC_VARIABLE 847 #undef ISOLATE_METRIC_VARIABLE
839 848
840 849
841 static Dart_IsolateCreateCallback create_callback_; 850 static Dart_IsolateCreateCallback create_callback_;
842 static Dart_IsolateShutdownCallback shutdown_callback_; 851 static Dart_IsolateShutdownCallback shutdown_callback_;
843 static Dart_IsolateInterruptCallback vmstats_callback_; 852 static Dart_IsolateInterruptCallback vmstats_callback_;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 intptr_t* spawn_count_; 1003 intptr_t* spawn_count_;
995 1004
996 Dart_IsolateFlags isolate_flags_; 1005 Dart_IsolateFlags isolate_flags_;
997 bool paused_; 1006 bool paused_;
998 bool errors_are_fatal_; 1007 bool errors_are_fatal_;
999 }; 1008 };
1000 1009
1001 } // namespace dart 1010 } // namespace dart
1002 1011
1003 #endif // VM_ISOLATE_H_ 1012 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698