Index: src/ast.h |
diff --git a/src/ast.h b/src/ast.h |
index 661b5f962d86723482c0f08b2c574413787b4f21..184f3365026c7b8ad1604e565799e0f7d362bcc1 100644 |
--- a/src/ast.h |
+++ b/src/ast.h |
@@ -1623,9 +1623,7 @@ class VariableProxy FINAL : public Expression { |
public: |
DECLARE_NODE_TYPE(VariableProxy) |
- bool IsValidReferenceExpression() const OVERRIDE { |
- return !is_resolved() || var()->IsValidReference(); |
- } |
+ bool IsValidReferenceExpression() const OVERRIDE { return !is_this(); } |
bool IsArguments() const { return is_resolved() && var()->is_arguments(); } |
@@ -1680,8 +1678,9 @@ class VariableProxy FINAL : public Expression { |
VariableProxy(Zone* zone, Variable* var, int start_position, |
int end_position); |
- VariableProxy(Zone* zone, const AstRawString* name, bool is_this, |
- int start_position, int end_position); |
+ VariableProxy(Zone* zone, const AstRawString* name, |
+ Variable::Kind variable_kind, int start_position, |
+ int end_position); |
class IsThisField : public BitField8<bool, 0, 1> {}; |
class IsAssignedField : public BitField8<bool, 1, 1> {}; |
@@ -3395,11 +3394,12 @@ class AstNodeFactory FINAL BASE_EMBEDDED { |
return new (zone_) VariableProxy(zone_, var, start_position, end_position); |
} |
- VariableProxy* NewVariableProxy(const AstRawString* name, bool is_this, |
+ VariableProxy* NewVariableProxy(const AstRawString* name, |
+ Variable::Kind variable_kind, |
int start_position = RelocInfo::kNoPosition, |
int end_position = RelocInfo::kNoPosition) { |
return new (zone_) |
- VariableProxy(zone_, name, is_this, start_position, end_position); |
+ VariableProxy(zone_, name, variable_kind, start_position, end_position); |
} |
Property* NewProperty(Expression* obj, Expression* key, int pos) { |