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

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

Issue 288343005: Revert bad fix. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
« 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) 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 "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 intptr_t begin_token_pos() const { return begin_token_pos_; } 223 intptr_t begin_token_pos() const { return begin_token_pos_; }
224 void set_begin_token_pos(intptr_t value) { begin_token_pos_ = value; } 224 void set_begin_token_pos(intptr_t value) { begin_token_pos_ = value; }
225 225
226 intptr_t end_token_pos() const { return end_token_pos_; } 226 intptr_t end_token_pos() const { return end_token_pos_; }
227 void set_end_token_pos(intptr_t value) { end_token_pos_ = value; } 227 void set_end_token_pos(intptr_t value) { end_token_pos_ = value; }
228 228
229 // The number of variables allocated in the context and belonging to this 229 // The number of variables allocated in the context and belonging to this
230 // scope and to its children at the same loop level. 230 // scope and to its children at the same loop level.
231 int num_context_variables() const { return num_context_variables_; } 231 int num_context_variables() const { return num_context_variables_; }
232 232
233 // Forget all the variables in the scope.
234 void Clear();
235
236 // Add a variable to the scope. Returns false if a variable with the 233 // Add a variable to the scope. Returns false if a variable with the
237 // same name is already present. 234 // same name is already present.
238 bool AddVariable(LocalVariable* variable); 235 bool AddVariable(LocalVariable* variable);
239 236
240 // Add a label to the scope. Returns false if a label with the same name 237 // Add a label to the scope. Returns false if a label with the same name
241 // is already present. 238 // is already present.
242 bool AddLabel(SourceLabel* label); 239 bool AddLabel(SourceLabel* label);
243 240
244 // Lookup a variable in this scope only. 241 // Lookup a variable in this scope only.
245 LocalVariable* LocalLookupVariable(const String& name) const; 242 LocalVariable* LocalLookupVariable(const String& name) const;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // List of names referenced in this scope and its children that 357 // List of names referenced in this scope and its children that
361 // are not resolved to local variables. 358 // are not resolved to local variables.
362 GrowableArray<NameReference*> referenced_; 359 GrowableArray<NameReference*> referenced_;
363 360
364 DISALLOW_COPY_AND_ASSIGN(LocalScope); 361 DISALLOW_COPY_AND_ASSIGN(LocalScope);
365 }; 362 };
366 363
367 } // namespace dart 364 } // namespace dart
368 365
369 #endif // VM_SCOPES_H_ 366 #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