| 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 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2711 property->obj()->AsSuperPropertyReference(); | 2711 property->obj()->AsSuperPropertyReference(); |
| 2712 VisitForRegisterValue(super_property->this_var(), object); | 2712 VisitForRegisterValue(super_property->this_var(), object); |
| 2713 VisitForRegisterValue(super_property->home_object(), home_object); | 2713 VisitForRegisterValue(super_property->home_object(), home_object); |
| 2714 VisitForRegisterValue(property->key(), key); | 2714 VisitForRegisterValue(property->key(), key); |
| 2715 BuildKeyedSuperPropertyLoad(object, home_object, key); | 2715 BuildKeyedSuperPropertyLoad(object, home_object, key); |
| 2716 break; | 2716 break; |
| 2717 } | 2717 } |
| 2718 } | 2718 } |
| 2719 | 2719 |
| 2720 // Convert old value into a number. | 2720 // Convert old value into a number. |
| 2721 if (!is_strong(language_mode())) { | 2721 builder()->CastAccumulatorToNumber(); |
| 2722 builder()->CastAccumulatorToNumber(); | |
| 2723 } | |
| 2724 | 2722 |
| 2725 // Save result for postfix expressions. | 2723 // Save result for postfix expressions. |
| 2726 if (is_postfix) { | 2724 if (is_postfix) { |
| 2727 old_value = register_allocator()->outer()->NewRegister(); | 2725 old_value = register_allocator()->outer()->NewRegister(); |
| 2728 builder()->StoreAccumulatorInRegister(old_value); | 2726 builder()->StoreAccumulatorInRegister(old_value); |
| 2729 } | 2727 } |
| 2730 | 2728 |
| 2731 // Perform +1/-1 operation. | 2729 // Perform +1/-1 operation. |
| 2732 builder()->CountOperation(expr->binary_op()); | 2730 builder()->CountOperation(expr->binary_op()); |
| 2733 | 2731 |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3133 } | 3131 } |
| 3134 | 3132 |
| 3135 | 3133 |
| 3136 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 3134 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
| 3137 return info()->feedback_vector()->GetIndex(slot); | 3135 return info()->feedback_vector()->GetIndex(slot); |
| 3138 } | 3136 } |
| 3139 | 3137 |
| 3140 } // namespace interpreter | 3138 } // namespace interpreter |
| 3141 } // namespace internal | 3139 } // namespace internal |
| 3142 } // namespace v8 | 3140 } // namespace v8 |
| OLD | NEW |