Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: runtime/vm/scopes.h

Issue 10377104: Compute assigned variables and dominance frontiers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void set_is_captured() { is_captured_ = true; } 51 void set_is_captured() { is_captured_ = true; }
52 52
53 bool HasIndex() const { 53 bool HasIndex() const {
54 return index_ != kUnitializedIndex; 54 return index_ != kUnitializedIndex;
55 } 55 }
56 int index() const { 56 int index() const {
57 ASSERT(HasIndex()); 57 ASSERT(HasIndex());
58 return index_; 58 return index_;
59 } 59 }
60 60
61 // Assign an index to a local. This function can be called more than once 61 // Assign an index to a local.
62 // on the same on local (e.g., if we tried to compile in one mode, bailed
63 // out, and fell back to a different compilation mode). In any case, it
64 // should not change the index once set.
65 void set_index(int index) { 62 void set_index(int index) {
66 ASSERT(!HasIndex()); 63 ASSERT(!HasIndex());
67 ASSERT(index != kUnitializedIndex); 64 ASSERT(index != kUnitializedIndex);
68 index_ = index; 65 index_ = index;
69 } 66 }
70 67
71 void set_invisible(bool value) { 68 void set_invisible(bool value) {
72 is_invisible_ = value; 69 is_invisible_ = value;
73 } 70 }
74 71
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 intptr_t end_token_index_; // Token index of end of scope. 324 intptr_t end_token_index_; // Token index of end of scope.
328 GrowableArray<LocalVariable*> variables_; 325 GrowableArray<LocalVariable*> variables_;
329 GrowableArray<SourceLabel*> labels_; 326 GrowableArray<SourceLabel*> labels_;
330 327
331 DISALLOW_COPY_AND_ASSIGN(LocalScope); 328 DISALLOW_COPY_AND_ASSIGN(LocalScope);
332 }; 329 };
333 330
334 } // namespace dart 331 } // namespace dart
335 332
336 #endif // VM_SCOPES_H_ 333 #endif // VM_SCOPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698