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

Unified Diff: runtime/vm/scopes.h

Issue 71703002: Introduce a nesting stack to the flow graph builder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« runtime/vm/flow_graph_builder.cc ('K') | « runtime/vm/flow_graph_inliner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scopes.h
diff --git a/runtime/vm/scopes.h b/runtime/vm/scopes.h
index d6c2319698d431d6c2c6c6cfc4786f78343fba4c..89851e902bd1eb6434edee608ecda8e658578b8e 100644
--- a/runtime/vm/scopes.h
+++ b/runtime/vm/scopes.h
@@ -16,7 +16,6 @@
namespace dart {
-class JoinEntryInstr;
class LocalScope;
@@ -151,10 +150,7 @@ class SourceLabel : public ZoneAllocated {
: token_pos_(token_pos),
name_(name),
owner_(NULL),
- kind_(kind),
- join_for_break_(NULL),
- join_for_continue_(NULL),
- is_continue_target_(false) {
+ kind_(kind) {
}
static SourceLabel* New(intptr_t token_pos, String* name, Kind kind) {
@@ -177,45 +173,17 @@ class SourceLabel : public ZoneAllocated {
Kind kind() const { return kind_; }
- void set_join_for_continue(JoinEntryInstr* join) {
- ASSERT(join_for_continue_ == NULL);
- join_for_continue_ = join;
- }
-
- JoinEntryInstr* join_for_continue() const {
- return join_for_continue_;
- }
-
- bool is_continue_target() const { return is_continue_target_; }
- void set_is_continue_target(bool value) { is_continue_target_ = value; }
-
- void set_join_for_break(JoinEntryInstr* join) {
- ASSERT(join_for_break_ == NULL);
- join_for_break_ = join;
- }
-
- JoinEntryInstr* join_for_break() const {
- return join_for_break_;
- }
-
// Returns the function level of the scope in which the label is defined.
int FunctionLevel() const;
void ResolveForwardReference() { kind_ = kCase; }
private:
- // TODO(zerny): Remove this hack when the builder no longer stores state in
- // the ast/scopes.
- friend class SourceLabelResetter;
-
const intptr_t token_pos_;
const String& name_;
LocalScope* owner_; // Local scope declaring this label.
Kind kind_;
- JoinEntryInstr* join_for_break_;
- JoinEntryInstr* join_for_continue_;
- bool is_continue_target_; // Needed for CaseNode.
DISALLOW_COPY_AND_ASSIGN(SourceLabel);
};
« runtime/vm/flow_graph_builder.cc ('K') | « runtime/vm/flow_graph_inliner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698