| 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/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/interpreter/bytecode-flags.h" | 10 #include "src/interpreter/bytecode-flags.h" |
| (...skipping 2773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2784 BuildKeyedSuperPropertyLoad(object, home_object, key); | 2784 BuildKeyedSuperPropertyLoad(object, home_object, key); |
| 2785 break; | 2785 break; |
| 2786 } | 2786 } |
| 2787 } | 2787 } |
| 2788 | 2788 |
| 2789 // Save result for postfix expressions. | 2789 // Save result for postfix expressions. |
| 2790 if (is_postfix) { | 2790 if (is_postfix) { |
| 2791 old_value = register_allocator()->outer()->NewRegister(); | 2791 old_value = register_allocator()->outer()->NewRegister(); |
| 2792 | 2792 |
| 2793 // Convert old value into a number before saving it. | 2793 // Convert old value into a number before saving it. |
| 2794 builder()->CastAccumulatorToNumber().StoreAccumulatorInRegister(old_value); | 2794 builder()->CastAccumulatorToNumber(old_value); |
| 2795 } | 2795 } |
| 2796 | 2796 |
| 2797 // Perform +1/-1 operation. | 2797 // Perform +1/-1 operation. |
| 2798 builder()->CountOperation(expr->binary_op()); | 2798 builder()->CountOperation(expr->binary_op()); |
| 2799 | 2799 |
| 2800 // Store the value. | 2800 // Store the value. |
| 2801 builder()->SetExpressionPosition(expr); | 2801 builder()->SetExpressionPosition(expr); |
| 2802 FeedbackVectorSlot feedback_slot = expr->CountSlot(); | 2802 FeedbackVectorSlot feedback_slot = expr->CountSlot(); |
| 2803 switch (assign_type) { | 2803 switch (assign_type) { |
| 2804 case VARIABLE: { | 2804 case VARIABLE: { |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3178 return execution_context()->scope()->language_mode(); | 3178 return execution_context()->scope()->language_mode(); |
| 3179 } | 3179 } |
| 3180 | 3180 |
| 3181 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 3181 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
| 3182 return TypeFeedbackVector::GetIndex(slot); | 3182 return TypeFeedbackVector::GetIndex(slot); |
| 3183 } | 3183 } |
| 3184 | 3184 |
| 3185 } // namespace interpreter | 3185 } // namespace interpreter |
| 3186 } // namespace internal | 3186 } // namespace internal |
| 3187 } // namespace v8 | 3187 } // namespace v8 |
| OLD | NEW |