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

Unified Diff: runtime/vm/object.cc

Issue 1392893003: In precompilation, finalize all classes eagerly. Use the stable class hierarchy for doing CHA based… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Sync Created 5 years, 2 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 | « runtime/vm/isolate.cc ('k') | runtime/vm/precompiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 2b438ec73f37aa541487a1e452b614f9f8081d95..1cc0687267f40f8289afbce2cd7f362cae3d79f6 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -2780,6 +2780,9 @@ void Class::set_invocation_dispatcher_cache(const Array& cache) const {
void Class::Finalize() const {
+ // Even if all regular classes are prefinalized (precompilation), signature
+ // classes may be added later when we encounter local functions.
+ ASSERT(IsSignatureClass() || !Isolate::Current()->all_classes_finalized());
ASSERT(!is_finalized());
// Prefinalized classes have a VM internal representation and no Dart fields.
// Their instance size is precomputed and field offsets are known.
@@ -3044,7 +3047,6 @@ RawObject* Class::Evaluate(const String& expr,
// Ensure that top level parsing of the class has been done.
-// TODO(24109): Migrate interface to Thread*.
RawError* Class::EnsureIsFinalized(Thread* thread) const {
// Finalized classes have already been parsed.
if (is_finalized()) {
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/precompiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698