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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 1095903002: Deal with deferred loading in the VM mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | sdk/lib/mirrors/mirrors.dart » ('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 #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 "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 5436 matching lines...) Expand 10 before | Expand all | Expand 10 after
5447 return state; 5447 return state;
5448 } 5448 }
5449 5449
5450 // Now that the newly loaded classes are finalized, notify the debugger 5450 // Now that the newly loaded classes are finalized, notify the debugger
5451 // that new code has been loaded. If there are latent breakpoints in 5451 // that new code has been loaded. If there are latent breakpoints in
5452 // the new code, the debugger convert them to unresolved source breakpoints. 5452 // the new code, the debugger convert them to unresolved source breakpoints.
5453 // The code that completes the futures (invoked below) may call into the 5453 // The code that completes the futures (invoked below) may call into the
5454 // newly loaded code and trigger one of these breakpoints. 5454 // newly loaded code and trigger one of these breakpoints.
5455 isolate->debugger()->NotifyDoneLoading(); 5455 isolate->debugger()->NotifyDoneLoading();
5456 5456
5457 // Notify mirrors that MirrorSystem.libraries needs to be recomputed.
5458 const Library& libmirrors =
5459 Library::Handle(isolate, Library::MirrorsLibrary());
5460 const Field& dirty_bit = Field::Handle(isolate,
5461 libmirrors.LookupLocalField(String::Handle(String::New("dirty"))));
5462 ASSERT(!dirty_bit.IsNull() && dirty_bit.is_static());
5463 dirty_bit.set_value(Bool::True());
5464
5457 if (complete_futures) { 5465 if (complete_futures) {
5458 const Library& corelib = Library::Handle(isolate, Library::CoreLibrary()); 5466 const Library& corelib = Library::Handle(isolate, Library::CoreLibrary());
5459 const String& function_name = 5467 const String& function_name =
5460 String::Handle(isolate, String::New("_completeDeferredLoads")); 5468 String::Handle(isolate, String::New("_completeDeferredLoads"));
5461 const Function& function = 5469 const Function& function =
5462 Function::Handle(isolate, 5470 Function::Handle(isolate,
5463 corelib.LookupFunctionAllowPrivate(function_name)); 5471 corelib.LookupFunctionAllowPrivate(function_name));
5464 ASSERT(!function.IsNull()); 5472 ASSERT(!function.IsNull());
5465 const Array& args = Array::empty_array(); 5473 const Array& args = Array::empty_array();
5466 5474
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
5558 5566
5559 5567
5560 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 5568 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
5561 const char* name, 5569 const char* name,
5562 Dart_ServiceRequestCallback callback, 5570 Dart_ServiceRequestCallback callback,
5563 void* user_data) { 5571 void* user_data) {
5564 Service::RegisterRootEmbedderCallback(name, callback, user_data); 5572 Service::RegisterRootEmbedderCallback(name, callback, user_data);
5565 } 5573 }
5566 5574
5567 } // namespace dart 5575 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | sdk/lib/mirrors/mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698