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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1643023003: Precompilation: when removing top-level fields and functions, also remove them from the library dic… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 6567b579befc5bd7ed9c1cffb2ea317dcd937f14..02f4e3f5047a8a2b1453852fa6b1d241dade52b7 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -52,6 +52,7 @@ namespace dart {
#define Z (T->zone())
+DECLARE_FLAG(bool, enable_mirrors);
DECLARE_FLAG(bool, load_deferred_eagerly);
DECLARE_FLAG(bool, precompilation);
DECLARE_FLAG(bool, print_class_table);
@@ -5436,12 +5437,14 @@ DART_EXPORT Dart_Handle Dart_FinalizeLoading(bool complete_futures) {
// newly loaded code and trigger one of these breakpoints.
I->debugger()->NotifyDoneLoading();
- // Notify mirrors that MirrorSystem.libraries needs to be recomputed.
- const Library& libmirrors = Library::Handle(Z, Library::MirrorsLibrary());
- const Field& dirty_bit = Field::Handle(Z,
- libmirrors.LookupLocalField(String::Handle(String::New("dirty"))));
- ASSERT(!dirty_bit.IsNull() && dirty_bit.is_static());
- dirty_bit.SetStaticValue(Bool::True());
+ if (FLAG_enable_mirrors) {
+ // Notify mirrors that MirrorSystem.libraries needs to be recomputed.
+ const Library& libmirrors = Library::Handle(Z, Library::MirrorsLibrary());
+ const Field& dirty_bit = Field::Handle(Z,
+ libmirrors.LookupLocalField(String::Handle(String::New("dirty"))));
+ ASSERT(!dirty_bit.IsNull() && dirty_bit.is_static());
+ dirty_bit.SetStaticValue(Bool::True());
+ }
if (complete_futures) {
const Library& corelib = Library::Handle(Z, Library::CoreLibrary());
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/object.h » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698