| 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 "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/compiler_stats.h" | 10 #include "vm/compiler_stats.h" |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 | 765 |
| 766 void Parser::ParseFunction(ParsedFunction* parsed_function) { | 766 void Parser::ParseFunction(ParsedFunction* parsed_function) { |
| 767 TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer); | 767 TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer); |
| 768 Isolate* isolate = Isolate::Current(); | 768 Isolate* isolate = Isolate::Current(); |
| 769 ASSERT(isolate->long_jump_base()->IsSafeToJump()); | 769 ASSERT(isolate->long_jump_base()->IsSafeToJump()); |
| 770 ASSERT(parsed_function != NULL); | 770 ASSERT(parsed_function != NULL); |
| 771 const Function& func = parsed_function->function(); | 771 const Function& func = parsed_function->function(); |
| 772 const Script& script = Script::Handle(isolate, func.script()); | 772 const Script& script = Script::Handle(isolate, func.script()); |
| 773 Parser parser(script, func, func.token_pos()); | 773 Parser parser(script, func, func.token_pos()); |
| 774 SequenceNode* node_sequence = NULL; | 774 SequenceNode* node_sequence = NULL; |
| 775 Array& default_parameter_values = Array::Handle(isolate, Array::null()); | 775 Array& default_parameter_values = Array::ZoneHandle(isolate, Array::null()); |
| 776 switch (func.kind()) { | 776 switch (func.kind()) { |
| 777 case RawFunction::kRegularFunction: | 777 case RawFunction::kRegularFunction: |
| 778 case RawFunction::kClosureFunction: | 778 case RawFunction::kClosureFunction: |
| 779 case RawFunction::kGetterFunction: | 779 case RawFunction::kGetterFunction: |
| 780 case RawFunction::kSetterFunction: | 780 case RawFunction::kSetterFunction: |
| 781 case RawFunction::kConstructor: | 781 case RawFunction::kConstructor: |
| 782 // The call to a redirecting factory is redirected. | 782 // The call to a redirecting factory is redirected. |
| 783 ASSERT(!func.IsRedirectingFactory()); | 783 ASSERT(!func.IsRedirectingFactory()); |
| 784 node_sequence = parser.ParseFunc(func, default_parameter_values); | 784 node_sequence = parser.ParseFunc(func, default_parameter_values); |
| 785 break; | 785 break; |
| (...skipping 9183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9969 void Parser::SkipQualIdent() { | 9969 void Parser::SkipQualIdent() { |
| 9970 ASSERT(IsIdentifier()); | 9970 ASSERT(IsIdentifier()); |
| 9971 ConsumeToken(); | 9971 ConsumeToken(); |
| 9972 if (CurrentToken() == Token::kPERIOD) { | 9972 if (CurrentToken() == Token::kPERIOD) { |
| 9973 ConsumeToken(); // Consume the kPERIOD token. | 9973 ConsumeToken(); // Consume the kPERIOD token. |
| 9974 ExpectIdentifier("identifier expected after '.'"); | 9974 ExpectIdentifier("identifier expected after '.'"); |
| 9975 } | 9975 } |
| 9976 } | 9976 } |
| 9977 | 9977 |
| 9978 } // namespace dart | 9978 } // namespace dart |
| OLD | NEW |