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

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

Issue 22415002: Fix access to type variables in initializer expressions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // statement. 276 // statement.
277 SourceLabel* LookupInnermostLabel(Token::Kind jump_kind); 277 SourceLabel* LookupInnermostLabel(Token::Kind jump_kind);
278 278
279 // Lookup the label for the "innermost" catch block if one exists. 279 // Lookup the label for the "innermost" catch block if one exists.
280 SourceLabel* LookupInnermostCatchLabel(); 280 SourceLabel* LookupInnermostCatchLabel();
281 281
282 // Lookup scope of outer switch statement at same function level. 282 // Lookup scope of outer switch statement at same function level.
283 // Returns NULL if this scope is not embedded in a switch. 283 // Returns NULL if this scope is not embedded in a switch.
284 LocalScope* LookupSwitchScope(); 284 LocalScope* LookupSwitchScope();
285 285
286 // Looks up variable in this scope and mark as captured if applicable.
287 // Finds the variable even if it is marked invisible.
288 void CaptureVariable(const String& name);
289
286 // Look for unresolved forward references to labels in this scope. 290 // Look for unresolved forward references to labels in this scope.
287 // If there are any, propagate the forward reference to the next 291 // If there are any, propagate the forward reference to the next
288 // outer scope of a switch statement. If there is no outer switch 292 // outer scope of a switch statement. If there is no outer switch
289 // statement, return the first unresolved label found. 293 // statement, return the first unresolved label found.
290 SourceLabel* CheckUnresolvedLabels(); 294 SourceLabel* CheckUnresolvedLabels();
291 295
292 // Accessing the variables in the scope. 296 // Accessing the variables in the scope.
293 intptr_t num_variables() const { return variables_.length(); } 297 intptr_t num_variables() const { return variables_.length(); }
294 LocalVariable* VariableAt(intptr_t index) const { 298 LocalVariable* VariableAt(intptr_t index) const {
295 ASSERT((index >= 0) && (index < variables_.length())); 299 ASSERT((index >= 0) && (index < variables_.length()));
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 intptr_t end_token_pos_; // Token index of end of scope. 364 intptr_t end_token_pos_; // Token index of end of scope.
361 GrowableArray<LocalVariable*> variables_; 365 GrowableArray<LocalVariable*> variables_;
362 GrowableArray<SourceLabel*> labels_; 366 GrowableArray<SourceLabel*> labels_;
363 367
364 DISALLOW_COPY_AND_ASSIGN(LocalScope); 368 DISALLOW_COPY_AND_ASSIGN(LocalScope);
365 }; 369 };
366 370
367 } // namespace dart 371 } // namespace dart
368 372
369 #endif // VM_SCOPES_H_ 373 #endif // VM_SCOPES_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/scopes.cc » ('j') | runtime/vm/scopes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698