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

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

Issue 15689012: More cleanup to avoid creation of redundant handles (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months 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
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 #ifndef VM_PARSER_H_ 5 #ifndef VM_PARSER_H_
6 #define VM_PARSER_H_ 6 #define VM_PARSER_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "lib/invocation_mirror.h" 10 #include "lib/invocation_mirror.h"
11 #include "vm/ast.h" 11 #include "vm/ast.h"
12 #include "vm/class_finalizer.h" 12 #include "vm/class_finalizer.h"
13 #include "vm/compiler_stats.h" 13 #include "vm/compiler_stats.h"
14 #include "vm/scanner.h" 14 #include "vm/scanner.h"
15 15
16 namespace dart { 16 namespace dart {
17 17
18 // Forward declarations. 18 // Forward declarations.
19 class Function; 19 class Function;
20 class LiteralToken;
20 class Script; 21 class Script;
21 class TokenStream; 22 class TokenStream;
22 23
23 struct TopLevel; 24 struct TopLevel;
24 class ClassDesc; 25 class ClassDesc;
25 struct MemberDesc; 26 struct MemberDesc;
26 struct ParamList; 27 struct ParamList;
27 struct QualIdent; 28 struct QualIdent;
28 struct CatchParamDesc; 29 struct CatchParamDesc;
29 struct FieldInitExpression; 30 struct FieldInitExpression;
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 // constructor initializer expressions to handle ambiguous grammar. 639 // constructor initializer expressions to handle ambiguous grammar.
639 bool SetAllowFunctionLiterals(bool value); 640 bool SetAllowFunctionLiterals(bool value);
640 bool allow_function_literals_; 641 bool allow_function_literals_;
641 642
642 // The function currently being compiled. 643 // The function currently being compiled.
643 ParsedFunction* parsed_function_; 644 ParsedFunction* parsed_function_;
644 645
645 // The function currently being parsed. 646 // The function currently being parsed.
646 Function& innermost_function_; 647 Function& innermost_function_;
647 648
649 // Current literal token.
650 LiteralToken& literal_token_;
651
648 // The class currently being parsed, or the owner class of the 652 // The class currently being parsed, or the owner class of the
649 // function currently being parsed. It is used for primary identifier lookups. 653 // function currently being parsed. It is used for primary identifier lookups.
650 Class& current_class_; 654 Class& current_class_;
651 655
652 // The current library (and thus class dictionary) used to resolve names. 656 // The current library (and thus class dictionary) used to resolve names.
653 // When parsing a function, this is the library in which the function 657 // When parsing a function, this is the library in which the function
654 // is defined. This can be the library in which the current_class_ is 658 // is defined. This can be the library in which the current_class_ is
655 // defined, or the library of a mixin class where the function originates. 659 // defined, or the library of a mixin class where the function originates.
656 Library& library_; 660 Library& library_;
657 661
658 // List of try blocks seen so far, this is used to generate inlined finally 662 // List of try blocks seen so far, this is used to generate inlined finally
659 // code at all points in the try block where an exit from the block is 663 // code at all points in the try block where an exit from the block is
660 // done using 'return', 'break' or 'continue' statements. 664 // done using 'return', 'break' or 'continue' statements.
661 TryBlocks* try_blocks_list_; 665 TryBlocks* try_blocks_list_;
662 666
663 DISALLOW_COPY_AND_ASSIGN(Parser); 667 DISALLOW_COPY_AND_ASSIGN(Parser);
664 }; 668 };
665 669
666 } // namespace dart 670 } // namespace dart
667 671
668 #endif // VM_PARSER_H_ 672 #endif // VM_PARSER_H_
OLDNEW
« runtime/vm/object.h ('K') | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698