| OLD | NEW |
| 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 "platform/utils.h" | 8 #include "platform/utils.h" |
| 9 #include "vm/ast_transformer.h" | 9 #include "vm/ast_transformer.h" |
| 10 #include "vm/bootstrap.h" | 10 #include "vm/bootstrap.h" |
| (...skipping 9414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9425 current_member_->has_static && !current_member_->has_factory; | 9425 current_member_->has_static && !current_member_->has_factory; |
| 9426 } | 9426 } |
| 9427 ASSERT(!current_function().IsNull()); | 9427 ASSERT(!current_function().IsNull()); |
| 9428 return | 9428 return |
| 9429 current_function().is_static() && !current_function().IsInFactoryScope(); | 9429 current_function().is_static() && !current_function().IsInFactoryScope(); |
| 9430 } | 9430 } |
| 9431 | 9431 |
| 9432 | 9432 |
| 9433 const AbstractType* Parser::ReceiverType(const Class& cls) { | 9433 const AbstractType* Parser::ReceiverType(const Class& cls) { |
| 9434 ASSERT(!cls.IsNull()); | 9434 ASSERT(!cls.IsNull()); |
| 9435 TypeArguments& type_arguments = TypeArguments::Handle(); | 9435 const TypeArguments& type_arguments = TypeArguments::Handle( |
| 9436 if (cls.NumTypeParameters() > 0) { | 9436 I, |
| 9437 type_arguments = cls.type_parameters(); | 9437 (cls.NumTypeParameters() > 0) ? |
| 9438 } | 9438 cls.type_parameters() : TypeArguments::null()); |
| 9439 AbstractType& type = AbstractType::ZoneHandle( | 9439 AbstractType& type = AbstractType::ZoneHandle( |
| 9440 Type::New(cls, type_arguments, cls.token_pos())); | 9440 I, Type::New(cls, type_arguments, cls.token_pos())); |
| 9441 if (cls.is_type_finalized()) { | 9441 if (cls.is_type_finalized()) { |
| 9442 type ^= ClassFinalizer::FinalizeType( | 9442 type ^= ClassFinalizer::FinalizeType( |
| 9443 cls, type, ClassFinalizer::kCanonicalizeWellFormed); | 9443 cls, type, ClassFinalizer::kCanonicalizeWellFormed); |
| 9444 // Note that the receiver type may now be a malbounded type. | 9444 // Note that the receiver type may now be a malbounded type. |
| 9445 } | 9445 } |
| 9446 return &type; | 9446 return &type; |
| 9447 } | 9447 } |
| 9448 | 9448 |
| 9449 | 9449 |
| 9450 bool Parser::IsInstantiatorRequired() const { | 9450 bool Parser::IsInstantiatorRequired() const { |
| (...skipping 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11520 void Parser::SkipQualIdent() { | 11520 void Parser::SkipQualIdent() { |
| 11521 ASSERT(IsIdentifier()); | 11521 ASSERT(IsIdentifier()); |
| 11522 ConsumeToken(); | 11522 ConsumeToken(); |
| 11523 if (CurrentToken() == Token::kPERIOD) { | 11523 if (CurrentToken() == Token::kPERIOD) { |
| 11524 ConsumeToken(); // Consume the kPERIOD token. | 11524 ConsumeToken(); // Consume the kPERIOD token. |
| 11525 ExpectIdentifier("identifier expected after '.'"); | 11525 ExpectIdentifier("identifier expected after '.'"); |
| 11526 } | 11526 } |
| 11527 } | 11527 } |
| 11528 | 11528 |
| 11529 } // namespace dart | 11529 } // namespace dart |
| OLD | NEW |