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

Unified Diff: runtime/vm/parser.cc

Issue 16434015: Move code setting super type of class Object to null from object.cc to parser.cc (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 23841)
+++ runtime/vm/parser.cc (working copy)
@@ -3334,10 +3334,12 @@
super_type = ParseMixins(super_type);
}
} else {
- // No extends clause: implicitly extend Object.
- super_type = Type::ObjectType();
+ // No extends clause: implicitly extend Object, unless Object itself.
+ if (!cls.IsObjectClass()) {
+ super_type = Type::ObjectType();
+ }
}
- ASSERT(!super_type.IsNull());
+ ASSERT(!super_type.IsNull() || cls.IsObjectClass());
cls.set_super_type(super_type);
if (CurrentToken() == Token::kIMPLEMENTS) {
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698