| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 V(CreateAllocationSite) \ | 71 V(CreateAllocationSite) \ |
| 72 V(ToBoolean) \ | 72 V(ToBoolean) \ |
| 73 V(ToNumber) \ | 73 V(ToNumber) \ |
| 74 V(ArgumentsAccess) \ | 74 V(ArgumentsAccess) \ |
| 75 V(RegExpConstructResult) \ | 75 V(RegExpConstructResult) \ |
| 76 V(NumberToString) \ | 76 V(NumberToString) \ |
| 77 V(DoubleToI) \ | 77 V(DoubleToI) \ |
| 78 V(CEntry) \ | 78 V(CEntry) \ |
| 79 V(JSEntry) \ | 79 V(JSEntry) \ |
| 80 V(KeyedLoadElement) \ | 80 V(KeyedLoadElement) \ |
| 81 V(ArrayPush) \ |
| 81 V(ArrayNoArgumentConstructor) \ | 82 V(ArrayNoArgumentConstructor) \ |
| 82 V(ArraySingleArgumentConstructor) \ | 83 V(ArraySingleArgumentConstructor) \ |
| 83 V(ArrayNArgumentsConstructor) \ | 84 V(ArrayNArgumentsConstructor) \ |
| 84 V(InternalArrayNoArgumentConstructor) \ | 85 V(InternalArrayNoArgumentConstructor) \ |
| 85 V(InternalArraySingleArgumentConstructor) \ | 86 V(InternalArraySingleArgumentConstructor) \ |
| 86 V(InternalArrayNArgumentsConstructor) \ | 87 V(InternalArrayNArgumentsConstructor) \ |
| 87 V(KeyedStoreElement) \ | 88 V(KeyedStoreElement) \ |
| 88 V(DebuggerStatement) \ | 89 V(DebuggerStatement) \ |
| 89 V(NameDictionaryLookup) \ | 90 V(NameDictionaryLookup) \ |
| 90 V(ElementsTransitionAndStore) \ | 91 V(ElementsTransitionAndStore) \ |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1144 private: | 1145 private: |
| 1145 static void GenerateAheadOfTime(Isolate* isolate, | 1146 static void GenerateAheadOfTime(Isolate* isolate, |
| 1146 const BinaryOpIC::State& state); | 1147 const BinaryOpIC::State& state); |
| 1147 | 1148 |
| 1148 BinaryOpIC::State state_; | 1149 BinaryOpIC::State state_; |
| 1149 | 1150 |
| 1150 DISALLOW_COPY_AND_ASSIGN(BinaryOpICStub); | 1151 DISALLOW_COPY_AND_ASSIGN(BinaryOpICStub); |
| 1151 }; | 1152 }; |
| 1152 | 1153 |
| 1153 | 1154 |
| 1155 class ArrayPushStub: public PlatformCodeStub { |
| 1156 public: |
| 1157 ArrayPushStub(ElementsKind kind, int argc) { |
| 1158 bit_field_ = ElementsKindBits::encode(kind) | ArgcBits::encode(argc); |
| 1159 } |
| 1160 |
| 1161 void Generate(MacroAssembler* masm); |
| 1162 |
| 1163 private: |
| 1164 int arguments_count() { return ArgcBits::decode(bit_field_); } |
| 1165 ElementsKind elements_kind() { |
| 1166 return ElementsKindBits::decode(bit_field_); |
| 1167 } |
| 1168 |
| 1169 virtual CodeStub::Major MajorKey() { return ArrayPush; } |
| 1170 virtual int MinorKey() { return bit_field_; } |
| 1171 |
| 1172 class ElementsKindBits: public BitField<ElementsKind, 0, 3> {}; |
| 1173 class ArgcBits: public BitField<int, 3, Code::kArgumentsBits> {}; |
| 1174 |
| 1175 int bit_field_; |
| 1176 }; |
| 1177 |
| 1178 |
| 1154 // TODO(bmeurer): Merge this into the BinaryOpICStub once we have proper tail | 1179 // TODO(bmeurer): Merge this into the BinaryOpICStub once we have proper tail |
| 1155 // call support for stubs in Hydrogen. | 1180 // call support for stubs in Hydrogen. |
| 1156 class BinaryOpICWithAllocationSiteStub V8_FINAL : public PlatformCodeStub { | 1181 class BinaryOpICWithAllocationSiteStub V8_FINAL : public PlatformCodeStub { |
| 1157 public: | 1182 public: |
| 1158 explicit BinaryOpICWithAllocationSiteStub(const BinaryOpIC::State& state) | 1183 explicit BinaryOpICWithAllocationSiteStub(const BinaryOpIC::State& state) |
| 1159 : state_(state) {} | 1184 : state_(state) {} |
| 1160 | 1185 |
| 1161 static void GenerateAheadOfTime(Isolate* isolate); | 1186 static void GenerateAheadOfTime(Isolate* isolate); |
| 1162 | 1187 |
| 1163 Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate, | 1188 Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate, |
| (...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2466 | 2491 |
| 2467 | 2492 |
| 2468 class CallDescriptors { | 2493 class CallDescriptors { |
| 2469 public: | 2494 public: |
| 2470 static void InitializeForIsolate(Isolate* isolate); | 2495 static void InitializeForIsolate(Isolate* isolate); |
| 2471 }; | 2496 }; |
| 2472 | 2497 |
| 2473 } } // namespace v8::internal | 2498 } } // namespace v8::internal |
| 2474 | 2499 |
| 2475 #endif // V8_CODE_STUBS_H_ | 2500 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |