| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 void set_invisible(bool value) { | 71 void set_invisible(bool value) { |
| 72 is_invisible_ = value; | 72 is_invisible_ = value; |
| 73 } | 73 } |
| 74 | 74 |
| 75 bool IsConst() const { | 75 bool IsConst() const { |
| 76 return const_value_ != NULL; | 76 return const_value_ != NULL; |
| 77 } | 77 } |
| 78 | 78 |
| 79 void SetConstValue(const Instance& value) { | 79 void SetConstValue(const Instance& value) { |
| 80 ASSERT(value.IsZoneHandle()); | 80 ASSERT(value.IsZoneHandle() || value.IsReadOnlyHandle()); |
| 81 const_value_ = &value; | 81 const_value_ = &value; |
| 82 } | 82 } |
| 83 | 83 |
| 84 const Instance* ConstValue() const { | 84 const Instance* ConstValue() const { |
| 85 ASSERT(IsConst()); | 85 ASSERT(IsConst()); |
| 86 return const_value_; | 86 return const_value_; |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool Equals(const LocalVariable& other) const; | 89 bool Equals(const LocalVariable& other) const; |
| 90 | 90 |
| (...skipping 270 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 |