Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: runtime/vm/parser.cc

Issue 11364166: Make sure that ParsedFunction holds onto zone handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/parser.h ('k') | runtime/vm/parser_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/parser.h ('k') | runtime/vm/parser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698