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

Unified Diff: runtime/vm/scopes.h

Issue 8992020: First part of inspecting local variables (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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
Index: runtime/vm/scopes.h
===================================================================
--- runtime/vm/scopes.h (revision 2587)
+++ runtime/vm/scopes.h (working copy)
@@ -179,6 +179,9 @@
context_level_ = context_level;
}
+ intptr_t end_token_index() const { return end_token_index_; }
+ void set_end_token_index(intptr_t value) { end_token_index_ = value; }
+
// The number of variables allocated in the context and belonging to this
// scope and to its children at the same loop level.
int num_context_variables() const { return num_context_variables_; }
@@ -249,6 +252,10 @@
LocalScope* loop_owner,
LocalScope** context_owner);
+ // Creates variable info for the scope and all its nested scopes.
+ // Must be called after AllocateVariables() has been called.
+ RawLocalVarDescriptors* GetVarDescriptors();
+
// Create a ContextScope object describing all captured variables referenced
// from this scope and belonging to outer scopes.
RawContextScope* PreserveOuterScope(int current_context_level) const;
@@ -272,6 +279,8 @@
void AllocateContextVariable(LocalVariable* variable,
LocalScope** context_owner);
+ void CollectLocalVariables(GrowableArray<LocalVariable*>* vars);
+
static const int kUnitializedContextLevel_ = INT_MIN;
LocalScope* parent_;
LocalScope* child_;
@@ -280,6 +289,7 @@
int loop_level_; // Reflects the loop nesting level.
int context_level_; // Reflects the level of the runtime context.
int num_context_variables_; // Only set if this scope is a context owner.
+ intptr_t end_token_index_; // Token index of end of scope.
GrowableArray<LocalVariable*> variables_;
GrowableArray<SourceLabel*> labels_;

Powered by Google App Engine
This is Rietveld 408576698