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

Unified Diff: runtime/vm/dart.cc

Issue 2616763003: Fix duplication of the megamorphic miss function when running a JIT app snapshot. (Closed)
Patch Set: comment Created 3 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
« no previous file with comments | « no previous file | runtime/vm/megamorphic_cache_table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 2f9e6d7b694a6bb8693440f72a489ccac5f875de..42b6cfdb169d605d14c8ad7f84d071603dbe1bdb 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -580,13 +580,16 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer,
StubCode::Init(I);
}
-#if !defined(DART_PRECOMPILED_RUNTIME)
- // When running precompiled, the megamorphic miss function/code comes from the
- // snapshot.
- if (!Snapshot::IncludesCode(Dart::snapshot_kind())) {
+#if defined(DART_PRECOMPILED_RUNTIME)
+ // AOT: The megamorphic miss function and code come from the snapshot.
+ ASSERT(I->object_store()->megamorphic_miss_code() != Code::null());
+#else
+ // JIT: The megamorphic miss function and code come from the snapshot in JIT
+ // app snapshot, otherwise create them.
+ if (I->object_store()->megamorphic_miss_code() == Code::null()) {
MegamorphicCacheTable::InitMissHandler(I);
}
-#endif
+#endif // defined(DART_PRECOMPILED_RUNTIME)
const Code& miss_code =
Code::Handle(I->object_store()->megamorphic_miss_code());
« no previous file with comments | « no previous file | runtime/vm/megamorphic_cache_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698