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

Side by Side 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, 10 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 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "vm/unicode.h" 45 #include "vm/unicode.h"
46 #include "vm/verifier.h" 46 #include "vm/verifier.h"
47 #include "vm/version.h" 47 #include "vm/version.h"
48 48
49 namespace dart { 49 namespace dart {
50 50
51 // Facilitate quick access to the current zone once we have the curren thread. 51 // Facilitate quick access to the current zone once we have the curren thread.
52 #define Z (T->zone()) 52 #define Z (T->zone())
53 53
54 54
55 DECLARE_FLAG(bool, enable_mirrors);
55 DECLARE_FLAG(bool, load_deferred_eagerly); 56 DECLARE_FLAG(bool, load_deferred_eagerly);
56 DECLARE_FLAG(bool, precompilation); 57 DECLARE_FLAG(bool, precompilation);
57 DECLARE_FLAG(bool, print_class_table); 58 DECLARE_FLAG(bool, print_class_table);
58 DECLARE_FLAG(bool, verify_handles); 59 DECLARE_FLAG(bool, verify_handles);
59 #if defined(DART_NO_SNAPSHOT) 60 #if defined(DART_NO_SNAPSHOT)
60 DEFINE_FLAG(bool, check_function_fingerprints, true, 61 DEFINE_FLAG(bool, check_function_fingerprints, true,
61 "Check function fingerprints"); 62 "Check function fingerprints");
62 #endif // defined(DART_NO_SNAPSHOT). 63 #endif // defined(DART_NO_SNAPSHOT).
63 DEFINE_FLAG(bool, verify_acquired_data, false, 64 DEFINE_FLAG(bool, verify_acquired_data, false,
64 "Verify correct API acquire/release of typed data."); 65 "Verify correct API acquire/release of typed data.");
(...skipping 5364 matching lines...) Expand 10 before | Expand all | Expand 10 after
5429 return state; 5430 return state;
5430 } 5431 }
5431 5432
5432 // Now that the newly loaded classes are finalized, notify the debugger 5433 // Now that the newly loaded classes are finalized, notify the debugger
5433 // that new code has been loaded. If there are latent breakpoints in 5434 // that new code has been loaded. If there are latent breakpoints in
5434 // the new code, the debugger convert them to unresolved source breakpoints. 5435 // the new code, the debugger convert them to unresolved source breakpoints.
5435 // The code that completes the futures (invoked below) may call into the 5436 // The code that completes the futures (invoked below) may call into the
5436 // newly loaded code and trigger one of these breakpoints. 5437 // newly loaded code and trigger one of these breakpoints.
5437 I->debugger()->NotifyDoneLoading(); 5438 I->debugger()->NotifyDoneLoading();
5438 5439
5439 // Notify mirrors that MirrorSystem.libraries needs to be recomputed. 5440 if (FLAG_enable_mirrors) {
5440 const Library& libmirrors = Library::Handle(Z, Library::MirrorsLibrary()); 5441 // Notify mirrors that MirrorSystem.libraries needs to be recomputed.
5441 const Field& dirty_bit = Field::Handle(Z, 5442 const Library& libmirrors = Library::Handle(Z, Library::MirrorsLibrary());
5442 libmirrors.LookupLocalField(String::Handle(String::New("dirty")))); 5443 const Field& dirty_bit = Field::Handle(Z,
5443 ASSERT(!dirty_bit.IsNull() && dirty_bit.is_static()); 5444 libmirrors.LookupLocalField(String::Handle(String::New("dirty"))));
5444 dirty_bit.SetStaticValue(Bool::True()); 5445 ASSERT(!dirty_bit.IsNull() && dirty_bit.is_static());
5446 dirty_bit.SetStaticValue(Bool::True());
5447 }
5445 5448
5446 if (complete_futures) { 5449 if (complete_futures) {
5447 const Library& corelib = Library::Handle(Z, Library::CoreLibrary()); 5450 const Library& corelib = Library::Handle(Z, Library::CoreLibrary());
5448 const String& function_name = 5451 const String& function_name =
5449 String::Handle(Z, String::New("_completeDeferredLoads")); 5452 String::Handle(Z, String::New("_completeDeferredLoads"));
5450 const Function& function = Function::Handle(Z, 5453 const Function& function = Function::Handle(Z,
5451 corelib.LookupFunctionAllowPrivate(function_name)); 5454 corelib.LookupFunctionAllowPrivate(function_name));
5452 ASSERT(!function.IsNull()); 5455 ASSERT(!function.IsNull());
5453 const Array& args = Array::empty_array(); 5456 const Array& args = Array::empty_array();
5454 5457
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
6012 return Api::Success(); 6015 return Api::Success();
6013 } 6016 }
6014 #endif // DART_PRECOMPILED_RUNTIME 6017 #endif // DART_PRECOMPILED_RUNTIME
6015 6018
6016 6019
6017 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 6020 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
6018 return Dart::IsRunningPrecompiledCode(); 6021 return Dart::IsRunningPrecompiledCode();
6019 } 6022 }
6020 6023
6021 } // namespace dart 6024 } // namespace dart
OLDNEW
« 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