| 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 #ifndef RUNTIME_VM_PARSER_H_ | 5 #ifndef RUNTIME_VM_PARSER_H_ |
| 6 #define RUNTIME_VM_PARSER_H_ | 6 #define RUNTIME_VM_PARSER_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 | 9 |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 void CacheConstantValue(TokenPosition token_pos, const Instance& value); | 942 void CacheConstantValue(TokenPosition token_pos, const Instance& value); |
| 943 bool GetCachedConstant(TokenPosition token_pos, Instance* value); | 943 bool GetCachedConstant(TokenPosition token_pos, Instance* value); |
| 944 | 944 |
| 945 Thread* thread() const { return thread_; } | 945 Thread* thread() const { return thread_; } |
| 946 Isolate* isolate() const { return isolate_; } | 946 Isolate* isolate() const { return isolate_; } |
| 947 Zone* zone() const { return thread_->zone(); } | 947 Zone* zone() const { return thread_->zone(); } |
| 948 | 948 |
| 949 Thread* thread_; // Cached current thread. | 949 Thread* thread_; // Cached current thread. |
| 950 Isolate* isolate_; // Cached current isolate. | 950 Isolate* isolate_; // Cached current isolate. |
| 951 | 951 |
| 952 // It is Heap::kNew for mutator thread and Heap::kOld for other threads (e.g. |
| 953 // background compiler). |
| 954 Heap::Space allocation_space_; |
| 955 |
| 952 Script& script_; | 956 Script& script_; |
| 953 TokenStream::Iterator tokens_iterator_; | 957 TokenStream::Iterator tokens_iterator_; |
| 954 Token::Kind token_kind_; // Cached token kind for current token. | 958 Token::Kind token_kind_; // Cached token kind for current token. |
| 955 TokenPosition prev_token_pos_; | 959 TokenPosition prev_token_pos_; |
| 956 Block* current_block_; | 960 Block* current_block_; |
| 957 | 961 |
| 958 // is_top_level_ is true if parsing the "top level" of a compilation unit, | 962 // is_top_level_ is true if parsing the "top level" of a compilation unit, |
| 959 // that is class definitions, function type aliases, global functions, | 963 // that is class definitions, function type aliases, global functions, |
| 960 // global variables. | 964 // global variables. |
| 961 bool is_top_level_; | 965 bool is_top_level_; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 | 1015 |
| 1012 intptr_t recursion_counter_; | 1016 intptr_t recursion_counter_; |
| 1013 friend class RecursionChecker; | 1017 friend class RecursionChecker; |
| 1014 | 1018 |
| 1015 DISALLOW_COPY_AND_ASSIGN(Parser); | 1019 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 1016 }; | 1020 }; |
| 1017 | 1021 |
| 1018 } // namespace dart | 1022 } // namespace dart |
| 1019 | 1023 |
| 1020 #endif // RUNTIME_VM_PARSER_H_ | 1024 #endif // RUNTIME_VM_PARSER_H_ |
| OLD | NEW |