| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 // Assign an index to a local. | 64 // Assign an index to a local. |
| 65 void set_index(int index) { | 65 void set_index(int index) { |
| 66 ASSERT(index != kUninitializedIndex); | 66 ASSERT(index != kUninitializedIndex); |
| 67 index_ = index; | 67 index_ = index; |
| 68 } | 68 } |
| 69 | 69 |
| 70 void set_invisible(bool value) { | 70 void set_invisible(bool value) { |
| 71 is_invisible_ = value; | 71 is_invisible_ = value; |
| 72 } | 72 } |
| 73 bool is_invisible() const { return is_invisible_; } |
| 73 | 74 |
| 74 bool IsConst() const { | 75 bool IsConst() const { |
| 75 return const_value_ != NULL; | 76 return const_value_ != NULL; |
| 76 } | 77 } |
| 77 | 78 |
| 78 void SetConstValue(const Instance& value) { | 79 void SetConstValue(const Instance& value) { |
| 79 ASSERT(value.IsZoneHandle() || value.IsReadOnlyHandle()); | 80 ASSERT(value.IsZoneHandle() || value.IsReadOnlyHandle()); |
| 80 const_value_ = &value; | 81 const_value_ = &value; |
| 81 } | 82 } |
| 82 | 83 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 intptr_t end_token_pos_; // Token index of end of scope. | 366 intptr_t end_token_pos_; // Token index of end of scope. |
| 366 GrowableArray<LocalVariable*> variables_; | 367 GrowableArray<LocalVariable*> variables_; |
| 367 GrowableArray<SourceLabel*> labels_; | 368 GrowableArray<SourceLabel*> labels_; |
| 368 | 369 |
| 369 DISALLOW_COPY_AND_ASSIGN(LocalScope); | 370 DISALLOW_COPY_AND_ASSIGN(LocalScope); |
| 370 }; | 371 }; |
| 371 | 372 |
| 372 } // namespace dart | 373 } // namespace dart |
| 373 | 374 |
| 374 #endif // VM_SCOPES_H_ | 375 #endif // VM_SCOPES_H_ |
| OLD | NEW |