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

Unified Diff: src/ast.h

Issue 1024703004: Cleanups needed for this-scoping in arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed codegen bits and Scope::has_this_declaration() Created 5 years, 9 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 | « no previous file | src/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698