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

Unified Diff: src/scopeinfo.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/parser.cc ('k') | src/scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopeinfo.cc
diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc
index 10a493f5d6a13add7be2c55669aaf18b7d93bc70..333ec9ac03ba5c24abaa7b9c8a55cd7d64230c1a 100644
--- a/src/scopeinfo.cc
+++ b/src/scopeinfo.cc
@@ -279,7 +279,9 @@ bool ScopeInfo::LocalIsSynthetic(int var) {
// with user declarations, the current temporaries like .generator_object and
// .result start with a dot, so we can use that as a flag. It's a hack!
Handle<String> name(LocalName(var));
- return name->length() > 0 && name->Get(0) == '.';
+ return (name->length() > 0 && name->Get(0) == '.') ||
+ (name->length() == 4 && name->Get(0) == 't' && name->Get(1) == 'h' &&
+ name->Get(2) == 'i' && name->Get(3) == 's');
}
« no previous file with comments | « src/parser.cc ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698