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

Unified Diff: runtime/vm/object.cc

Issue 10797031: Add missing type finalization for function literals not assigned to a function (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 9780)
+++ runtime/vm/object.cc (working copy)
@@ -1130,12 +1130,15 @@
}
// Return the first canonical signature type if already computed.
const Array& signature_types = Array::Handle(canonical_types());
+ // The canonical_types array is initialized to the empty array.
+ ASSERT(!signature_types.IsNull());
if (signature_types.Length() > 0) {
+ // At most one signature type per signature class.
+ ASSERT(signature_types.Length() == 1);
Type& signature_type = Type::Handle();
signature_type ^= signature_types.At(0);
- if (!signature_type.IsNull()) {
- return signature_type.raw();
- }
+ ASSERT(!signature_type.IsNull());
+ return signature_type.raw();
}
// A signature class extends class Instance and is parameterized in the same
// way as the owner class of its non-static signature function.
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698