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

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

Issue 9664062: Support allocating and calling closures in the new non-optimizing compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 8 years, 9 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/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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 int index() const { 55 int index() const {
56 ASSERT(HasIndex()); 56 ASSERT(HasIndex());
57 return index_; 57 return index_;
58 } 58 }
59 59
60 // Assign an index to a local. This function can be called more than once 60 // Assign an index to a local. This function can be called more than once
61 // on the same on local (e.g., if we tried to compile in one mode, bailed 61 // on the same on local (e.g., if we tried to compile in one mode, bailed
62 // out, and fell back to a different compilation mode). In any case, it 62 // out, and fell back to a different compilation mode). In any case, it
63 // should not change the index once set. 63 // should not change the index once set.
64 void set_index(int index) { 64 void set_index(int index) {
65 ASSERT(!HasIndex() || (index_ == index)); 65 ASSERT(!HasIndex());
66 ASSERT(index != kUnitializedIndex); 66 ASSERT(index != kUnitializedIndex);
67 index_ = index; 67 index_ = index;
68 } 68 }
69 69
70 void set_invisible(bool value) { 70 void set_invisible(bool value) {
71 is_invisible_ = value; 71 is_invisible_ = value;
72 } 72 }
73 73
74 bool Equals(const LocalVariable& other) const; 74 bool Equals(const LocalVariable& other) const;
75 75
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 intptr_t end_token_index_; // Token index of end of scope. 299 intptr_t end_token_index_; // Token index of end of scope.
300 GrowableArray<LocalVariable*> variables_; 300 GrowableArray<LocalVariable*> variables_;
301 GrowableArray<SourceLabel*> labels_; 301 GrowableArray<SourceLabel*> labels_;
302 302
303 DISALLOW_COPY_AND_ASSIGN(LocalScope); 303 DISALLOW_COPY_AND_ASSIGN(LocalScope);
304 }; 304 };
305 305
306 } // namespace dart 306 } // namespace dart
307 307
308 #endif // VM_SCOPES_H_ 308 #endif // VM_SCOPES_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698