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

Side by Side Diff: src/code-stubs.h

Issue 2263253002: [interpreter] Make the binary op with Smi bytecode handlers collect type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. 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
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/code-stub-assembler.h" 10 #include "src/code-stub-assembler.h"
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 assembler->Return(Generate(assembler, assembler->Parameter(0), \ 434 assembler->Return(Generate(assembler, assembler->Parameter(0), \
435 assembler->Parameter(1), \ 435 assembler->Parameter(1), \
436 assembler->Parameter(2))); \ 436 assembler->Parameter(2))); \
437 } \ 437 } \
438 DEFINE_CODE_STUB(NAME, SUPER) 438 DEFINE_CODE_STUB(NAME, SUPER)
439 439
440 #define DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(NAME, SUPER) \ 440 #define DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(NAME, SUPER) \
441 public: \ 441 public: \
442 static compiler::Node* Generate( \ 442 static compiler::Node* Generate( \
443 CodeStubAssembler* assembler, compiler::Node* left, \ 443 CodeStubAssembler* assembler, compiler::Node* left, \
444 compiler::Node* right, compiler::Node* context, \ 444 compiler::Node* right, compiler::Node* slot_id, \
445 compiler::Node* type_feedback_vector, compiler::Node* slot_id); \ 445 compiler::Node* type_feedback_vector, compiler::Node* context); \
446 void GenerateAssembly(CodeStubAssembler* assembler) const override { \ 446 void GenerateAssembly(CodeStubAssembler* assembler) const override { \
447 assembler->Return( \ 447 assembler->Return( \
448 Generate(assembler, assembler->Parameter(0), assembler->Parameter(1), \ 448 Generate(assembler, assembler->Parameter(0), assembler->Parameter(1), \
449 assembler->Parameter(2), assembler->Parameter(3), \ 449 assembler->Parameter(2), assembler->Parameter(3), \
450 assembler->Parameter(4))); \ 450 assembler->Parameter(4))); \
451 } \ 451 } \
452 DEFINE_CODE_STUB(NAME, SUPER) 452 DEFINE_CODE_STUB(NAME, SUPER)
453 453
454 #define DEFINE_TURBOFAN_UNARY_OP_CODE_STUB(NAME, SUPER) \ 454 #define DEFINE_TURBOFAN_UNARY_OP_CODE_STUB(NAME, SUPER) \
455 public: \ 455 public: \
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 explicit AddStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 770 explicit AddStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
771 771
772 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 772 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
773 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Add, TurboFanCodeStub); 773 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Add, TurboFanCodeStub);
774 }; 774 };
775 775
776 class AddWithFeedbackStub final : public TurboFanCodeStub { 776 class AddWithFeedbackStub final : public TurboFanCodeStub {
777 public: 777 public:
778 explicit AddWithFeedbackStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 778 explicit AddWithFeedbackStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
779 779
780 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 780 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector);
781 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(AddWithFeedback, 781 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(AddWithFeedback,
782 TurboFanCodeStub); 782 TurboFanCodeStub);
783 }; 783 };
784 784
785 class SubtractStub final : public TurboFanCodeStub { 785 class SubtractStub final : public TurboFanCodeStub {
786 public: 786 public:
787 explicit SubtractStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 787 explicit SubtractStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
788 788
789 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 789 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
790 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Subtract, TurboFanCodeStub); 790 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Subtract, TurboFanCodeStub);
791 }; 791 };
792 792
793 class SubtractWithFeedbackStub final : public TurboFanCodeStub { 793 class SubtractWithFeedbackStub final : public TurboFanCodeStub {
794 public: 794 public:
795 explicit SubtractWithFeedbackStub(Isolate* isolate) 795 explicit SubtractWithFeedbackStub(Isolate* isolate)
796 : TurboFanCodeStub(isolate) {} 796 : TurboFanCodeStub(isolate) {}
797 797
798 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 798 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector);
799 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(SubtractWithFeedback, 799 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(SubtractWithFeedback,
800 TurboFanCodeStub); 800 TurboFanCodeStub);
801 }; 801 };
802 802
803 class MultiplyStub final : public TurboFanCodeStub { 803 class MultiplyStub final : public TurboFanCodeStub {
804 public: 804 public:
805 explicit MultiplyStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 805 explicit MultiplyStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
806 806
807 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 807 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
808 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Multiply, TurboFanCodeStub); 808 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Multiply, TurboFanCodeStub);
809 }; 809 };
810 810
811 class MultiplyWithFeedbackStub final : public TurboFanCodeStub { 811 class MultiplyWithFeedbackStub final : public TurboFanCodeStub {
812 public: 812 public:
813 explicit MultiplyWithFeedbackStub(Isolate* isolate) 813 explicit MultiplyWithFeedbackStub(Isolate* isolate)
814 : TurboFanCodeStub(isolate) {} 814 : TurboFanCodeStub(isolate) {}
815 815
816 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 816 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector);
817 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(MultiplyWithFeedback, 817 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(MultiplyWithFeedback,
818 TurboFanCodeStub); 818 TurboFanCodeStub);
819 }; 819 };
820 820
821 class DivideStub final : public TurboFanCodeStub { 821 class DivideStub final : public TurboFanCodeStub {
822 public: 822 public:
823 explicit DivideStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 823 explicit DivideStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
824 824
825 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 825 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
826 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Divide, TurboFanCodeStub); 826 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Divide, TurboFanCodeStub);
827 }; 827 };
828 828
829 class DivideWithFeedbackStub final : public TurboFanCodeStub { 829 class DivideWithFeedbackStub final : public TurboFanCodeStub {
830 public: 830 public:
831 explicit DivideWithFeedbackStub(Isolate* isolate) 831 explicit DivideWithFeedbackStub(Isolate* isolate)
832 : TurboFanCodeStub(isolate) {} 832 : TurboFanCodeStub(isolate) {}
833 833
834 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 834 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector);
835 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(DivideWithFeedback, 835 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(DivideWithFeedback,
836 TurboFanCodeStub); 836 TurboFanCodeStub);
837 }; 837 };
838 838
839 class ModulusStub final : public TurboFanCodeStub { 839 class ModulusStub final : public TurboFanCodeStub {
840 public: 840 public:
841 explicit ModulusStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 841 explicit ModulusStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
842 842
843 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 843 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
844 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Modulus, TurboFanCodeStub); 844 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Modulus, TurboFanCodeStub);
845 }; 845 };
846 846
847 class ModulusWithFeedbackStub final : public TurboFanCodeStub { 847 class ModulusWithFeedbackStub final : public TurboFanCodeStub {
848 public: 848 public:
849 explicit ModulusWithFeedbackStub(Isolate* isolate) 849 explicit ModulusWithFeedbackStub(Isolate* isolate)
850 : TurboFanCodeStub(isolate) {} 850 : TurboFanCodeStub(isolate) {}
851 851
852 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 852 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector);
853 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(ModulusWithFeedback, 853 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(ModulusWithFeedback,
854 TurboFanCodeStub); 854 TurboFanCodeStub);
855 }; 855 };
856 856
857 class ShiftRightStub final : public TurboFanCodeStub { 857 class ShiftRightStub final : public TurboFanCodeStub {
858 public: 858 public:
859 explicit ShiftRightStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 859 explicit ShiftRightStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
860 860
861 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 861 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
862 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(ShiftRight, TurboFanCodeStub); 862 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(ShiftRight, TurboFanCodeStub);
(...skipping 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after
3223 #undef DEFINE_HYDROGEN_CODE_STUB 3223 #undef DEFINE_HYDROGEN_CODE_STUB
3224 #undef DEFINE_CODE_STUB 3224 #undef DEFINE_CODE_STUB
3225 #undef DEFINE_CODE_STUB_BASE 3225 #undef DEFINE_CODE_STUB_BASE
3226 3226
3227 extern Representation RepresentationFromType(Type* type); 3227 extern Representation RepresentationFromType(Type* type);
3228 3228
3229 } // namespace internal 3229 } // namespace internal
3230 } // namespace v8 3230 } // namespace v8
3231 3231
3232 #endif // V8_CODE_STUBS_H_ 3232 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698