| 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 | 535 |
| 536 DEFINE_CODE_STUB_BASE(HydrogenCodeStub, CodeStub); | 536 DEFINE_CODE_STUB_BASE(HydrogenCodeStub, CodeStub); |
| 537 }; | 537 }; |
| 538 | 538 |
| 539 | 539 |
| 540 class TurboFanCodeStub : public CodeStub { | 540 class TurboFanCodeStub : public CodeStub { |
| 541 public: | 541 public: |
| 542 // Retrieve the code for the stub. Generate the code if needed. | 542 // Retrieve the code for the stub. Generate the code if needed. |
| 543 Handle<Code> GenerateCode() override; | 543 Handle<Code> GenerateCode() override; |
| 544 | 544 |
| 545 virtual int GetStackParameterCount() const override { | 545 int GetStackParameterCount() const override { |
| 546 return GetCallInterfaceDescriptor().GetStackParameterCount(); | 546 return GetCallInterfaceDescriptor().GetStackParameterCount(); |
| 547 } | 547 } |
| 548 | 548 |
| 549 Code::StubType GetStubType() const override { return Code::FAST; } | 549 Code::StubType GetStubType() const override { return Code::FAST; } |
| 550 | 550 |
| 551 protected: | 551 protected: |
| 552 explicit TurboFanCodeStub(Isolate* isolate) : CodeStub(isolate) {} | 552 explicit TurboFanCodeStub(Isolate* isolate) : CodeStub(isolate) {} |
| 553 | 553 |
| 554 private: | 554 private: |
| 555 DEFINE_CODE_STUB_BASE(TurboFanCodeStub, CodeStub); | 555 DEFINE_CODE_STUB_BASE(TurboFanCodeStub, CodeStub); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 namespace v8 { | 626 namespace v8 { |
| 627 namespace internal { | 627 namespace internal { |
| 628 | 628 |
| 629 | 629 |
| 630 // RuntimeCallHelper implementation used in stubs: enters/leaves a | 630 // RuntimeCallHelper implementation used in stubs: enters/leaves a |
| 631 // newly created internal frame before/after the runtime call. | 631 // newly created internal frame before/after the runtime call. |
| 632 class StubRuntimeCallHelper : public RuntimeCallHelper { | 632 class StubRuntimeCallHelper : public RuntimeCallHelper { |
| 633 public: | 633 public: |
| 634 StubRuntimeCallHelper() {} | 634 StubRuntimeCallHelper() {} |
| 635 | 635 |
| 636 virtual void BeforeCall(MacroAssembler* masm) const; | 636 void BeforeCall(MacroAssembler* masm) const override; |
| 637 | 637 |
| 638 virtual void AfterCall(MacroAssembler* masm) const; | 638 void AfterCall(MacroAssembler* masm) const override; |
| 639 }; | 639 }; |
| 640 | 640 |
| 641 | 641 |
| 642 // Trivial RuntimeCallHelper implementation. | 642 // Trivial RuntimeCallHelper implementation. |
| 643 class NopRuntimeCallHelper : public RuntimeCallHelper { | 643 class NopRuntimeCallHelper : public RuntimeCallHelper { |
| 644 public: | 644 public: |
| 645 NopRuntimeCallHelper() {} | 645 NopRuntimeCallHelper() {} |
| 646 | 646 |
| 647 virtual void BeforeCall(MacroAssembler* masm) const {} | 647 void BeforeCall(MacroAssembler* masm) const override {} |
| 648 | 648 |
| 649 virtual void AfterCall(MacroAssembler* masm) const {} | 649 void AfterCall(MacroAssembler* masm) const override {} |
| 650 }; | 650 }; |
| 651 | 651 |
| 652 | 652 |
| 653 class MathFloorStub : public TurboFanIC { | 653 class MathFloorStub : public TurboFanIC { |
| 654 public: | 654 public: |
| 655 explicit MathFloorStub(Isolate* isolate, TurboFanIC::CallMode mode) | 655 explicit MathFloorStub(Isolate* isolate, TurboFanIC::CallMode mode) |
| 656 : TurboFanIC(isolate, mode) {} | 656 : TurboFanIC(isolate, mode) {} |
| 657 Code::Kind GetCodeKind() const override { return Code::CALL_IC; } | 657 Code::Kind GetCodeKind() const override { return Code::CALL_IC; } |
| 658 DEFINE_TURBOFAN_IC(MathFloor, TurboFanIC, MathRoundVariant); | 658 DEFINE_TURBOFAN_IC(MathFloor, TurboFanIC, MathRoundVariant); |
| 659 }; | 659 }; |
| (...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2422 public: | 2422 public: |
| 2423 VectorKeyedStoreICStub(Isolate* isolate, const StoreICState& state) | 2423 VectorKeyedStoreICStub(Isolate* isolate, const StoreICState& state) |
| 2424 : PlatformCodeStub(isolate) { | 2424 : PlatformCodeStub(isolate) { |
| 2425 minor_key_ = state.GetExtraICState(); | 2425 minor_key_ = state.GetExtraICState(); |
| 2426 } | 2426 } |
| 2427 | 2427 |
| 2428 void GenerateForTrampoline(MacroAssembler* masm); | 2428 void GenerateForTrampoline(MacroAssembler* masm); |
| 2429 | 2429 |
| 2430 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; } | 2430 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; } |
| 2431 InlineCacheState GetICState() const final { return GENERIC; } | 2431 InlineCacheState GetICState() const final { return GENERIC; } |
| 2432 virtual ExtraICState GetExtraICState() const final { | 2432 ExtraICState GetExtraICState() const final { |
| 2433 return static_cast<ExtraICState>(minor_key_); | 2433 return static_cast<ExtraICState>(minor_key_); |
| 2434 } | 2434 } |
| 2435 | 2435 |
| 2436 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); | 2436 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); |
| 2437 DEFINE_PLATFORM_CODE_STUB(VectorKeyedStoreIC, PlatformCodeStub); | 2437 DEFINE_PLATFORM_CODE_STUB(VectorKeyedStoreIC, PlatformCodeStub); |
| 2438 | 2438 |
| 2439 protected: | 2439 protected: |
| 2440 void GenerateImpl(MacroAssembler* masm, bool in_frame); | 2440 void GenerateImpl(MacroAssembler* masm, bool in_frame); |
| 2441 }; | 2441 }; |
| 2442 | 2442 |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3131 #undef DEFINE_HYDROGEN_CODE_STUB | 3131 #undef DEFINE_HYDROGEN_CODE_STUB |
| 3132 #undef DEFINE_CODE_STUB | 3132 #undef DEFINE_CODE_STUB |
| 3133 #undef DEFINE_CODE_STUB_BASE | 3133 #undef DEFINE_CODE_STUB_BASE |
| 3134 | 3134 |
| 3135 extern Representation RepresentationFromType(Type* type); | 3135 extern Representation RepresentationFromType(Type* type); |
| 3136 | 3136 |
| 3137 } // namespace internal | 3137 } // namespace internal |
| 3138 } // namespace v8 | 3138 } // namespace v8 |
| 3139 | 3139 |
| 3140 #endif // V8_CODE_STUBS_H_ | 3140 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |