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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 22425006: Fix equality of implicit closures in the Dart VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: new simpler approach Created 7 years, 4 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
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 25920)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -1528,9 +1528,6 @@
name.ToCString());
}
cls.set_is_type_finalized();
- // Signature classes extend Object. No need to add this class to the direct
- // subclasses of Object.
- ASSERT(super_type.IsNull() || super_type.IsObjectType());
Florian Schneider 2013/08/12 18:03:06 Do we rely on this assertion somewhere else?
// The type parameters of signature classes may have bounds.
FinalizeUpperBounds(cls);
@@ -1880,10 +1877,14 @@
CLASS_LIST_TYPED_DATA(DO_NOT_EXTEND_TYPED_DATA_CLASSES)
#undef DO_NOT_EXTEND_TYPED_DATA_CLASSES
case kByteDataViewCid:
- case kDartFunctionCid:
case kWeakPropertyCid:
is_error = true;
break;
+ case kDartFunctionCid:
+ // Signature classes, which are compiler generated and represent a
Ivan Posva 2013/08/13 07:35:09 I don't think this is a valid restriction.
Florian Schneider 2013/08/13 14:52:20 Done.
+ // function type, are allowed to extend the Function class.
+ if (!cls.IsSignatureClass()) is_error = true;
+ break;
default: {
// Special case: classes for which we don't have a known class id.
if (super_type.IsDoubleType() ||
@@ -1935,7 +1936,7 @@
interface.IsIntType() ||
interface.IsDoubleType() ||
interface.IsStringType() ||
- (interface.IsFunctionType() && !cls.IsSignatureClass()) ||
+ interface.IsFunctionType() ||
interface.IsDynamicType()) {
const Script& script = Script::Handle(cls.script());
ReportError(script, cls.token_pos(),

Powered by Google App Engine
This is Rietveld 408576698