| 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 #include "vm/flags.h" | 6 #include "vm/flags.h" |
| 7 | 7 |
| 8 #ifndef DART_PRECOMPILED_RUNTIME | 8 #ifndef DART_PRECOMPILED_RUNTIME |
| 9 | 9 |
| 10 #include "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| (...skipping 4659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4670 while (CurrentToken() != Token::kLBRACE) { | 4670 while (CurrentToken() != Token::kLBRACE) { |
| 4671 ConsumeToken(); | 4671 ConsumeToken(); |
| 4672 } | 4672 } |
| 4673 ExpectToken(Token::kLBRACE); | 4673 ExpectToken(Token::kLBRACE); |
| 4674 while (CurrentToken() != Token::kRBRACE) { | 4674 while (CurrentToken() != Token::kRBRACE) { |
| 4675 TokenPosition metadata_pos = SkipMetadata(); | 4675 TokenPosition metadata_pos = SkipMetadata(); |
| 4676 ParseClassMemberDefinition(&members, metadata_pos); | 4676 ParseClassMemberDefinition(&members, metadata_pos); |
| 4677 } | 4677 } |
| 4678 ExpectToken(Token::kRBRACE); | 4678 ExpectToken(Token::kRBRACE); |
| 4679 | 4679 |
| 4680 if (cls.LookupTypeParameter(class_name) != TypeParameter::null()) { |
| 4681 ReportError(class_pos, |
| 4682 "class name conflicts with type parameter '%s'", |
| 4683 class_name.ToCString()); |
| 4684 } |
| 4680 CheckConstructors(&members); | 4685 CheckConstructors(&members); |
| 4681 | 4686 |
| 4682 // Need to compute this here since MakeArray() will clear the | 4687 // Need to compute this here since MakeArray() will clear the |
| 4683 // functions array in members. | 4688 // functions array in members. |
| 4684 const bool need_implicit_constructor = | 4689 const bool need_implicit_constructor = |
| 4685 !members.has_constructor() && !cls.is_patch(); | 4690 !members.has_constructor() && !cls.is_patch(); |
| 4686 | 4691 |
| 4687 cls.AddFields(members.fields()); | 4692 cls.AddFields(members.fields()); |
| 4688 | 4693 |
| 4689 // Creating a new array for functions marks the class as parsed. | 4694 // Creating a new array for functions marks the class as parsed. |
| (...skipping 9935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14625 const ArgumentListNode& function_args, | 14630 const ArgumentListNode& function_args, |
| 14626 const LocalVariable* temp_for_last_arg, | 14631 const LocalVariable* temp_for_last_arg, |
| 14627 bool is_super_invocation) { | 14632 bool is_super_invocation) { |
| 14628 UNREACHABLE(); | 14633 UNREACHABLE(); |
| 14629 return NULL; | 14634 return NULL; |
| 14630 } | 14635 } |
| 14631 | 14636 |
| 14632 } // namespace dart | 14637 } // namespace dart |
| 14633 | 14638 |
| 14634 #endif // DART_PRECOMPILED_RUNTIME | 14639 #endif // DART_PRECOMPILED_RUNTIME |
| OLD | NEW |