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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/parser.h" 5 #include "vm/parser.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 3316 matching lines...) Expand 10 before | Expand all | Expand 10 after
3327 } 3327 }
3328 if (super_type.IsDynamicType()) { 3328 if (super_type.IsDynamicType()) {
3329 ErrorMsg(type_pos, 3329 ErrorMsg(type_pos,
3330 "class '%s' may not extend 'dynamic'", 3330 "class '%s' may not extend 'dynamic'",
3331 class_name.ToCString()); 3331 class_name.ToCString());
3332 } 3332 }
3333 if (CurrentToken() == Token::kWITH) { 3333 if (CurrentToken() == Token::kWITH) {
3334 super_type = ParseMixins(super_type); 3334 super_type = ParseMixins(super_type);
3335 } 3335 }
3336 } else { 3336 } else {
3337 // No extends clause: implicitly extend Object. 3337 // No extends clause: implicitly extend Object, unless Object itself.
3338 super_type = Type::ObjectType(); 3338 if (!cls.IsObjectClass()) {
3339 super_type = Type::ObjectType();
3340 }
3339 } 3341 }
3340 ASSERT(!super_type.IsNull()); 3342 ASSERT(!super_type.IsNull() || cls.IsObjectClass());
3341 cls.set_super_type(super_type); 3343 cls.set_super_type(super_type);
3342 3344
3343 if (CurrentToken() == Token::kIMPLEMENTS) { 3345 if (CurrentToken() == Token::kIMPLEMENTS) {
3344 ParseInterfaceList(cls); 3346 ParseInterfaceList(cls);
3345 } 3347 }
3346 3348
3347 if (is_abstract) { 3349 if (is_abstract) {
3348 cls.set_is_abstract(); 3350 cls.set_is_abstract();
3349 } 3351 }
3350 if (is_patch) { 3352 if (is_patch) {
(...skipping 6637 matching lines...) Expand 10 before | Expand all | Expand 10 after
9988 void Parser::SkipQualIdent() { 9990 void Parser::SkipQualIdent() {
9989 ASSERT(IsIdentifier()); 9991 ASSERT(IsIdentifier());
9990 ConsumeToken(); 9992 ConsumeToken();
9991 if (CurrentToken() == Token::kPERIOD) { 9993 if (CurrentToken() == Token::kPERIOD) {
9992 ConsumeToken(); // Consume the kPERIOD token. 9994 ConsumeToken(); // Consume the kPERIOD token.
9993 ExpectIdentifier("identifier expected after '.'"); 9995 ExpectIdentifier("identifier expected after '.'");
9994 } 9996 }
9995 } 9997 }
9996 9998
9997 } // namespace dart 9999 } // namespace dart
OLDNEW
« 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