| 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_SCOPES_H_ | 5 #ifndef VM_SCOPES_H_ |
| 6 #define VM_SCOPES_H_ | 6 #define VM_SCOPES_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 join_for_break_(NULL), | 141 join_for_break_(NULL), |
| 142 join_for_continue_(NULL), | 142 join_for_continue_(NULL), |
| 143 is_continue_target_(false) { | 143 is_continue_target_(false) { |
| 144 } | 144 } |
| 145 | 145 |
| 146 static SourceLabel* New(intptr_t token_pos, String* name, Kind kind) { | 146 static SourceLabel* New(intptr_t token_pos, String* name, Kind kind) { |
| 147 if (name != NULL) { | 147 if (name != NULL) { |
| 148 return new SourceLabel(token_pos, *name, kind); | 148 return new SourceLabel(token_pos, *name, kind); |
| 149 } else { | 149 } else { |
| 150 return new SourceLabel(token_pos, | 150 return new SourceLabel(token_pos, |
| 151 String::ZoneHandle(Symbols::DefaultLabel()), | 151 Symbols::DefaultLabel(), |
| 152 kind); | 152 kind); |
| 153 } | 153 } |
| 154 } | 154 } |
| 155 | 155 |
| 156 intptr_t token_pos() const { return token_pos_; } | 156 intptr_t token_pos() const { return token_pos_; } |
| 157 const String& name() const { return name_; } | 157 const String& name() const { return name_; } |
| 158 LocalScope* owner() const { return owner_; } | 158 LocalScope* owner() const { return owner_; } |
| 159 void set_owner(LocalScope* owner) { | 159 void set_owner(LocalScope* owner) { |
| 160 ASSERT(owner_ == NULL); | 160 ASSERT(owner_ == NULL); |
| 161 owner_ = owner; | 161 owner_ = owner; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 intptr_t end_token_pos_; // Token index of end of scope. | 361 intptr_t end_token_pos_; // Token index of end of scope. |
| 362 GrowableArray<LocalVariable*> variables_; | 362 GrowableArray<LocalVariable*> variables_; |
| 363 GrowableArray<SourceLabel*> labels_; | 363 GrowableArray<SourceLabel*> labels_; |
| 364 | 364 |
| 365 DISALLOW_COPY_AND_ASSIGN(LocalScope); | 365 DISALLOW_COPY_AND_ASSIGN(LocalScope); |
| 366 }; | 366 }; |
| 367 | 367 |
| 368 } // namespace dart | 368 } // namespace dart |
| 369 | 369 |
| 370 #endif // VM_SCOPES_H_ | 370 #endif // VM_SCOPES_H_ |
| OLD | NEW |