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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 2231813003: Make Variable::is_this always return the correct value (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove patch Created 4 years, 4 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
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 7d752a81eb7162069ba5cd4be29315853e3e1ea6..efb065fca09e1ccbf902ce91fcc965c94e00a6cf 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -2941,7 +2941,7 @@ void AstGraphBuilder::VisitDelete(UnaryOperation* expr) {
Variable* variable = expr->expression()->AsVariableProxy()->var();
// Delete of an unqualified identifier is disallowed in strict mode but
Michael Starzinger 2016/08/10 19:45:13 nit: I know this is not your code, but while you a
Toon Verwaest 2016/08/11 08:46:25 Done.
// "delete this" is allowed.
- DCHECK(is_sloppy(language_mode()) || variable->HasThisName(isolate()));
+ DCHECK(is_sloppy(language_mode()) || variable->is_this());
value = BuildVariableDelete(variable, expr->id(),
ast_context()->GetStateCombine());
} else if (expr->expression()->IsProperty()) {
@@ -3403,7 +3403,7 @@ Node* AstGraphBuilder::BuildVariableDelete(Variable* variable,
case VariableLocation::LOCAL:
case VariableLocation::CONTEXT: {
// Local var, const, or let variable or context variable.
- return jsgraph()->BooleanConstant(variable->HasThisName(isolate()));
+ return jsgraph()->BooleanConstant(variable->is_this());
}
case VariableLocation::LOOKUP: {
// Dynamic lookup of context variable (anywhere in the chain).
« src/ast/scopes.cc ('K') | « src/ast/variables.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698