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

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

Issue 11228022: Cache parsed functions when inlining. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: virtual Created 8 years, 2 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_test.cc ('k') | runtime/vm/unit_test.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 "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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 JoinEntryInstr* join_for_break() const { 168 JoinEntryInstr* join_for_break() const {
169 return join_for_break_; 169 return join_for_break_;
170 } 170 }
171 171
172 // Returns the function level of the scope in which the label is defined. 172 // Returns the function level of the scope in which the label is defined.
173 int FunctionLevel() const; 173 int FunctionLevel() const;
174 174
175 void ResolveForwardReference() { kind_ = kCase; } 175 void ResolveForwardReference() { kind_ = kCase; }
176 176
177 private: 177 private:
178 // TODO(zerny): Remove this hack when the builder no longer stores state in
179 // the ast/scopes.
180 friend class SourceLabelResetter;
181
178 const intptr_t token_pos_; 182 const intptr_t token_pos_;
179 const String& name_; 183 const String& name_;
180 LocalScope* owner_; // Local scope declaring this label. 184 LocalScope* owner_; // Local scope declaring this label.
181 185
182 Kind kind_; 186 Kind kind_;
183 Label continue_label_; 187 Label continue_label_;
184 Label break_label_; 188 Label break_label_;
185 JoinEntryInstr* join_for_break_; 189 JoinEntryInstr* join_for_break_;
186 JoinEntryInstr* join_for_continue_; 190 JoinEntryInstr* join_for_continue_;
187 bool is_continue_target_; // Needed for CaseNode. 191 bool is_continue_target_; // Needed for CaseNode.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 intptr_t end_token_pos_; // Token index of end of scope. 344 intptr_t end_token_pos_; // Token index of end of scope.
341 GrowableArray<LocalVariable*> variables_; 345 GrowableArray<LocalVariable*> variables_;
342 GrowableArray<SourceLabel*> labels_; 346 GrowableArray<SourceLabel*> labels_;
343 347
344 DISALLOW_COPY_AND_ASSIGN(LocalScope); 348 DISALLOW_COPY_AND_ASSIGN(LocalScope);
345 }; 349 };
346 350
347 } // namespace dart 351 } // namespace dart
348 352
349 #endif // VM_SCOPES_H_ 353 #endif // VM_SCOPES_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser_test.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698