OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 V(CreateAllocationSite) \ | 67 V(CreateAllocationSite) \ |
68 V(ToBoolean) \ | 68 V(ToBoolean) \ |
69 V(ToNumber) \ | 69 V(ToNumber) \ |
70 V(ArgumentsAccess) \ | 70 V(ArgumentsAccess) \ |
71 V(RegExpConstructResult) \ | 71 V(RegExpConstructResult) \ |
72 V(NumberToString) \ | 72 V(NumberToString) \ |
73 V(DoubleToI) \ | 73 V(DoubleToI) \ |
74 V(CEntry) \ | 74 V(CEntry) \ |
75 V(JSEntry) \ | 75 V(JSEntry) \ |
76 V(KeyedLoadElement) \ | 76 V(KeyedLoadElement) \ |
77 V(ArrayPush) \ | |
78 V(ArrayNoArgumentConstructor) \ | 77 V(ArrayNoArgumentConstructor) \ |
79 V(ArraySingleArgumentConstructor) \ | 78 V(ArraySingleArgumentConstructor) \ |
80 V(ArrayNArgumentsConstructor) \ | 79 V(ArrayNArgumentsConstructor) \ |
81 V(InternalArrayNoArgumentConstructor) \ | 80 V(InternalArrayNoArgumentConstructor) \ |
82 V(InternalArraySingleArgumentConstructor) \ | 81 V(InternalArraySingleArgumentConstructor) \ |
83 V(InternalArrayNArgumentsConstructor) \ | 82 V(InternalArrayNArgumentsConstructor) \ |
84 V(KeyedStoreElement) \ | 83 V(KeyedStoreElement) \ |
85 V(DebuggerStatement) \ | 84 V(DebuggerStatement) \ |
86 V(NameDictionaryLookup) \ | 85 V(NameDictionaryLookup) \ |
87 V(ElementsTransitionAndStore) \ | 86 V(ElementsTransitionAndStore) \ |
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 private: | 1157 private: |
1159 static void GenerateAheadOfTime(Isolate* isolate, | 1158 static void GenerateAheadOfTime(Isolate* isolate, |
1160 const BinaryOpIC::State& state); | 1159 const BinaryOpIC::State& state); |
1161 | 1160 |
1162 BinaryOpIC::State state_; | 1161 BinaryOpIC::State state_; |
1163 | 1162 |
1164 DISALLOW_COPY_AND_ASSIGN(BinaryOpICStub); | 1163 DISALLOW_COPY_AND_ASSIGN(BinaryOpICStub); |
1165 }; | 1164 }; |
1166 | 1165 |
1167 | 1166 |
1168 class ArrayPushStub: public PlatformCodeStub { | |
1169 public: | |
1170 ArrayPushStub(ElementsKind kind, int argc) { | |
1171 bit_field_ = ElementsKindBits::encode(kind) | ArgcBits::encode(argc); | |
1172 } | |
1173 | |
1174 void Generate(MacroAssembler* masm); | |
1175 | |
1176 private: | |
1177 int arguments_count() { return ArgcBits::decode(bit_field_); } | |
1178 ElementsKind elements_kind() { | |
1179 return ElementsKindBits::decode(bit_field_); | |
1180 } | |
1181 | |
1182 virtual CodeStub::Major MajorKey() { return ArrayPush; } | |
1183 virtual int MinorKey() { return bit_field_; } | |
1184 | |
1185 class ElementsKindBits: public BitField<ElementsKind, 0, 3> {}; | |
1186 class ArgcBits: public BitField<int, 3, Code::kArgumentsBits> {}; | |
1187 | |
1188 int bit_field_; | |
1189 }; | |
1190 | |
1191 | |
1192 // TODO(bmeurer): Merge this into the BinaryOpICStub once we have proper tail | 1167 // TODO(bmeurer): Merge this into the BinaryOpICStub once we have proper tail |
1193 // call support for stubs in Hydrogen. | 1168 // call support for stubs in Hydrogen. |
1194 class BinaryOpICWithAllocationSiteStub V8_FINAL : public PlatformCodeStub { | 1169 class BinaryOpICWithAllocationSiteStub V8_FINAL : public PlatformCodeStub { |
1195 public: | 1170 public: |
1196 explicit BinaryOpICWithAllocationSiteStub(const BinaryOpIC::State& state) | 1171 explicit BinaryOpICWithAllocationSiteStub(const BinaryOpIC::State& state) |
1197 : state_(state) {} | 1172 : state_(state) {} |
1198 | 1173 |
1199 static void GenerateAheadOfTime(Isolate* isolate); | 1174 static void GenerateAheadOfTime(Isolate* isolate); |
1200 | 1175 |
1201 Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate, | 1176 Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate, |
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2524 | 2499 |
2525 | 2500 |
2526 class CallDescriptors { | 2501 class CallDescriptors { |
2527 public: | 2502 public: |
2528 static void InitializeForIsolate(Isolate* isolate); | 2503 static void InitializeForIsolate(Isolate* isolate); |
2529 }; | 2504 }; |
2530 | 2505 |
2531 } } // namespace v8::internal | 2506 } } // namespace v8::internal |
2532 | 2507 |
2533 #endif // V8_CODE_STUBS_H_ | 2508 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |