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

Side by Side Diff: vm/scopes.h

Issue 11667012: Convert all symbols accessor to return read only handles so that it is not necessary to create a ne… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 11 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 | « vm/scanner.cc ('k') | vm/scopes.cc » ('j') | vm/symbols.h » ('J')
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 "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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 join_for_break_(NULL), 141 join_for_break_(NULL),
142 join_for_continue_(NULL), 142 join_for_continue_(NULL),
143 is_continue_target_(false) { 143 is_continue_target_(false) {
144 } 144 }
145 145
146 static SourceLabel* New(intptr_t token_pos, String* name, Kind kind) { 146 static SourceLabel* New(intptr_t token_pos, String* name, Kind kind) {
147 if (name != NULL) { 147 if (name != NULL) {
148 return new SourceLabel(token_pos, *name, kind); 148 return new SourceLabel(token_pos, *name, kind);
149 } else { 149 } else {
150 return new SourceLabel(token_pos, 150 return new SourceLabel(token_pos,
151 String::ZoneHandle(Symbols::DefaultLabel()), 151 Symbols::DefaultLabel(),
152 kind); 152 kind);
153 } 153 }
154 } 154 }
155 155
156 intptr_t token_pos() const { return token_pos_; } 156 intptr_t token_pos() const { return token_pos_; }
157 const String& name() const { return name_; } 157 const String& name() const { return name_; }
158 LocalScope* owner() const { return owner_; } 158 LocalScope* owner() const { return owner_; }
159 void set_owner(LocalScope* owner) { 159 void set_owner(LocalScope* owner) {
160 ASSERT(owner_ == NULL); 160 ASSERT(owner_ == NULL);
161 owner_ = owner; 161 owner_ = owner;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 intptr_t end_token_pos_; // Token index of end of scope. 361 intptr_t end_token_pos_; // Token index of end of scope.
362 GrowableArray<LocalVariable*> variables_; 362 GrowableArray<LocalVariable*> variables_;
363 GrowableArray<SourceLabel*> labels_; 363 GrowableArray<SourceLabel*> labels_;
364 364
365 DISALLOW_COPY_AND_ASSIGN(LocalScope); 365 DISALLOW_COPY_AND_ASSIGN(LocalScope);
366 }; 366 };
367 367
368 } // namespace dart 368 } // namespace dart
369 369
370 #endif // VM_SCOPES_H_ 370 #endif // VM_SCOPES_H_
OLDNEW
« no previous file with comments | « vm/scanner.cc ('k') | vm/scopes.cc » ('j') | vm/symbols.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698