| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/interpreter/bytecode-generator.h" | 5 #include "src/interpreter/bytecode-generator.h" |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/interpreter/bytecode-register-allocator.h" | 9 #include "src/interpreter/bytecode-register-allocator.h" |
| 10 #include "src/interpreter/control-flow-builders.h" | 10 #include "src/interpreter/control-flow-builders.h" |
| (...skipping 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2400 // Deleting local var/let/const, context variables, and arguments | 2400 // Deleting local var/let/const, context variables, and arguments |
| 2401 // does not have any effect. | 2401 // does not have any effect. |
| 2402 if (variable->HasThisName(isolate())) { | 2402 if (variable->HasThisName(isolate())) { |
| 2403 builder()->LoadTrue(); | 2403 builder()->LoadTrue(); |
| 2404 } else { | 2404 } else { |
| 2405 builder()->LoadFalse(); | 2405 builder()->LoadFalse(); |
| 2406 } | 2406 } |
| 2407 break; | 2407 break; |
| 2408 } | 2408 } |
| 2409 case VariableLocation::LOOKUP: { | 2409 case VariableLocation::LOOKUP: { |
| 2410 builder()->LoadLiteral(variable->name()).DeleteLookupSlot(); | 2410 Register name_reg = register_allocator()->NewRegister(); |
| 2411 builder() |
| 2412 ->LoadLiteral(variable->name()) |
| 2413 .StoreAccumulatorInRegister(name_reg) |
| 2414 .CallRuntime(Runtime::kDeleteLookupSlot, name_reg, 1); |
| 2411 break; | 2415 break; |
| 2412 } | 2416 } |
| 2413 default: | 2417 default: |
| 2414 UNREACHABLE(); | 2418 UNREACHABLE(); |
| 2415 } | 2419 } |
| 2416 } else { | 2420 } else { |
| 2417 // Delete of an unresolvable reference returns true. | 2421 // Delete of an unresolvable reference returns true. |
| 2418 VisitForEffect(expr->expression()); | 2422 VisitForEffect(expr->expression()); |
| 2419 builder()->LoadTrue(); | 2423 builder()->LoadTrue(); |
| 2420 } | 2424 } |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2871 } | 2875 } |
| 2872 | 2876 |
| 2873 | 2877 |
| 2874 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 2878 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
| 2875 return info()->feedback_vector()->GetIndex(slot); | 2879 return info()->feedback_vector()->GetIndex(slot); |
| 2876 } | 2880 } |
| 2877 | 2881 |
| 2878 } // namespace interpreter | 2882 } // namespace interpreter |
| 2879 } // namespace internal | 2883 } // namespace internal |
| 2880 } // namespace v8 | 2884 } // namespace v8 |
| OLD | NEW |