OLD | NEW |
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 V(ArrayNoArgumentConstructor) \ | 62 V(ArrayNoArgumentConstructor) \ |
63 V(ArraySingleArgumentConstructor) \ | 63 V(ArraySingleArgumentConstructor) \ |
64 V(BinaryOpIC) \ | 64 V(BinaryOpIC) \ |
65 V(BinaryOpWithAllocationSite) \ | 65 V(BinaryOpWithAllocationSite) \ |
66 V(CreateAllocationSite) \ | 66 V(CreateAllocationSite) \ |
67 V(CreateWeakCell) \ | 67 V(CreateWeakCell) \ |
68 V(ElementsTransitionAndStore) \ | 68 V(ElementsTransitionAndStore) \ |
69 V(FastArrayPush) \ | 69 V(FastArrayPush) \ |
70 V(FastCloneRegExp) \ | 70 V(FastCloneRegExp) \ |
71 V(FastCloneShallowArray) \ | 71 V(FastCloneShallowArray) \ |
72 V(FastCloneShallowObject) \ | |
73 V(FastNewClosure) \ | 72 V(FastNewClosure) \ |
74 V(FastNewContext) \ | 73 V(FastNewContext) \ |
75 V(FastNewObject) \ | 74 V(FastNewObject) \ |
76 V(FastNewRestParameter) \ | 75 V(FastNewRestParameter) \ |
77 V(FastNewSloppyArguments) \ | 76 V(FastNewSloppyArguments) \ |
78 V(FastNewStrictArguments) \ | 77 V(FastNewStrictArguments) \ |
79 V(GrowArrayElements) \ | 78 V(GrowArrayElements) \ |
80 V(InternalArrayNArgumentsConstructor) \ | 79 V(InternalArrayNArgumentsConstructor) \ |
81 V(InternalArrayNoArgumentConstructor) \ | 80 V(InternalArrayNoArgumentConstructor) \ |
82 V(InternalArraySingleArgumentConstructor) \ | 81 V(InternalArraySingleArgumentConstructor) \ |
(...skipping 25 matching lines...) Expand all Loading... |
108 V(AllocateBool16x8) \ | 107 V(AllocateBool16x8) \ |
109 V(AllocateInt8x16) \ | 108 V(AllocateInt8x16) \ |
110 V(AllocateUint8x16) \ | 109 V(AllocateUint8x16) \ |
111 V(AllocateBool8x16) \ | 110 V(AllocateBool8x16) \ |
112 V(StringLength) \ | 111 V(StringLength) \ |
113 V(Add) \ | 112 V(Add) \ |
114 V(Subtract) \ | 113 V(Subtract) \ |
115 V(BitwiseAnd) \ | 114 V(BitwiseAnd) \ |
116 V(BitwiseOr) \ | 115 V(BitwiseOr) \ |
117 V(BitwiseXor) \ | 116 V(BitwiseXor) \ |
| 117 V(FastCloneShallowObject) \ |
118 V(LessThan) \ | 118 V(LessThan) \ |
119 V(LessThanOrEqual) \ | 119 V(LessThanOrEqual) \ |
120 V(GreaterThan) \ | 120 V(GreaterThan) \ |
121 V(GreaterThanOrEqual) \ | 121 V(GreaterThanOrEqual) \ |
122 V(Equal) \ | 122 V(Equal) \ |
123 V(NotEqual) \ | 123 V(NotEqual) \ |
124 V(StrictEqual) \ | 124 V(StrictEqual) \ |
125 V(StrictNotEqual) \ | 125 V(StrictNotEqual) \ |
126 V(StringEqual) \ | 126 V(StringEqual) \ |
127 V(StringNotEqual) \ | 127 V(StringNotEqual) \ |
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 return AllocationSiteModeBits::decode(sub_minor_key()); | 1033 return AllocationSiteModeBits::decode(sub_minor_key()); |
1034 } | 1034 } |
1035 | 1035 |
1036 private: | 1036 private: |
1037 class AllocationSiteModeBits: public BitField<AllocationSiteMode, 0, 1> {}; | 1037 class AllocationSiteModeBits: public BitField<AllocationSiteMode, 0, 1> {}; |
1038 | 1038 |
1039 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowArray); | 1039 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowArray); |
1040 DEFINE_HYDROGEN_CODE_STUB(FastCloneShallowArray, HydrogenCodeStub); | 1040 DEFINE_HYDROGEN_CODE_STUB(FastCloneShallowArray, HydrogenCodeStub); |
1041 }; | 1041 }; |
1042 | 1042 |
1043 | 1043 class FastCloneShallowObjectStub : public TurboFanCodeStub { |
1044 class FastCloneShallowObjectStub : public HydrogenCodeStub { | |
1045 public: | 1044 public: |
1046 // Maximum number of properties in copied object. | 1045 // Maximum number of properties in copied object. |
1047 static const int kMaximumClonedProperties = 6; | 1046 static const int kMaximumClonedProperties = 6; |
1048 | 1047 |
1049 FastCloneShallowObjectStub(Isolate* isolate, int length) | 1048 FastCloneShallowObjectStub(Isolate* isolate, int length) |
1050 : HydrogenCodeStub(isolate) { | 1049 : TurboFanCodeStub(isolate) { |
1051 DCHECK_GE(length, 0); | 1050 DCHECK_GE(length, 0); |
1052 DCHECK_LE(length, kMaximumClonedProperties); | 1051 DCHECK_LE(length, kMaximumClonedProperties); |
1053 set_sub_minor_key(LengthBits::encode(length)); | 1052 minor_key_ = LengthBits::encode(LengthBits::encode(length)); |
1054 } | 1053 } |
1055 | 1054 |
1056 int length() const { return LengthBits::decode(sub_minor_key()); } | 1055 int length() const { return LengthBits::decode(minor_key_); } |
1057 | 1056 |
1058 private: | 1057 private: |
1059 class LengthBits : public BitField<int, 0, 4> {}; | 1058 class LengthBits : public BitField<int, 0, 4> {}; |
1060 | 1059 |
1061 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowObject); | 1060 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowObject); |
1062 DEFINE_HYDROGEN_CODE_STUB(FastCloneShallowObject, HydrogenCodeStub); | 1061 DEFINE_TURBOFAN_CODE_STUB(FastCloneShallowObject, TurboFanCodeStub); |
1063 }; | 1062 }; |
1064 | 1063 |
1065 | 1064 |
1066 class CreateAllocationSiteStub : public HydrogenCodeStub { | 1065 class CreateAllocationSiteStub : public HydrogenCodeStub { |
1067 public: | 1066 public: |
1068 explicit CreateAllocationSiteStub(Isolate* isolate) | 1067 explicit CreateAllocationSiteStub(Isolate* isolate) |
1069 : HydrogenCodeStub(isolate) { } | 1068 : HydrogenCodeStub(isolate) { } |
1070 | 1069 |
1071 static void GenerateAheadOfTime(Isolate* isolate); | 1070 static void GenerateAheadOfTime(Isolate* isolate); |
1072 | 1071 |
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3094 #undef DEFINE_HYDROGEN_CODE_STUB | 3093 #undef DEFINE_HYDROGEN_CODE_STUB |
3095 #undef DEFINE_CODE_STUB | 3094 #undef DEFINE_CODE_STUB |
3096 #undef DEFINE_CODE_STUB_BASE | 3095 #undef DEFINE_CODE_STUB_BASE |
3097 | 3096 |
3098 extern Representation RepresentationFromType(Type* type); | 3097 extern Representation RepresentationFromType(Type* type); |
3099 | 3098 |
3100 } // namespace internal | 3099 } // namespace internal |
3101 } // namespace v8 | 3100 } // namespace v8 |
3102 | 3101 |
3103 #endif // V8_CODE_STUBS_H_ | 3102 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |