Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: src/interpreter/interpreter.cc

Issue 2224343002: [interpreter] Collect type feedback in Add, Mul, Div and Mod. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/code-stubs.cc ('K') | « src/globals.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 Node* result = Generator::Generate(assembler, lhs, rhs, context, 772 Node* result = Generator::Generate(assembler, lhs, rhs, context,
773 type_feedback_vector, slot_index); 773 type_feedback_vector, slot_index);
774 __ SetAccumulator(result); 774 __ SetAccumulator(result);
775 __ Dispatch(); 775 __ Dispatch();
776 } 776 }
777 777
778 // Add <src> 778 // Add <src>
779 // 779 //
780 // Add register <src> to accumulator. 780 // Add register <src> to accumulator.
781 void Interpreter::DoAdd(InterpreterAssembler* assembler) { 781 void Interpreter::DoAdd(InterpreterAssembler* assembler) {
782 DoBinaryOp<AddStub>(assembler); 782 DoBinaryOpWithFeedback<AddWithFeedbackStub>(assembler);
783 } 783 }
784 784
785 // Sub <src> 785 // Sub <src>
786 // 786 //
787 // Subtract register <src> from accumulator. 787 // Subtract register <src> from accumulator.
788 void Interpreter::DoSub(InterpreterAssembler* assembler) { 788 void Interpreter::DoSub(InterpreterAssembler* assembler) {
789 DoBinaryOpWithFeedback<SubtractWithFeedbackStub>(assembler); 789 DoBinaryOpWithFeedback<SubtractWithFeedbackStub>(assembler);
790 } 790 }
791 791
792 // Mul <src> 792 // Mul <src>
793 // 793 //
794 // Multiply accumulator by register <src>. 794 // Multiply accumulator by register <src>.
795 void Interpreter::DoMul(InterpreterAssembler* assembler) { 795 void Interpreter::DoMul(InterpreterAssembler* assembler) {
796 DoBinaryOp<MultiplyStub>(assembler); 796 DoBinaryOpWithFeedback<MultiplyWithFeedbackStub>(assembler);
797 } 797 }
798 798
799 // Div <src> 799 // Div <src>
800 // 800 //
801 // Divide register <src> by accumulator. 801 // Divide register <src> by accumulator.
802 void Interpreter::DoDiv(InterpreterAssembler* assembler) { 802 void Interpreter::DoDiv(InterpreterAssembler* assembler) {
803 DoBinaryOp<DivideStub>(assembler); 803 DoBinaryOpWithFeedback<DivideWithFeedbackStub>(assembler);
804 } 804 }
805 805
806 // Mod <src> 806 // Mod <src>
807 // 807 //
808 // Modulo register <src> by accumulator. 808 // Modulo register <src> by accumulator.
809 void Interpreter::DoMod(InterpreterAssembler* assembler) { 809 void Interpreter::DoMod(InterpreterAssembler* assembler) {
810 DoBinaryOp<ModulusStub>(assembler); 810 DoBinaryOpWithFeedback<ModulusWithFeedbackStub>(assembler);
811 } 811 }
812 812
813 // BitwiseOr <src> 813 // BitwiseOr <src>
814 // 814 //
815 // BitwiseOr register <src> to accumulator. 815 // BitwiseOr register <src> to accumulator.
816 void Interpreter::DoBitwiseOr(InterpreterAssembler* assembler) { 816 void Interpreter::DoBitwiseOr(InterpreterAssembler* assembler) {
817 DoBinaryOp<BitwiseOrStub>(assembler); 817 DoBinaryOp<BitwiseOrStub>(assembler);
818 } 818 }
819 819
820 // BitwiseXor <src> 820 // BitwiseXor <src>
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2162 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2163 __ SmiTag(new_state)); 2163 __ SmiTag(new_state));
2164 __ SetAccumulator(old_state); 2164 __ SetAccumulator(old_state);
2165 2165
2166 __ Dispatch(); 2166 __ Dispatch();
2167 } 2167 }
2168 2168
2169 } // namespace interpreter 2169 } // namespace interpreter
2170 } // namespace internal 2170 } // namespace internal
2171 } // namespace v8 2171 } // namespace v8
OLDNEW
« src/code-stubs.cc ('K') | « src/globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698