| Index: src/interpreter/bytecode-generator.cc
|
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
|
| index a267a7553d8a872021632465a05c8a54b84d7f79..d5305fa84f9cfde746c437c3c0c86e96b7097163 100644
|
| --- a/src/interpreter/bytecode-generator.cc
|
| +++ b/src/interpreter/bytecode-generator.cc
|
| @@ -2761,9 +2761,7 @@ void BytecodeGenerator::VisitDelete(UnaryOperation* expr) {
|
| // not allowed in strict mode. Deleting 'this' is allowed in both modes.
|
| VariableProxy* proxy = expr->expression()->AsVariableProxy();
|
| Variable* variable = proxy->var();
|
| - DCHECK(
|
| - is_sloppy(language_mode()) ||
|
| - variable->HasThisName(isolate(), HandleDereferenceMode::kDisallowed));
|
| + DCHECK(is_sloppy(language_mode()) || variable->is_this());
|
| switch (variable->location()) {
|
| case VariableLocation::GLOBAL:
|
| case VariableLocation::UNALLOCATED: {
|
| @@ -2785,8 +2783,7 @@ void BytecodeGenerator::VisitDelete(UnaryOperation* expr) {
|
| case VariableLocation::CONTEXT: {
|
| // Deleting local var/let/const, context variables, and arguments
|
| // does not have any effect.
|
| - if (variable->HasThisName(isolate(),
|
| - HandleDereferenceMode::kDisallowed)) {
|
| + if (variable->is_this()) {
|
| builder()->LoadTrue();
|
| } else {
|
| builder()->LoadFalse();
|
|
|