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

Unified Diff: src/scopes.h

Issue 7860045: Stack allocating block scoped variables. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased on tip of tree. Created 9 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
« no previous file with comments | « src/scopeinfo.cc ('k') | src/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index 523a251fae2ffd18f5bb1148a2c17b575b6faf8b..ee0652ff34dae53b3101340e5c8dde2507a99bab 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -339,6 +339,16 @@ class Scope: public ZoneObject {
int StackLocalCount() const;
int ContextLocalCount() const;
+ // Computed during code generation; for block scopes only. The depth
+ // above the function locals on the stack at which the stack locals
+ // of the block start.
+ int stack_slots_depth() const {
+ return stack_slots_depth_;
+ }
+ void set_stack_slots_depth(int stack_slots_depth) {
+ stack_slots_depth_ = stack_slots_depth;
+ }
+
// Make sure this scope and all outer scopes are eagerly compiled.
void ForceEagerCompilation() { force_eager_compilation_ = true; }
@@ -456,6 +466,9 @@ class Scope: public ZoneObject {
int num_stack_slots_;
int num_heap_slots_;
+ // Computed during code generation; for block scopes only.
+ int stack_slots_depth_;
+
// Serialized scope info support.
Handle<ScopeInfo> scope_info_;
bool already_resolved() { return already_resolved_; }
« no previous file with comments | « src/scopeinfo.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698