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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 828353002: Patch classes do not need to be finalized (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 12 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 42584)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -2306,6 +2306,14 @@
if (cls.is_finalized()) {
return;
}
+ if (cls.is_patch()) {
+ // The fields and functions of a patch class are copied to the
+ // patched class after parsing. There is nothing to finalize.
Ivan Posva 2015/01/03 01:14:19 We should also make sure that we do not waste a cl
hausner 2015/01/05 20:56:29 As per our off-line conversation, I'm leaving this
+ ASSERT(Array::Handle(cls.functions()).Length() == 0);
+ ASSERT(Array::Handle(cls.fields()).Length() == 0);
+ cls.set_is_finalized();
+ return;
+ }
if (FLAG_trace_class_finalization) {
OS::Print("Finalize %s\n", cls.ToCString());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698