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

Side by Side Diff: runtime/vm/parser.cc

Issue 10008017: Do not require upper bounds to be resolved and finalized before comparing them (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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') | tests/language/language.status » ('j') | 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 "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 2892 matching lines...) Expand 10 before | Expand all | Expand 10 after
2903 factory_name.ident_pos)); 2903 factory_name.ident_pos));
2904 factory_class.set_library(library_); 2904 factory_class.set_library(library_);
2905 factory_class.set_is_finalized(); 2905 factory_class.set_is_finalized();
2906 ParseTypeParameters(factory_class); 2906 ParseTypeParameters(factory_class);
2907 unresolved_factory_class.set_factory_signature_class(factory_class); 2907 unresolved_factory_class.set_factory_signature_class(factory_class);
2908 interface.set_factory_class(unresolved_factory_class); 2908 interface.set_factory_class(unresolved_factory_class);
2909 // If a type parameter list is included in the default factory clause (it 2909 // If a type parameter list is included in the default factory clause (it
2910 // can be omitted), verify that it matches the list of type parameters of 2910 // can be omitted), verify that it matches the list of type parameters of
2911 // the interface in number and names. 2911 // the interface in number and names.
2912 if (factory_class.NumTypeParameters() > 0) { 2912 if (factory_class.NumTypeParameters() > 0) {
2913 const TypeArguments& interface_type_parameters = 2913 if (!AbstractTypeArguments::AreIdentical(
2914 TypeArguments::Handle(interface.type_parameters()); 2914 AbstractTypeArguments::Handle(interface.type_parameters()),
2915 const TypeArguments& factory_type_parameters = 2915 AbstractTypeArguments::Handle(factory_class.type_parameters()))) {
2916 TypeArguments::Handle(factory_class.type_parameters());
2917 if (!TypeArguments::AreIdenticalTypeParameters(interface_type_parameters,
2918 factory_type_parameters)) {
2919 const String& interface_name = String::Handle(interface.Name()); 2916 const String& interface_name = String::Handle(interface.Name());
2920 ErrorMsg(factory_name.ident_pos, 2917 ErrorMsg(factory_name.ident_pos,
2921 "mismatch in number or names of type parameters between " 2918 "mismatch in number or names of type parameters between "
2922 "interface '%s' and default factory class '%s'.\n", 2919 "interface '%s' and default factory class '%s'.\n",
2923 interface_name.ToCString(), 2920 interface_name.ToCString(),
2924 factory_name.ident->ToCString()); 2921 factory_name.ident->ToCString());
2925 } 2922 }
2926 } 2923 }
2927 } 2924 }
2928 2925
(...skipping 5352 matching lines...) Expand 10 before | Expand all | Expand 10 after
8281 void Parser::SkipQualIdent() { 8278 void Parser::SkipQualIdent() {
8282 ASSERT(IsIdentifier()); 8279 ASSERT(IsIdentifier());
8283 ConsumeToken(); 8280 ConsumeToken();
8284 if (CurrentToken() == Token::kPERIOD) { 8281 if (CurrentToken() == Token::kPERIOD) {
8285 ConsumeToken(); // Consume the kPERIOD token. 8282 ConsumeToken(); // Consume the kPERIOD token.
8286 ExpectIdentifier("identifier expected after '.'"); 8283 ExpectIdentifier("identifier expected after '.'");
8287 } 8284 }
8288 } 8285 }
8289 8286
8290 } // namespace dart 8287 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698