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

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

Issue 1881003002: [stubs] Introduce LeftShift, SignedRightShift and UnsignedRightShift stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update after rollback Created 4 years, 8 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/code-factory.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/codegen.h" 10 #include "src/codegen.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 V(AllocateBool16x8) \ 108 V(AllocateBool16x8) \
109 V(AllocateInt8x16) \ 109 V(AllocateInt8x16) \
110 V(AllocateUint8x16) \ 110 V(AllocateUint8x16) \
111 V(AllocateBool8x16) \ 111 V(AllocateBool8x16) \
112 V(StringLength) \ 112 V(StringLength) \
113 V(Add) \ 113 V(Add) \
114 V(Subtract) \ 114 V(Subtract) \
115 V(Multiply) \ 115 V(Multiply) \
116 V(Divide) \ 116 V(Divide) \
117 V(Modulus) \ 117 V(Modulus) \
118 V(ShiftRight) \
119 V(ShiftRightLogical) \
120 V(ShiftLeft) \
118 V(BitwiseAnd) \ 121 V(BitwiseAnd) \
119 V(BitwiseOr) \ 122 V(BitwiseOr) \
120 V(BitwiseXor) \ 123 V(BitwiseXor) \
121 V(LessThan) \ 124 V(LessThan) \
122 V(LessThanOrEqual) \ 125 V(LessThanOrEqual) \
123 V(GreaterThan) \ 126 V(GreaterThan) \
124 V(GreaterThanOrEqual) \ 127 V(GreaterThanOrEqual) \
125 V(Equal) \ 128 V(Equal) \
126 V(NotEqual) \ 129 V(NotEqual) \
127 V(StrictEqual) \ 130 V(StrictEqual) \
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 }; 709 };
707 710
708 class ModulusStub final : public TurboFanCodeStub { 711 class ModulusStub final : public TurboFanCodeStub {
709 public: 712 public:
710 explicit ModulusStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 713 explicit ModulusStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
711 714
712 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 715 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
713 DEFINE_TURBOFAN_CODE_STUB(Modulus, TurboFanCodeStub); 716 DEFINE_TURBOFAN_CODE_STUB(Modulus, TurboFanCodeStub);
714 }; 717 };
715 718
719 class ShiftRightStub final : public TurboFanCodeStub {
720 public:
721 explicit ShiftRightStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
722
723 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
724 DEFINE_TURBOFAN_CODE_STUB(ShiftRight, TurboFanCodeStub);
725 };
726
727 class ShiftRightLogicalStub final : public TurboFanCodeStub {
728 public:
729 explicit ShiftRightLogicalStub(Isolate* isolate)
730 : TurboFanCodeStub(isolate) {}
731
732 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
733 DEFINE_TURBOFAN_CODE_STUB(ShiftRightLogical, TurboFanCodeStub);
734 };
735
736 class ShiftLeftStub final : public TurboFanCodeStub {
737 public:
738 explicit ShiftLeftStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
739
740 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
741 DEFINE_TURBOFAN_CODE_STUB(ShiftLeft, TurboFanCodeStub);
742 };
743
716 class BitwiseAndStub final : public TurboFanCodeStub { 744 class BitwiseAndStub final : public TurboFanCodeStub {
717 public: 745 public:
718 explicit BitwiseAndStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 746 explicit BitwiseAndStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
719 747
720 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 748 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
721 DEFINE_TURBOFAN_CODE_STUB(BitwiseAnd, TurboFanCodeStub); 749 DEFINE_TURBOFAN_CODE_STUB(BitwiseAnd, TurboFanCodeStub);
722 }; 750 };
723 751
724 class BitwiseOrStub final : public TurboFanCodeStub { 752 class BitwiseOrStub final : public TurboFanCodeStub {
725 public: 753 public:
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
2505 2533
2506 int slot_index() const { return SlotIndexBits::decode(sub_minor_key()); } 2534 int slot_index() const { return SlotIndexBits::decode(sub_minor_key()); }
2507 2535
2508 static bool Accepted(const ScriptContextTable::LookupResult* lookup_result) { 2536 static bool Accepted(const ScriptContextTable::LookupResult* lookup_result) {
2509 return ContextIndexBits::is_valid(lookup_result->context_index) && 2537 return ContextIndexBits::is_valid(lookup_result->context_index) &&
2510 SlotIndexBits::is_valid(lookup_result->slot_index); 2538 SlotIndexBits::is_valid(lookup_result->slot_index);
2511 } 2539 }
2512 2540
2513 private: 2541 private:
2514 static const int kContextIndexBits = 9; 2542 static const int kContextIndexBits = 9;
2515 static const int kSlotIndexBits = 13; 2543 static const int kSlotIndexBits = 12;
2516 class ContextIndexBits : public BitField<int, 0, kContextIndexBits> {}; 2544 class ContextIndexBits : public BitField<int, 0, kContextIndexBits> {};
2517 class SlotIndexBits 2545 class SlotIndexBits
2518 : public BitField<int, kContextIndexBits, kSlotIndexBits> {}; 2546 : public BitField<int, kContextIndexBits, kSlotIndexBits> {};
2519 2547
2520 DEFINE_CODE_STUB_BASE(ScriptContextFieldStub, HandlerStub); 2548 DEFINE_CODE_STUB_BASE(ScriptContextFieldStub, HandlerStub);
2521 }; 2549 };
2522 2550
2523 2551
2524 class LoadScriptContextFieldStub : public ScriptContextFieldStub { 2552 class LoadScriptContextFieldStub : public ScriptContextFieldStub {
2525 public: 2553 public:
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
3127 #undef DEFINE_HYDROGEN_CODE_STUB 3155 #undef DEFINE_HYDROGEN_CODE_STUB
3128 #undef DEFINE_CODE_STUB 3156 #undef DEFINE_CODE_STUB
3129 #undef DEFINE_CODE_STUB_BASE 3157 #undef DEFINE_CODE_STUB_BASE
3130 3158
3131 extern Representation RepresentationFromType(Type* type); 3159 extern Representation RepresentationFromType(Type* type);
3132 3160
3133 } // namespace internal 3161 } // namespace internal
3134 } // namespace v8 3162 } // namespace v8
3135 3163
3136 #endif // V8_CODE_STUBS_H_ 3164 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698