| 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 void set_index(int index) { | 63 void set_index(int index) { |
| 64 ASSERT(!HasIndex()); | 64 ASSERT(!HasIndex()); |
| 65 ASSERT(index != kUnitializedIndex); | 65 ASSERT(index != kUnitializedIndex); |
| 66 index_ = index; | 66 index_ = index; |
| 67 } | 67 } |
| 68 | 68 |
| 69 void set_invisible(bool value) { | 69 void set_invisible(bool value) { |
| 70 is_invisible_ = value; | 70 is_invisible_ = value; |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool Equals(const LocalVariable& other) const; | 73 bool Equals(const LocalVariable* other) const; |
| 74 | 74 |
| 75 // Map the frame index to a bit-vector index. Assumes the variable is | 75 // Map the frame index to a bit-vector index. Assumes the variable is |
| 76 // allocated to the frame. | 76 // allocated to the frame. |
| 77 // var_count is the total number of stack-allocated variables including | 77 // var_count is the total number of stack-allocated variables including |
| 78 // all parameters. | 78 // all parameters. |
| 79 int BitIndexIn(intptr_t var_count) const; | 79 int BitIndexIn(intptr_t var_count) const; |
| 80 | 80 |
| 81 // Name of the internal variable that is used to save the context chain | 81 // Name of the internal variable that is used to save the context chain |
| 82 // on function entry. | 82 // on function entry. |
| 83 static const char* kSavedContextVarName; | 83 static const char* kSavedContextVarName; |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 intptr_t end_token_pos_; // Token index of end of scope. | 344 intptr_t end_token_pos_; // Token index of end of scope. |
| 345 GrowableArray<LocalVariable*> variables_; | 345 GrowableArray<LocalVariable*> variables_; |
| 346 GrowableArray<SourceLabel*> labels_; | 346 GrowableArray<SourceLabel*> labels_; |
| 347 | 347 |
| 348 DISALLOW_COPY_AND_ASSIGN(LocalScope); | 348 DISALLOW_COPY_AND_ASSIGN(LocalScope); |
| 349 }; | 349 }; |
| 350 | 350 |
| 351 } // namespace dart | 351 } // namespace dart |
| 352 | 352 |
| 353 #endif // VM_SCOPES_H_ | 353 #endif // VM_SCOPES_H_ |
| OLD | NEW |