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

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

Issue 20503003: Delay resolution of redirecting factory targets in order to avoid class (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 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 9508 matching lines...) Expand 10 before | Expand all | Expand 10 after
9519 external_constructor_name.ToCString()); 9519 external_constructor_name.ToCString());
9520 const Error& error = Error::Handle(type.malformed_error()); 9520 const Error& error = Error::Handle(type.malformed_error());
9521 ErrorMsg(error); 9521 ErrorMsg(error);
9522 } 9522 }
9523 return ThrowNoSuchMethodError(call_pos, 9523 return ThrowNoSuchMethodError(call_pos,
9524 type_class, 9524 type_class,
9525 external_constructor_name, 9525 external_constructor_name,
9526 InvocationMirror::kConstructor, 9526 InvocationMirror::kConstructor,
9527 InvocationMirror::kMethod); 9527 InvocationMirror::kMethod);
9528 } else if (constructor.IsRedirectingFactory()) { 9528 } else if (constructor.IsRedirectingFactory()) {
9529 ClassFinalizer::ResolveRedirectingFactory(type_class, constructor);
9529 Type& redirect_type = Type::Handle(constructor.RedirectionType()); 9530 Type& redirect_type = Type::Handle(constructor.RedirectionType());
9530 if (!redirect_type.IsMalformed() && !redirect_type.IsInstantiated()) { 9531 if (!redirect_type.IsMalformed() && !redirect_type.IsInstantiated()) {
9531 // The type arguments of the redirection type are instantiated from the 9532 // The type arguments of the redirection type are instantiated from the
9532 // type arguments of the parsed type of the 'new' or 'const' expression. 9533 // type arguments of the parsed type of the 'new' or 'const' expression.
9533 Error& malformed_error = Error::Handle(); 9534 Error& malformed_error = Error::Handle();
9534 redirect_type ^= redirect_type.InstantiateFrom(type_arguments, 9535 redirect_type ^= redirect_type.InstantiateFrom(type_arguments,
9535 &malformed_error); 9536 &malformed_error);
9536 if (!malformed_error.IsNull()) { 9537 if (!malformed_error.IsNull()) {
9537 redirect_type.set_malformed_error(malformed_error); 9538 redirect_type.set_malformed_error(malformed_error);
9538 } 9539 }
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
10208 void Parser::SkipQualIdent() { 10209 void Parser::SkipQualIdent() {
10209 ASSERT(IsIdentifier()); 10210 ASSERT(IsIdentifier());
10210 ConsumeToken(); 10211 ConsumeToken();
10211 if (CurrentToken() == Token::kPERIOD) { 10212 if (CurrentToken() == Token::kPERIOD) {
10212 ConsumeToken(); // Consume the kPERIOD token. 10213 ConsumeToken(); // Consume the kPERIOD token.
10213 ExpectIdentifier("identifier expected after '.'"); 10214 ExpectIdentifier("identifier expected after '.'");
10214 } 10215 }
10215 } 10216 }
10216 10217
10217 } // namespace dart 10218 } // 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