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

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

Issue 2144113002: Disallow deferred loading when using isolate reloading. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review Created 4 years, 5 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/isolate_reload.cc ('k') | tests/co19/co19-runtime.status » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "vm/isolate_reload.h" 7 #include "vm/isolate_reload.h"
8 #include "vm/log.h" 8 #include "vm/log.h"
9 #include "vm/resolver.h" 9 #include "vm/resolver.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 520
521 TIR_Print("Class `%s` can be reloaded (%" Pd " and %" Pd ")\n", 521 TIR_Print("Class `%s` can be reloaded (%" Pd " and %" Pd ")\n",
522 ToCString(), 522 ToCString(),
523 id(), 523 id(),
524 replacement.id()); 524 replacement.id());
525 return true; 525 return true;
526 } 526 }
527 527
528 528
529 bool Library::CanReload(const Library& replacement) const { 529 bool Library::CanReload(const Library& replacement) const {
530 // TODO(26878): If the replacement library uses deferred loading,
531 // reject it. We do not yet support reloading deferred libraries.
532 LibraryPrefix& prefix = LibraryPrefix::Handle();
533 LibraryPrefixIterator it(replacement);
534 while (it.HasNext()) {
535 prefix = it.GetNext();
536 if (prefix.is_deferred_load()) {
537 const String& lib_url = String::Handle(replacement.url());
538 const String& prefix_name = String::Handle(prefix.name());
539 IRC->ReportError(String::Handle(String::NewFormatted(
540 "Reloading support for deferred loading has not yet been implemented:"
541 " library '%s' has deferred import '%s'",
542 lib_url.ToCString(), prefix_name.ToCString())));
543 return false;
544 }
545 }
530 return true; 546 return true;
531 } 547 }
532 548
533 549
534 static const Function* static_call_target = NULL; 550 static const Function* static_call_target = NULL;
535 551
536 void ICData::Reset() const { 552 void ICData::Reset() const {
537 if (is_static_call()) { 553 if (is_static_call()) {
538 const Function& old_target = Function::Handle(GetTargetAt(0)); 554 const Function& old_target = Function::Handle(GetTargetAt(0));
539 if (old_target.IsNull()) { 555 if (old_target.IsNull()) {
(...skipping 20 matching lines...) Expand all
560 } 576 }
561 ClearAndSetStaticTarget(new_target); 577 ClearAndSetStaticTarget(new_target);
562 } else { 578 } else {
563 ClearWithSentinel(); 579 ClearWithSentinel();
564 } 580 }
565 } 581 }
566 582
567 #endif // !PRODUCT 583 #endif // !PRODUCT
568 584
569 } // namespace dart. 585 } // namespace dart.
OLDNEW
« no previous file with comments | « runtime/vm/isolate_reload.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698