| Index: src/interpreter/bytecode-generator.cc
|
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
|
| index 7c89a3591badd59173137ee0b428643d0e4723d7..053f9a4b4270ecda222167930c4f651925914c75 100644
|
| --- a/src/interpreter/bytecode-generator.cc
|
| +++ b/src/interpreter/bytecode-generator.cc
|
| @@ -2779,9 +2779,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: {
|
| @@ -2803,8 +2801,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();
|
|
|