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

Unified Diff: runtime/vm/isolate_reload.cc

Issue 2194333002: RELOAD: Maintain identity of static tear-offs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/isolate_reload_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate_reload.cc
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 9a67be9f5369bfc3a842bc4857c033dc03e9fc69..d0b999baae00bc25897000eec4ccd6cfa8e8d345 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -960,9 +960,8 @@ void IsolateReloadContext::Commit() {
// Copy static field values from the old classes to the new classes.
// Patch fields and functions in the old classes so that they retain
// the old script.
- Class& cls = Class::Handle();
+ Class& old_cls = Class::Handle();
Class& new_cls = Class::Handle();
-
UnorderedHashMap<ClassMapTraits> class_map(class_map_storage_);
{
@@ -970,15 +969,16 @@ void IsolateReloadContext::Commit() {
while (it.MoveNext()) {
const intptr_t entry = it.Current();
new_cls = Class::RawCast(class_map.GetKey(entry));
- cls = Class::RawCast(class_map.GetPayload(entry, 0));
- if (new_cls.raw() != cls.raw()) {
- ASSERT(new_cls.is_enum_class() == cls.is_enum_class());
+ old_cls = Class::RawCast(class_map.GetPayload(entry, 0));
+ if (new_cls.raw() != old_cls.raw()) {
+ ASSERT(new_cls.is_enum_class() == old_cls.is_enum_class());
if (new_cls.is_enum_class() && new_cls.is_finalized()) {
- new_cls.ReplaceEnum(cls);
+ new_cls.ReplaceEnum(old_cls);
} else {
- new_cls.CopyStaticFieldValues(cls);
+ new_cls.CopyStaticFieldValues(old_cls);
}
- cls.PatchFieldsAndFunctions();
+ old_cls.PatchFieldsAndFunctions();
+ old_cls.MigrateImplicitStaticClosures(this, new_cls);
}
}
}
« no previous file with comments | « no previous file | runtime/vm/isolate_reload_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698