| Index: runtime/vm/isolate_reload.h
|
| diff --git a/runtime/vm/isolate_reload.h b/runtime/vm/isolate_reload.h
|
| index 8d0c5934304e20dc576056f35da0a602522a7833..d978d47b3fc5e7e1db0de398e7d6d88db58239a8 100644
|
| --- a/runtime/vm/isolate_reload.h
|
| +++ b/runtime/vm/isolate_reload.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef VM_ISOLATE_RELOAD_H_
|
| #define VM_ISOLATE_RELOAD_H_
|
|
|
| +#include "include/dart_tools_api.h"
|
| +
|
| #include "vm/globals.h"
|
| #include "vm/growable_array.h"
|
| #include "vm/log.h"
|
| @@ -32,16 +34,18 @@ DECLARE_FLAG(bool, trace_reload_verbose);
|
|
|
| namespace dart {
|
|
|
| +class BitVector;
|
| class GrowableObjectArray;
|
| class Isolate;
|
| class Library;
|
| +class ObjectPointerVisitor;
|
| +class ObjectStore;
|
| class RawError;
|
| class RawGrowableObjectArray;
|
| class RawLibrary;
|
| class RawObject;
|
| class RawString;
|
| -class ObjectPointerVisitor;
|
| -class ObjectStore;
|
| +class Script;
|
| class UpdateClassesVisitor;
|
|
|
| class IsolateReloadContext {
|
| @@ -49,7 +53,7 @@ class IsolateReloadContext {
|
| explicit IsolateReloadContext(Isolate* isolate);
|
| ~IsolateReloadContext();
|
|
|
| - void StartReload();
|
| + void StartReload(bool force_reload);
|
| void FinishReload();
|
| void AbortReload(const Error& error);
|
|
|
| @@ -61,9 +65,13 @@ class IsolateReloadContext {
|
| void ReportError(const String& error_msg);
|
| void ReportSuccess();
|
|
|
| + bool reload_skipped() const { return reload_skipped_; }
|
| +
|
| bool has_error() const { return has_error_; }
|
| RawError* error() const { return error_; }
|
|
|
| + int64_t reload_timestamp() const { return reload_timestamp_; }
|
| +
|
| static bool IsSameField(const Field& a, const Field& b);
|
| static bool IsSameLibrary(const Library& a_lib, const Library& b_lib);
|
| static bool IsSameClass(const Class& a, const Class& b);
|
| @@ -83,6 +91,13 @@ class IsolateReloadContext {
|
|
|
| int64_t start_time_micros() const { return start_time_micros_; }
|
|
|
| + static Dart_FileModifiedCallback file_modified_callback() {
|
| + return file_modified_callback_;
|
| + }
|
| + static void SetFileModifiedCallback(Dart_FileModifiedCallback callback) {
|
| + file_modified_callback_ = callback;
|
| + }
|
| +
|
| private:
|
| void set_saved_root_library(const Library& value);
|
|
|
| @@ -100,8 +115,9 @@ class IsolateReloadContext {
|
|
|
| void CheckpointClasses();
|
|
|
| - // Is |lib| a library whose sources have not changed?
|
| - bool IsCleanLibrary(const Library& lib);
|
| + bool ScriptModifiedSince(const Script& script, int64_t since);
|
| + BitVector* FindModifiedLibraries(bool force_reload);
|
| +
|
| void CheckpointLibraries();
|
|
|
| bool ValidateReload();
|
| @@ -128,7 +144,9 @@ class IsolateReloadContext {
|
| void InvalidateWorld();
|
|
|
| int64_t start_time_micros_;
|
| + int64_t reload_timestamp_;
|
| Isolate* isolate_;
|
| + bool reload_skipped_;
|
| bool has_error_;
|
|
|
| intptr_t saved_num_cids_;
|
| @@ -140,6 +158,9 @@ class IsolateReloadContext {
|
| };
|
| MallocGrowableArray<LibraryInfo> library_infos_;
|
|
|
| + // A bit vector indicating which of the original libraries were modified.
|
| + BitVector* modified_libs_;
|
| +
|
| RawClass* OldClassOrNull(const Class& replacement_or_new);
|
|
|
| RawLibrary* OldLibraryOrNull(const Library& replacement_or_new);
|
| @@ -176,6 +197,8 @@ class IsolateReloadContext {
|
|
|
| friend class Isolate;
|
| friend class Class; // AddStaticFieldMapping, AddEnumBecomeMapping.
|
| +
|
| + static Dart_FileModifiedCallback file_modified_callback_;
|
| };
|
|
|
| } // namespace dart
|
|
|