| 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 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 public: | 1222 public: |
| 1223 explicit CallApiGetterStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 1223 explicit CallApiGetterStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
| 1224 | 1224 |
| 1225 DEFINE_CALL_INTERFACE_DESCRIPTOR(ApiGetter); | 1225 DEFINE_CALL_INTERFACE_DESCRIPTOR(ApiGetter); |
| 1226 DEFINE_PLATFORM_CODE_STUB(CallApiGetter, PlatformCodeStub); | 1226 DEFINE_PLATFORM_CODE_STUB(CallApiGetter, PlatformCodeStub); |
| 1227 }; | 1227 }; |
| 1228 | 1228 |
| 1229 | 1229 |
| 1230 class BinaryOpICStub : public HydrogenCodeStub { | 1230 class BinaryOpICStub : public HydrogenCodeStub { |
| 1231 public: | 1231 public: |
| 1232 BinaryOpICStub(Isolate* isolate, Token::Value op, | 1232 BinaryOpICStub(Isolate* isolate, Token::Value op) |
| 1233 OverwriteMode mode = NO_OVERWRITE) | |
| 1234 : HydrogenCodeStub(isolate, UNINITIALIZED) { | 1233 : HydrogenCodeStub(isolate, UNINITIALIZED) { |
| 1235 BinaryOpICState state(isolate, op, mode); | 1234 BinaryOpICState state(isolate, op); |
| 1236 set_sub_minor_key(state.GetExtraICState()); | 1235 set_sub_minor_key(state.GetExtraICState()); |
| 1237 } | 1236 } |
| 1238 | 1237 |
| 1239 BinaryOpICStub(Isolate* isolate, const BinaryOpICState& state) | 1238 BinaryOpICStub(Isolate* isolate, const BinaryOpICState& state) |
| 1240 : HydrogenCodeStub(isolate) { | 1239 : HydrogenCodeStub(isolate) { |
| 1241 set_sub_minor_key(state.GetExtraICState()); | 1240 set_sub_minor_key(state.GetExtraICState()); |
| 1242 } | 1241 } |
| 1243 | 1242 |
| 1244 static void GenerateAheadOfTime(Isolate* isolate); | 1243 static void GenerateAheadOfTime(Isolate* isolate); |
| 1245 | 1244 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1306 static void GenerateAheadOfTime(Isolate* isolate, | 1305 static void GenerateAheadOfTime(Isolate* isolate, |
| 1307 const BinaryOpICState& state); | 1306 const BinaryOpICState& state); |
| 1308 | 1307 |
| 1309 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithAllocationSite); | 1308 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithAllocationSite); |
| 1310 DEFINE_PLATFORM_CODE_STUB(BinaryOpICWithAllocationSite, PlatformCodeStub); | 1309 DEFINE_PLATFORM_CODE_STUB(BinaryOpICWithAllocationSite, PlatformCodeStub); |
| 1311 }; | 1310 }; |
| 1312 | 1311 |
| 1313 | 1312 |
| 1314 class BinaryOpWithAllocationSiteStub FINAL : public BinaryOpICStub { | 1313 class BinaryOpWithAllocationSiteStub FINAL : public BinaryOpICStub { |
| 1315 public: | 1314 public: |
| 1316 BinaryOpWithAllocationSiteStub(Isolate* isolate, | 1315 BinaryOpWithAllocationSiteStub(Isolate* isolate, Token::Value op) |
| 1317 Token::Value op, | 1316 : BinaryOpICStub(isolate, op) {} |
| 1318 OverwriteMode mode) | |
| 1319 : BinaryOpICStub(isolate, op, mode) {} | |
| 1320 | 1317 |
| 1321 BinaryOpWithAllocationSiteStub(Isolate* isolate, const BinaryOpICState& state) | 1318 BinaryOpWithAllocationSiteStub(Isolate* isolate, const BinaryOpICState& state) |
| 1322 : BinaryOpICStub(isolate, state) {} | 1319 : BinaryOpICStub(isolate, state) {} |
| 1323 | 1320 |
| 1324 Code::Kind GetCodeKind() const FINAL { return Code::STUB; } | 1321 Code::Kind GetCodeKind() const FINAL { return Code::STUB; } |
| 1325 | 1322 |
| 1326 // Parameters accessed via CodeStubGraphBuilder::GetParameter() | 1323 // Parameters accessed via CodeStubGraphBuilder::GetParameter() |
| 1327 static const int kAllocationSite = 0; | 1324 static const int kAllocationSite = 0; |
| 1328 static const int kLeft = 1; | 1325 static const int kLeft = 1; |
| 1329 static const int kRight = 2; | 1326 static const int kRight = 2; |
| (...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2686 | 2683 |
| 2687 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2684 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
| 2688 #undef DEFINE_PLATFORM_CODE_STUB | 2685 #undef DEFINE_PLATFORM_CODE_STUB |
| 2689 #undef DEFINE_HANDLER_CODE_STUB | 2686 #undef DEFINE_HANDLER_CODE_STUB |
| 2690 #undef DEFINE_HYDROGEN_CODE_STUB | 2687 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2691 #undef DEFINE_CODE_STUB | 2688 #undef DEFINE_CODE_STUB |
| 2692 #undef DEFINE_CODE_STUB_BASE | 2689 #undef DEFINE_CODE_STUB_BASE |
| 2693 } } // namespace v8::internal | 2690 } } // namespace v8::internal |
| 2694 | 2691 |
| 2695 #endif // V8_CODE_STUBS_H_ | 2692 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |