| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 int BitIndexIn(BitVector* vector) const; | 77 // var_count is the total number of stack-allocated variables including |
| 78 // all parameters. |
| 79 int BitIndexIn(intptr_t var_count) const; |
| 78 | 80 |
| 79 private: | 81 private: |
| 80 static const int kUnitializedIndex = INT_MIN; | 82 static const int kUnitializedIndex = INT_MIN; |
| 81 | 83 |
| 82 const intptr_t token_index_; | 84 const intptr_t token_index_; |
| 83 const String& name_; | 85 const String& name_; |
| 84 LocalScope* owner_; // Local scope declaring this variable. | 86 LocalScope* owner_; // Local scope declaring this variable. |
| 85 | 87 |
| 86 const AbstractType& type_; // Declaration type of local variable. | 88 const AbstractType& type_; // Declaration type of local variable. |
| 87 | 89 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 intptr_t end_token_index_; // Token index of end of scope. | 331 intptr_t end_token_index_; // Token index of end of scope. |
| 330 GrowableArray<LocalVariable*> variables_; | 332 GrowableArray<LocalVariable*> variables_; |
| 331 GrowableArray<SourceLabel*> labels_; | 333 GrowableArray<SourceLabel*> labels_; |
| 332 | 334 |
| 333 DISALLOW_COPY_AND_ASSIGN(LocalScope); | 335 DISALLOW_COPY_AND_ASSIGN(LocalScope); |
| 334 }; | 336 }; |
| 335 | 337 |
| 336 } // namespace dart | 338 } // namespace dart |
| 337 | 339 |
| 338 #endif // VM_SCOPES_H_ | 340 #endif // VM_SCOPES_H_ |
| OLD | NEW |