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

Unified Diff: src/variables.h

Issue 5753005: Make closures optimizable by Crankshaft compiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Next round Created 9 years, 11 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
« no previous file with comments | « src/scopes.cc ('k') | src/variables.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/variables.h
diff --git a/src/variables.h b/src/variables.h
index 9e460f7619409ffd8c463fcbcc2a1d3792086e18..882a52ed828acfdebdd210006ac9971a0c657ef0 100644
--- a/src/variables.h
+++ b/src/variables.h
@@ -138,6 +138,9 @@ class Variable: public ZoneObject {
bool is_accessed_from_inner_scope() const {
return is_accessed_from_inner_scope_;
}
+ void MarkAsAccessedFromInnerScope() {
+ is_accessed_from_inner_scope_ = true;
+ }
bool is_used() { return is_used_; }
void set_is_used(bool flag) { is_used_ = flag; }
@@ -148,6 +151,7 @@ class Variable: public ZoneObject {
bool IsStackAllocated() const;
bool IsParameter() const; // Includes 'this'.
bool IsStackLocal() const;
+ bool IsContextSlot() const;
bool is_dynamic() const {
return (mode_ == DYNAMIC ||
@@ -175,6 +179,7 @@ class Variable: public ZoneObject {
}
Expression* rewrite() const { return rewrite_; }
+ void set_rewrite(Expression* expr) { rewrite_ = expr; }
StaticType* type() { return &type_; }
@@ -197,8 +202,6 @@ class Variable: public ZoneObject {
// Code generation.
// rewrite_ is usually a Slot or a Property, but may be any expression.
Expression* rewrite_;
-
- friend class Scope; // Has explicit access to rewrite_.
};
« no previous file with comments | « src/scopes.cc ('k') | src/variables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698