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

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

Issue 9347032: Fix issue 1246 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // aliases of the variable in the current and intermediate scopes up to 205 // aliases of the variable in the current and intermediate scopes up to
206 // the declaration scope in order to detect "used before declared" errors. 206 // the declaration scope in order to detect "used before declared" errors.
207 // We mark a variable as 'captured' when applicable. 207 // We mark a variable as 'captured' when applicable.
208 LocalVariable* LookupVariable(const String& name, bool test_only); 208 LocalVariable* LookupVariable(const String& name, bool test_only);
209 209
210 // Lookup a label in this scope and its parents. 210 // Lookup a label in this scope and its parents.
211 SourceLabel* LookupLabel(const String& name); 211 SourceLabel* LookupLabel(const String& name);
212 212
213 // Lookup the "innermost" label that labels a for, while, do, or switch 213 // Lookup the "innermost" label that labels a for, while, do, or switch
214 // statement. 214 // statement.
215 SourceLabel* LookupInnermostLabel(); 215 SourceLabel* LookupInnermostLabel(Token::Kind jump_kind);
216 216
217 // Lookup the label for the "innermost" catch block if one exists. 217 // Lookup the label for the "innermost" catch block if one exists.
218 SourceLabel* LookupInnermostCatchLabel(); 218 SourceLabel* LookupInnermostCatchLabel();
219 219
220 // Lookup scope of outer switch statement at same function level. 220 // Lookup scope of outer switch statement at same function level.
221 // Returns NULL if this scope is not embedded in a switch. 221 // Returns NULL if this scope is not embedded in a switch.
222 LocalScope* LookupSwitchScope(); 222 LocalScope* LookupSwitchScope();
223 223
224 // Look for unresolved forward references to labels in this scope. 224 // Look for unresolved forward references to labels in this scope.
225 // If there are any, propagate the forward reference to the next 225 // If there are any, propagate the forward reference to the next
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 intptr_t end_token_index_; // Token index of end of scope. 292 intptr_t end_token_index_; // Token index of end of scope.
293 GrowableArray<LocalVariable*> variables_; 293 GrowableArray<LocalVariable*> variables_;
294 GrowableArray<SourceLabel*> labels_; 294 GrowableArray<SourceLabel*> labels_;
295 295
296 DISALLOW_COPY_AND_ASSIGN(LocalScope); 296 DISALLOW_COPY_AND_ASSIGN(LocalScope);
297 }; 297 };
298 298
299 } // namespace dart 299 } // namespace dart
300 300
301 #endif // VM_SCOPES_H_ 301 #endif // VM_SCOPES_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698