| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void set_index(int index) { | 59 void set_index(int index) { |
| 60 ASSERT(!HasIndex()); | 60 ASSERT(!HasIndex()); |
| 61 ASSERT(index != kUnitializedIndex_); | 61 ASSERT(index != kUnitializedIndex_); |
| 62 index_ = index; | 62 index_ = index; |
| 63 } | 63 } |
| 64 | 64 |
| 65 void set_invisible(bool value) { | 65 void set_invisible(bool value) { |
| 66 is_invisible_ = value; | 66 is_invisible_ = value; |
| 67 } | 67 } |
| 68 | 68 |
| 69 bool Equals(const LocalVariable& other) const; |
| 70 |
| 69 private: | 71 private: |
| 70 static const int kUnitializedIndex_ = INT_MIN; | 72 static const int kUnitializedIndex_ = INT_MIN; |
| 71 | 73 |
| 72 const intptr_t token_index_; | 74 const intptr_t token_index_; |
| 73 const String& name_; | 75 const String& name_; |
| 74 LocalScope* owner_; // Local scope declaring this variable. | 76 LocalScope* owner_; // Local scope declaring this variable. |
| 75 | 77 |
| 76 const AbstractType& type_; // Declaration type of local variable. | 78 const AbstractType& type_; // Declaration type of local variable. |
| 77 | 79 |
| 78 bool is_final_; // If true, this variable is readonly. | 80 bool is_final_; // If true, this variable is readonly. |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 int num_context_variables_; // Only set if this scope is a context owner. | 282 int num_context_variables_; // Only set if this scope is a context owner. |
| 281 GrowableArray<LocalVariable*> variables_; | 283 GrowableArray<LocalVariable*> variables_; |
| 282 GrowableArray<SourceLabel*> labels_; | 284 GrowableArray<SourceLabel*> labels_; |
| 283 | 285 |
| 284 DISALLOW_COPY_AND_ASSIGN(LocalScope); | 286 DISALLOW_COPY_AND_ASSIGN(LocalScope); |
| 285 }; | 287 }; |
| 286 | 288 |
| 287 } // namespace dart | 289 } // namespace dart |
| 288 | 290 |
| 289 #endif // VM_SCOPES_H_ | 291 #endif // VM_SCOPES_H_ |
| OLD | NEW |