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 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 "platform/assert.h" | 10 #include "platform/assert.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 first_parameter_index_(0), | 108 first_parameter_index_(0), |
109 first_stack_local_index_(0), | 109 first_stack_local_index_(0), |
110 num_copied_params_(0), | 110 num_copied_params_(0), |
111 num_stack_locals_(0), | 111 num_stack_locals_(0), |
112 have_seen_await_expr_(false), | 112 have_seen_await_expr_(false), |
113 kernel_scopes_(NULL) { | 113 kernel_scopes_(NULL) { |
114 ASSERT(function.IsZoneHandle()); | 114 ASSERT(function.IsZoneHandle()); |
115 // Every function has a local variable for the current context. | 115 // Every function has a local variable for the current context. |
116 LocalVariable* temp = new(zone()) LocalVariable( | 116 LocalVariable* temp = new(zone()) LocalVariable( |
117 function.token_pos(), | 117 function.token_pos(), |
| 118 function.token_pos(), |
118 Symbols::CurrentContextVar(), | 119 Symbols::CurrentContextVar(), |
119 Object::dynamic_type()); | 120 Object::dynamic_type()); |
120 ASSERT(temp != NULL); | 121 ASSERT(temp != NULL); |
121 current_context_var_ = temp; | 122 current_context_var_ = temp; |
122 } | 123 } |
123 | 124 |
124 const Function& function() const { return function_; } | 125 const Function& function() const { return function_; } |
125 const Code& code() const { return code_; } | 126 const Code& code() const { return code_; } |
126 | 127 |
127 SequenceNode* node_sequence() const { return node_sequence_; } | 128 SequenceNode* node_sequence() const { return node_sequence_; } |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 | 989 |
989 intptr_t recursion_counter_; | 990 intptr_t recursion_counter_; |
990 friend class RecursionChecker; | 991 friend class RecursionChecker; |
991 | 992 |
992 DISALLOW_COPY_AND_ASSIGN(Parser); | 993 DISALLOW_COPY_AND_ASSIGN(Parser); |
993 }; | 994 }; |
994 | 995 |
995 } // namespace dart | 996 } // namespace dart |
996 | 997 |
997 #endif // VM_PARSER_H_ | 998 #endif // VM_PARSER_H_ |
OLD | NEW |