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

Unified Diff: src/scopes.h

Issue 7979001: Scope tree serialization and ScopeIterator cleanup. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index ff3a76b74d091d4f776dc69495677d459dc9377c..a59e0204aead4f54274f45c00b90f1bfc09510f1 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -206,6 +206,18 @@ class Scope: public ZoneObject {
strict_mode_ = FLAG_strict_mode;
}
+ // Statement position in the source where this scope begins.
+ int SourceBegStatementPos() const { return source_beg_statement_pos_; }
Kevin Millikin (Chromium) 2011/10/05 08:43:36 I don't like the name :) First, it doesn't follow
Steven 2011/10/06 19:09:27 Done.
+ void SetSourceBegStatementPos(int statement_pos) {
+ source_beg_statement_pos_ = statement_pos;
+ }
+
+ // Statement position in the source where this scope ends.
+ int SourceEndStatementPos() const { return source_end_statement_pos_; }
Kevin Millikin (Chromium) 2011/10/05 08:43:36 Likewise: int end_position() const { return end_p
Steven 2011/10/06 19:09:27 Done.
+ void SetSourceEndStatementPos(int statement_pos) {
+ source_end_statement_pos_ = statement_pos;
+ }
+
// ---------------------------------------------------------------------------
// Predicates.
@@ -244,6 +256,9 @@ class Scope: public ZoneObject {
// ---------------------------------------------------------------------------
// Accessors.
+ // The type of this scope.
+ Type type() const { return type_; }
+
// The variable corresponding the 'this' value.
Variable* receiver() { return receiver_; }
@@ -270,6 +285,8 @@ class Scope: public ZoneObject {
// Declarations list.
ZoneList<Declaration*>* declarations() { return &decls_; }
+ // Inner scope list.
+ ZoneList<Scope*>* InnerScopes() { return &inner_scopes_; }
Kevin Millikin (Chromium) 2011/10/05 08:43:36 ZoneList<Scope*>* inner_scopes() { return &inner_s
Steven 2011/10/06 19:09:27 Done.
// ---------------------------------------------------------------------------
// Variable allocation.
@@ -387,6 +404,9 @@ class Scope: public ZoneObject {
bool scope_calls_eval_;
// This scope is a strict mode scope.
bool strict_mode_;
+ // Source positions.
+ int source_beg_statement_pos_;
+ int source_end_statement_pos_;
// Computed via PropagateScopeInfo.
bool outer_scope_calls_non_strict_eval_;

Powered by Google App Engine
This is Rietveld 408576698