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/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/compilation-info.h" | 10 #include "src/compilation-info.h" |
(...skipping 2732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2743 VisitForRegisterValue(property->key(), load_super_args[2]); | 2743 VisitForRegisterValue(property->key(), load_super_args[2]); |
2744 builder()->CallRuntime(Runtime::kLoadKeyedFromSuper, load_super_args); | 2744 builder()->CallRuntime(Runtime::kLoadKeyedFromSuper, load_super_args); |
2745 break; | 2745 break; |
2746 } | 2746 } |
2747 } | 2747 } |
2748 | 2748 |
2749 // Save result for postfix expressions. | 2749 // Save result for postfix expressions. |
2750 if (is_postfix) { | 2750 if (is_postfix) { |
2751 // Convert old value into a number before saving it. | 2751 // Convert old value into a number before saving it. |
2752 old_value = register_allocator()->NewRegister(); | 2752 old_value = register_allocator()->NewRegister(); |
2753 builder()->ConvertAccumulatorToNumber(old_value); | 2753 builder() |
2754 ->ConvertAccumulatorToNumber(old_value) | |
2755 .LoadAccumulatorWithRegister(old_value); | |
Jarin
2016/11/08 14:39:28
Does not this mean that the feedback for the binop
| |
2754 } | 2756 } |
2755 | 2757 |
2756 // Perform +1/-1 operation. | 2758 // Perform +1/-1 operation. |
2757 FeedbackVectorSlot slot = expr->CountBinaryOpFeedbackSlot(); | 2759 FeedbackVectorSlot slot = expr->CountBinaryOpFeedbackSlot(); |
2758 builder()->CountOperation(expr->binary_op(), feedback_index(slot)); | 2760 builder()->CountOperation(expr->binary_op(), feedback_index(slot)); |
2759 | 2761 |
2760 // Store the value. | 2762 // Store the value. |
2761 builder()->SetExpressionPosition(expr); | 2763 builder()->SetExpressionPosition(expr); |
2762 FeedbackVectorSlot feedback_slot = expr->CountSlot(); | 2764 FeedbackVectorSlot feedback_slot = expr->CountSlot(); |
2763 switch (assign_type) { | 2765 switch (assign_type) { |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3216 } | 3218 } |
3217 | 3219 |
3218 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { | 3220 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { |
3219 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict | 3221 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
3220 : Runtime::kStoreKeyedToSuper_Sloppy; | 3222 : Runtime::kStoreKeyedToSuper_Sloppy; |
3221 } | 3223 } |
3222 | 3224 |
3223 } // namespace interpreter | 3225 } // namespace interpreter |
3224 } // namespace internal | 3226 } // namespace internal |
3225 } // namespace v8 | 3227 } // namespace v8 |
OLD | NEW |