Index: src/ast.h |
diff --git a/src/ast.h b/src/ast.h |
index 02f7df64b0d62bbaa9c1eb717ce1db6f8d4939b5..09649a182adea2ebf4b41d5bd61aec47466de4eb 100644 |
--- a/src/ast.h |
+++ b/src/ast.h |
@@ -1635,7 +1635,7 @@ class VariableProxy FINAL : public Expression { |
DECLARE_NODE_TYPE(VariableProxy) |
bool IsValidReferenceExpression() const OVERRIDE { |
- return !is_resolved() || var()->IsValidReference(); |
+ return !is_this(); |
} |
bool IsArguments() const { return is_resolved() && var()->is_arguments(); } |
@@ -1693,8 +1693,11 @@ class VariableProxy FINAL : public Expression { |
protected: |
VariableProxy(Zone* zone, Variable* var, int position); |
- VariableProxy(Zone* zone, const AstRawString* name, bool is_this, |
- Interface* interface, int position); |
+ VariableProxy(Zone* zone, |
+ const AstRawString* name, |
+ Variable::Kind variable_kind, |
+ Interface* interface, |
+ int position); |
class IsThisField : public BitField8<bool, 0, 1> {}; |
class IsAssignedField : public BitField8<bool, 1, 1> {}; |
@@ -3415,10 +3418,13 @@ class AstNodeFactory FINAL BASE_EMBEDDED { |
} |
VariableProxy* NewVariableProxy(const AstRawString* name, |
- bool is_this, |
Interface* interface = Interface::NewValue(), |
int position = RelocInfo::kNoPosition) { |
- return new (zone_) VariableProxy(zone_, name, is_this, interface, position); |
+ return new (zone_) VariableProxy(zone_, name, |
+ (name == ast_value_factory_->this_string()) |
wingo
2015/02/06 17:31:19
Can we instead change from "bool is_this," to "Var
aperez
2015/02/09 16:08:14
Acknowledged.
|
+ ? Variable::THIS |
+ : Variable::NORMAL, |
+ interface, position); |
} |
Property* NewProperty(Expression* obj, Expression* key, int pos) { |