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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 default_parameter_values_(NULL), | 99 default_parameter_values_(NULL), |
100 first_parameter_index_(0), | 100 first_parameter_index_(0), |
101 first_stack_local_index_(0), | 101 first_stack_local_index_(0), |
102 num_copied_params_(0), | 102 num_copied_params_(0), |
103 num_stack_locals_(0), | 103 num_stack_locals_(0), |
104 have_seen_await_expr_(false) { | 104 have_seen_await_expr_(false) { |
105 ASSERT(function.IsZoneHandle()); | 105 ASSERT(function.IsZoneHandle()); |
106 // Every function has a local variable for the current context. | 106 // Every function has a local variable for the current context. |
107 LocalVariable* temp = new(zone()) LocalVariable( | 107 LocalVariable* temp = new(zone()) LocalVariable( |
108 function.token_pos(), | 108 function.token_pos(), |
| 109 function.token_pos(), |
109 Symbols::CurrentContextVar(), | 110 Symbols::CurrentContextVar(), |
110 Object::dynamic_type()); | 111 Object::dynamic_type()); |
111 ASSERT(temp != NULL); | 112 ASSERT(temp != NULL); |
112 current_context_var_ = temp; | 113 current_context_var_ = temp; |
113 } | 114 } |
114 | 115 |
115 const Function& function() const { return function_; } | 116 const Function& function() const { return function_; } |
116 const Code& code() const { return code_; } | 117 const Code& code() const { return code_; } |
117 | 118 |
118 SequenceNode* node_sequence() const { return node_sequence_; } | 119 SequenceNode* node_sequence() const { return node_sequence_; } |
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 | 976 |
976 intptr_t recursion_counter_; | 977 intptr_t recursion_counter_; |
977 friend class RecursionChecker; | 978 friend class RecursionChecker; |
978 | 979 |
979 DISALLOW_COPY_AND_ASSIGN(Parser); | 980 DISALLOW_COPY_AND_ASSIGN(Parser); |
980 }; | 981 }; |
981 | 982 |
982 } // namespace dart | 983 } // namespace dart |
983 | 984 |
984 #endif // VM_PARSER_H_ | 985 #endif // VM_PARSER_H_ |
OLD | NEW |