| 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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 CompilerStats::num_functions_compiled++; | 772 CompilerStats::num_functions_compiled++; |
| 773 ASSERT(isolate->long_jump_base()->IsSafeToJump()); | 773 ASSERT(isolate->long_jump_base()->IsSafeToJump()); |
| 774 ASSERT(parsed_function != NULL); | 774 ASSERT(parsed_function != NULL); |
| 775 const Function& func = parsed_function->function(); | 775 const Function& func = parsed_function->function(); |
| 776 const Script& script = Script::Handle(isolate, func.script()); | 776 const Script& script = Script::Handle(isolate, func.script()); |
| 777 Parser parser(script, parsed_function, func.token_pos()); | 777 Parser parser(script, parsed_function, func.token_pos()); |
| 778 SequenceNode* node_sequence = NULL; | 778 SequenceNode* node_sequence = NULL; |
| 779 Array& default_parameter_values = Array::ZoneHandle(isolate, Array::null()); | 779 Array& default_parameter_values = Array::ZoneHandle(isolate, Array::null()); |
| 780 switch (func.kind()) { | 780 switch (func.kind()) { |
| 781 case RawFunction::kRegularFunction: | 781 case RawFunction::kRegularFunction: |
| 782 case RawFunction::kEvalFunction: |
| 782 case RawFunction::kClosureFunction: | 783 case RawFunction::kClosureFunction: |
| 783 case RawFunction::kGetterFunction: | 784 case RawFunction::kGetterFunction: |
| 784 case RawFunction::kSetterFunction: | 785 case RawFunction::kSetterFunction: |
| 785 case RawFunction::kConstructor: | 786 case RawFunction::kConstructor: |
| 786 // The call to a redirecting factory is redirected. | 787 // The call to a redirecting factory is redirected. |
| 787 ASSERT(!func.IsRedirectingFactory()); | 788 ASSERT(!func.IsRedirectingFactory()); |
| 788 if (!func.IsImplicitConstructor()) { | 789 if (!func.IsImplicitConstructor()) { |
| 789 parser.SkipFunctionPreamble(); | 790 parser.SkipFunctionPreamble(); |
| 790 } | 791 } |
| 791 node_sequence = parser.ParseFunc(func, &default_parameter_values); | 792 node_sequence = parser.ParseFunc(func, &default_parameter_values); |
| (...skipping 10267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11059 void Parser::SkipQualIdent() { | 11060 void Parser::SkipQualIdent() { |
| 11060 ASSERT(IsIdentifier()); | 11061 ASSERT(IsIdentifier()); |
| 11061 ConsumeToken(); | 11062 ConsumeToken(); |
| 11062 if (CurrentToken() == Token::kPERIOD) { | 11063 if (CurrentToken() == Token::kPERIOD) { |
| 11063 ConsumeToken(); // Consume the kPERIOD token. | 11064 ConsumeToken(); // Consume the kPERIOD token. |
| 11064 ExpectIdentifier("identifier expected after '.'"); | 11065 ExpectIdentifier("identifier expected after '.'"); |
| 11065 } | 11066 } |
| 11066 } | 11067 } |
| 11067 | 11068 |
| 11068 } // namespace dart | 11069 } // namespace dart |
| OLD | NEW |