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/interpreter.h" | 5 #include "src/interpreter/interpreter.h" |
6 | 6 |
7 #include <fstream> | 7 #include <fstream> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 Node* result = Generator::Generate(assembler, lhs, rhs, context, | 773 Node* result = Generator::Generate(assembler, lhs, rhs, context, |
774 type_feedback_vector, slot_index); | 774 type_feedback_vector, slot_index); |
775 __ SetAccumulator(result); | 775 __ SetAccumulator(result); |
776 __ Dispatch(); | 776 __ Dispatch(); |
777 } | 777 } |
778 | 778 |
779 // Add <src> | 779 // Add <src> |
780 // | 780 // |
781 // Add register <src> to accumulator. | 781 // Add register <src> to accumulator. |
782 void Interpreter::DoAdd(InterpreterAssembler* assembler) { | 782 void Interpreter::DoAdd(InterpreterAssembler* assembler) { |
783 DoBinaryOp<AddStub>(assembler); | 783 DoBinaryOpWithFeedback<AddWithFeedbackStub>(assembler); |
784 } | 784 } |
785 | 785 |
786 // Sub <src> | 786 // Sub <src> |
787 // | 787 // |
788 // Subtract register <src> from accumulator. | 788 // Subtract register <src> from accumulator. |
789 void Interpreter::DoSub(InterpreterAssembler* assembler) { | 789 void Interpreter::DoSub(InterpreterAssembler* assembler) { |
790 DoBinaryOpWithFeedback<SubtractWithFeedbackStub>(assembler); | 790 DoBinaryOpWithFeedback<SubtractWithFeedbackStub>(assembler); |
791 } | 791 } |
792 | 792 |
793 // Mul <src> | 793 // Mul <src> |
794 // | 794 // |
795 // Multiply accumulator by register <src>. | 795 // Multiply accumulator by register <src>. |
796 void Interpreter::DoMul(InterpreterAssembler* assembler) { | 796 void Interpreter::DoMul(InterpreterAssembler* assembler) { |
797 DoBinaryOp<MultiplyStub>(assembler); | 797 DoBinaryOpWithFeedback<MultiplyWithFeedbackStub>(assembler); |
798 } | 798 } |
799 | 799 |
800 // Div <src> | 800 // Div <src> |
801 // | 801 // |
802 // Divide register <src> by accumulator. | 802 // Divide register <src> by accumulator. |
803 void Interpreter::DoDiv(InterpreterAssembler* assembler) { | 803 void Interpreter::DoDiv(InterpreterAssembler* assembler) { |
804 DoBinaryOp<DivideStub>(assembler); | 804 DoBinaryOpWithFeedback<DivideWithFeedbackStub>(assembler); |
805 } | 805 } |
806 | 806 |
807 // Mod <src> | 807 // Mod <src> |
808 // | 808 // |
809 // Modulo register <src> by accumulator. | 809 // Modulo register <src> by accumulator. |
810 void Interpreter::DoMod(InterpreterAssembler* assembler) { | 810 void Interpreter::DoMod(InterpreterAssembler* assembler) { |
811 DoBinaryOp<ModulusStub>(assembler); | 811 DoBinaryOpWithFeedback<ModulusWithFeedbackStub>(assembler); |
812 } | 812 } |
813 | 813 |
814 // BitwiseOr <src> | 814 // BitwiseOr <src> |
815 // | 815 // |
816 // BitwiseOr register <src> to accumulator. | 816 // BitwiseOr register <src> to accumulator. |
817 void Interpreter::DoBitwiseOr(InterpreterAssembler* assembler) { | 817 void Interpreter::DoBitwiseOr(InterpreterAssembler* assembler) { |
818 DoBinaryOp<BitwiseOrStub>(assembler); | 818 DoBinaryOp<BitwiseOrStub>(assembler); |
819 } | 819 } |
820 | 820 |
821 // BitwiseXor <src> | 821 // BitwiseXor <src> |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2163 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2163 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2164 __ SmiTag(new_state)); | 2164 __ SmiTag(new_state)); |
2165 __ SetAccumulator(old_state); | 2165 __ SetAccumulator(old_state); |
2166 | 2166 |
2167 __ Dispatch(); | 2167 __ Dispatch(); |
2168 } | 2168 } |
2169 | 2169 |
2170 } // namespace interpreter | 2170 } // namespace interpreter |
2171 } // namespace internal | 2171 } // namespace internal |
2172 } // namespace v8 | 2172 } // namespace v8 |
OLD | NEW |