| 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/bootstrap.h" | 9 #include "vm/bootstrap.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 LocalVariable* instantiator = NULL; | 864 LocalVariable* instantiator = NULL; |
| 865 const bool kTestOnly = true; | 865 const bool kTestOnly = true; |
| 866 if (parser.current_function().IsInFactoryScope()) { | 866 if (parser.current_function().IsInFactoryScope()) { |
| 867 instantiator = parser.LookupTypeArgumentsParameter(node_sequence->scope(), | 867 instantiator = parser.LookupTypeArgumentsParameter(node_sequence->scope(), |
| 868 kTestOnly); | 868 kTestOnly); |
| 869 } else { | 869 } else { |
| 870 instantiator = parser.LookupReceiver(node_sequence->scope(), kTestOnly); | 870 instantiator = parser.LookupReceiver(node_sequence->scope(), kTestOnly); |
| 871 } | 871 } |
| 872 if (!parser.current_function().IsLocalFunction() || | 872 if (!parser.current_function().IsLocalFunction() || |
| 873 ((instantiator != NULL) && instantiator->is_captured())) { | 873 ((instantiator != NULL) && instantiator->is_captured())) { |
| 874 parsed_function->set_instantiator( | 874 parsed_function->set_instantiator(instantiator); |
| 875 new LoadLocalNode(node_sequence->token_pos(), instantiator)); | |
| 876 } | 875 } |
| 877 } | 876 } |
| 878 | 877 |
| 879 parsed_function->set_default_parameter_values(default_parameter_values); | 878 parsed_function->set_default_parameter_values(default_parameter_values); |
| 880 } | 879 } |
| 881 | 880 |
| 882 | 881 |
| 883 RawObject* Parser::ParseMetadata(const Class& cls, intptr_t token_pos) { | 882 RawObject* Parser::ParseMetadata(const Class& cls, intptr_t token_pos) { |
| 884 Isolate* isolate = Isolate::Current(); | 883 Isolate* isolate = Isolate::Current(); |
| 885 StackZone zone(isolate); | 884 StackZone zone(isolate); |
| (...skipping 10069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10955 void Parser::SkipQualIdent() { | 10954 void Parser::SkipQualIdent() { |
| 10956 ASSERT(IsIdentifier()); | 10955 ASSERT(IsIdentifier()); |
| 10957 ConsumeToken(); | 10956 ConsumeToken(); |
| 10958 if (CurrentToken() == Token::kPERIOD) { | 10957 if (CurrentToken() == Token::kPERIOD) { |
| 10959 ConsumeToken(); // Consume the kPERIOD token. | 10958 ConsumeToken(); // Consume the kPERIOD token. |
| 10960 ExpectIdentifier("identifier expected after '.'"); | 10959 ExpectIdentifier("identifier expected after '.'"); |
| 10961 } | 10960 } |
| 10962 } | 10961 } |
| 10963 | 10962 |
| 10964 } // namespace dart | 10963 } // namespace dart |
| OLD | NEW |