Chromium Code Reviews| Index: src/ast.h |
| diff --git a/src/ast.h b/src/ast.h |
| index 628391c5bedcd4844ea4c59d7fb8cd376d4763ac..cdd4ef3fa0284135621e53f4c73ea8d7fc9d4fa8 100644 |
| --- a/src/ast.h |
| +++ b/src/ast.h |
| @@ -1154,12 +1154,17 @@ class VariableProxy: public Expression { |
| bool IsArguments() { return var_ != NULL && var_->is_arguments(); } |
| + bool IsUsedAsLValue() { |
|
fschneider
2011/11/30 16:11:46
Maybe rename to just IsLValue?
Steven
2011/12/05 11:56:57
Done.
|
| + return is_used_as_lvalue_; |
| + } |
| + |
| Handle<String> name() const { return name_; } |
| Variable* var() const { return var_; } |
| bool is_this() const { return is_this_; } |
| int position() const { return position_; } |
| void MarkAsTrivial() { is_trivial_ = true; } |
| + void MarkAsUsedAsLValue() { is_used_as_lvalue_ = true; } |
|
fschneider
2011/11/30 16:11:46
Rename to MarkAsLValue?
Steven
2011/12/05 11:56:57
Done.
|
| // Bind this proxy to the variable var. |
| void BindTo(Variable* var); |
| @@ -1169,6 +1174,9 @@ class VariableProxy: public Expression { |
| Variable* var_; // resolved variable, or NULL |
| bool is_this_; |
| bool is_trivial_; |
| + // True if this variable proxy is being used in an assignment |
| + // or with a increment/decrement operator. |
| + bool is_used_as_lvalue_; |
| int position_; |
| VariableProxy(Isolate* isolate, |