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

Unified Diff: src/ast.cc

Issue 883823002: Implement proper scoping for "this" in arrow functions Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased against master, plus fixes. Only 4 tests failing (+2 in TurboFan) Created 5 years, 10 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/ast.h ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index ac81e751afb31f1ea89e8e47ac1cd68c6b198e2b..0a9e7838c2eb4216cfe20673e1d7af6a3d963179 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -70,11 +70,13 @@ VariableProxy::VariableProxy(Zone* zone, Variable* var, int position)
}
-VariableProxy::VariableProxy(Zone* zone, const AstRawString* name, bool is_this,
- int position)
+VariableProxy::VariableProxy(Zone* zone, const AstRawString* name,
+ Variable::Kind variable_kind, int position)
: Expression(zone, position),
- bit_field_(IsThisField::encode(is_this) | IsAssignedField::encode(false) |
- IsResolvedField::encode(false)),
+ bit_field_(
+ IsThisField::encode(variable_kind == Variable::THIS) |
+ IsAssignedField::encode(false) | IsResolvedField::encode(false) |
+ IsNewTargetField::encode(variable_kind == Variable::NEW_TARGET)),
variable_feedback_slot_(FeedbackVectorICSlot::Invalid()),
raw_name_(name) {}
« no previous file with comments | « src/ast.h ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698