| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 V(RegExpConstructResult) \ | 82 V(RegExpConstructResult) \ |
| 83 V(StoreFastElement) \ | 83 V(StoreFastElement) \ |
| 84 V(StoreScriptContextField) \ | 84 V(StoreScriptContextField) \ |
| 85 V(StringAdd) \ | 85 V(StringAdd) \ |
| 86 V(ToBoolean) \ | 86 V(ToBoolean) \ |
| 87 V(TransitionElementsKind) \ | 87 V(TransitionElementsKind) \ |
| 88 V(KeyedLoadIC) \ | 88 V(KeyedLoadIC) \ |
| 89 V(LoadIC) \ | 89 V(LoadIC) \ |
| 90 /* TurboFanCodeStubs */ \ | 90 /* TurboFanCodeStubs */ \ |
| 91 V(StringLengthTF) \ | 91 V(StringLengthTF) \ |
| 92 V(StringAddTF) \ |
| 92 V(MathFloor) \ | 93 V(MathFloor) \ |
| 93 /* IC Handler stubs */ \ | 94 /* IC Handler stubs */ \ |
| 94 V(ArrayBufferViewLoadField) \ | 95 V(ArrayBufferViewLoadField) \ |
| 95 V(LoadConstant) \ | 96 V(LoadConstant) \ |
| 96 V(LoadFastElement) \ | 97 V(LoadFastElement) \ |
| 97 V(LoadField) \ | 98 V(LoadField) \ |
| 98 V(KeyedLoadSloppyArguments) \ | 99 V(KeyedLoadSloppyArguments) \ |
| 99 V(StoreField) \ | 100 V(StoreField) \ |
| 100 V(StoreGlobal) \ | 101 V(StoreGlobal) \ |
| 101 V(StoreTransition) \ | 102 V(StoreTransition) \ |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 void Generate(MacroAssembler* masm) override; \ | 348 void Generate(MacroAssembler* masm) override; \ |
| 348 DEFINE_CODE_STUB(NAME, SUPER) | 349 DEFINE_CODE_STUB(NAME, SUPER) |
| 349 | 350 |
| 350 | 351 |
| 351 #define DEFINE_HYDROGEN_CODE_STUB(NAME, SUPER) \ | 352 #define DEFINE_HYDROGEN_CODE_STUB(NAME, SUPER) \ |
| 352 public: \ | 353 public: \ |
| 353 void InitializeDescriptor(CodeStubDescriptor* descriptor) override; \ | 354 void InitializeDescriptor(CodeStubDescriptor* descriptor) override; \ |
| 354 Handle<Code> GenerateCode() override; \ | 355 Handle<Code> GenerateCode() override; \ |
| 355 DEFINE_CODE_STUB(NAME, SUPER) | 356 DEFINE_CODE_STUB(NAME, SUPER) |
| 356 | 357 |
| 357 #define DEFINE_TURBOFAN_CODE_STUB(NAME, SUPER, DESC, STACK_PARAMS) \ | 358 #define DEFINE_TURBOFAN_CODE_STUB(NAME, SUPER) \ |
| 358 public: \ | 359 public: \ |
| 359 NAME##Stub(Isolate* isolate) : SUPER(isolate) {} \ | 360 const char* GetFunctionName() const override { return #NAME "_STUB"; } \ |
| 360 CallInterfaceDescriptor GetCallInterfaceDescriptor() override { \ | |
| 361 return DESC(isolate()); \ | |
| 362 }; \ | |
| 363 virtual const char* GetFunctionName() const override { \ | |
| 364 return #NAME "_STUB"; \ | |
| 365 } \ | |
| 366 int GetStackParameterCount() const override { return STACK_PARAMS; } \ | |
| 367 Code::StubType GetStubType() const override { return Code::FAST; } \ | |
| 368 DEFINE_CODE_STUB(NAME, SUPER) | 361 DEFINE_CODE_STUB(NAME, SUPER) |
| 369 | 362 |
| 370 #define DEFINE_HANDLER_CODE_STUB(NAME, SUPER) \ | 363 #define DEFINE_HANDLER_CODE_STUB(NAME, SUPER) \ |
| 371 public: \ | 364 public: \ |
| 372 Handle<Code> GenerateCode() override; \ | 365 Handle<Code> GenerateCode() override; \ |
| 373 DEFINE_CODE_STUB(NAME, SUPER) | 366 DEFINE_CODE_STUB(NAME, SUPER) |
| 374 | 367 |
| 375 #define DEFINE_CALL_INTERFACE_DESCRIPTOR(NAME) \ | 368 #define DEFINE_CALL_INTERFACE_DESCRIPTOR(NAME) \ |
| 376 public: \ | 369 public: \ |
| 377 CallInterfaceDescriptor GetCallInterfaceDescriptor() override { \ | 370 CallInterfaceDescriptor GetCallInterfaceDescriptor() override { \ |
| 378 return NAME##Descriptor(isolate()); \ | 371 return NAME##Descriptor(isolate()); \ |
| 379 } | 372 } |
| 380 | 373 |
| 381 // There are some code stubs we just can't describe right now with a | 374 // There are some code stubs we just can't describe right now with a |
| 382 // CallInterfaceDescriptor. Isolate behavior for those cases with this macro. | 375 // CallInterfaceDescriptor. Isolate behavior for those cases with this macro. |
| 383 // An attempt to retrieve a descriptor will fail. | 376 // An attempt to retrieve a descriptor will fail. |
| 384 #define DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR() \ | 377 #define DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR() \ |
| 385 public: \ | 378 public: \ |
| 386 CallInterfaceDescriptor GetCallInterfaceDescriptor() override { \ | 379 CallInterfaceDescriptor GetCallInterfaceDescriptor() override { \ |
| 387 UNREACHABLE(); \ | 380 UNREACHABLE(); \ |
| 388 return CallInterfaceDescriptor(); \ | 381 return CallInterfaceDescriptor(); \ |
| 389 } | 382 } |
| 390 | 383 |
| 391 | 384 |
| 392 class PlatformCodeStub : public CodeStub { | 385 class PlatformCodeStub : public CodeStub { |
| 393 public: | 386 public: |
| 394 // Retrieve the code for the stub. Generate the code if needed. | 387 // Retrieve the code for the stub. Generate the code if needed. |
| 395 Handle<Code> GenerateCode() override; | 388 Handle<Code> GenerateCode() override; |
| 396 | 389 |
| 397 Code::Kind GetCodeKind() const override { return Code::STUB; } | |
| 398 | |
| 399 protected: | 390 protected: |
| 400 explicit PlatformCodeStub(Isolate* isolate) : CodeStub(isolate) {} | 391 explicit PlatformCodeStub(Isolate* isolate) : CodeStub(isolate) {} |
| 401 | 392 |
| 402 // Generates the assembler code for the stub. | 393 // Generates the assembler code for the stub. |
| 403 virtual void Generate(MacroAssembler* masm) = 0; | 394 virtual void Generate(MacroAssembler* masm) = 0; |
| 404 | 395 |
| 405 DEFINE_CODE_STUB_BASE(PlatformCodeStub, CodeStub); | 396 DEFINE_CODE_STUB_BASE(PlatformCodeStub, CodeStub); |
| 406 }; | 397 }; |
| 407 | 398 |
| 408 | 399 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 }; | 478 }; |
| 488 | 479 |
| 489 | 480 |
| 490 class HydrogenCodeStub : public CodeStub { | 481 class HydrogenCodeStub : public CodeStub { |
| 491 public: | 482 public: |
| 492 enum InitializationState { | 483 enum InitializationState { |
| 493 UNINITIALIZED, | 484 UNINITIALIZED, |
| 494 INITIALIZED | 485 INITIALIZED |
| 495 }; | 486 }; |
| 496 | 487 |
| 497 Code::Kind GetCodeKind() const override { return Code::STUB; } | |
| 498 | |
| 499 template<class SubClass> | 488 template<class SubClass> |
| 500 static Handle<Code> GetUninitialized(Isolate* isolate) { | 489 static Handle<Code> GetUninitialized(Isolate* isolate) { |
| 501 SubClass::GenerateAheadOfTime(isolate); | 490 SubClass::GenerateAheadOfTime(isolate); |
| 502 return SubClass().GetCode(isolate); | 491 return SubClass().GetCode(isolate); |
| 503 } | 492 } |
| 504 | 493 |
| 505 // Retrieve the code for the stub. Generate the code if needed. | 494 // Retrieve the code for the stub. Generate the code if needed. |
| 506 Handle<Code> GenerateCode() override = 0; | 495 Handle<Code> GenerateCode() override = 0; |
| 507 | 496 |
| 508 bool IsUninitialized() const { return IsMissBits::decode(minor_key_); } | 497 bool IsUninitialized() const { return IsMissBits::decode(minor_key_); } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 532 class SubMinorKeyBits : public BitField<int, 0, kSubMinorKeyBits> {}; | 521 class SubMinorKeyBits : public BitField<int, 0, kSubMinorKeyBits> {}; |
| 533 | 522 |
| 534 void GenerateLightweightMiss(MacroAssembler* masm, ExternalReference miss); | 523 void GenerateLightweightMiss(MacroAssembler* masm, ExternalReference miss); |
| 535 | 524 |
| 536 DEFINE_CODE_STUB_BASE(HydrogenCodeStub, CodeStub); | 525 DEFINE_CODE_STUB_BASE(HydrogenCodeStub, CodeStub); |
| 537 }; | 526 }; |
| 538 | 527 |
| 539 | 528 |
| 540 class TurboFanCodeStub : public CodeStub { | 529 class TurboFanCodeStub : public CodeStub { |
| 541 public: | 530 public: |
| 542 Code::Kind GetCodeKind() const override { return Code::STUB; } | |
| 543 | |
| 544 // Retrieve the code for the stub. Generate the code if needed. | 531 // Retrieve the code for the stub. Generate the code if needed. |
| 545 Handle<Code> GenerateCode() override; | 532 Handle<Code> GenerateCode() override; |
| 546 | 533 |
| 534 Code::StubType GetStubType() const override { return Code::FAST; } |
| 535 |
| 547 virtual const char* GetFunctionName() const = 0; | 536 virtual const char* GetFunctionName() const = 0; |
| 548 | 537 |
| 549 protected: | 538 protected: |
| 550 explicit TurboFanCodeStub(Isolate* isolate) : CodeStub(isolate) {} | 539 explicit TurboFanCodeStub(Isolate* isolate) : CodeStub(isolate) {} |
| 551 | 540 |
| 552 private: | 541 private: |
| 553 DEFINE_CODE_STUB_BASE(TurboFanCodeStub, CodeStub); | 542 DEFINE_CODE_STUB_BASE(TurboFanCodeStub, CodeStub); |
| 554 }; | 543 }; |
| 555 | 544 |
| 556 | 545 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 public: | 603 public: |
| 615 NopRuntimeCallHelper() {} | 604 NopRuntimeCallHelper() {} |
| 616 | 605 |
| 617 virtual void BeforeCall(MacroAssembler* masm) const {} | 606 virtual void BeforeCall(MacroAssembler* masm) const {} |
| 618 | 607 |
| 619 virtual void AfterCall(MacroAssembler* masm) const {} | 608 virtual void AfterCall(MacroAssembler* masm) const {} |
| 620 }; | 609 }; |
| 621 | 610 |
| 622 | 611 |
| 623 class MathFloorStub : public TurboFanCodeStub { | 612 class MathFloorStub : public TurboFanCodeStub { |
| 624 DEFINE_TURBOFAN_CODE_STUB(MathFloor, TurboFanCodeStub, | 613 public: |
| 625 MathRoundVariantDescriptor, 1); | 614 explicit MathFloorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
| 615 int GetStackParameterCount() const override { return 1; } |
| 616 |
| 617 DEFINE_CALL_INTERFACE_DESCRIPTOR(MathRoundVariant); |
| 618 DEFINE_TURBOFAN_CODE_STUB(MathFloor, TurboFanCodeStub); |
| 626 }; | 619 }; |
| 627 | 620 |
| 628 | 621 |
| 629 class StringLengthTFStub : public TurboFanCodeStub { | 622 class StringLengthTFStub : public TurboFanCodeStub { |
| 630 DEFINE_TURBOFAN_CODE_STUB(StringLengthTF, TurboFanCodeStub, | 623 public: |
| 631 LoadWithVectorDescriptor, 0); | 624 explicit StringLengthTFStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
| 632 | 625 |
| 633 public: | |
| 634 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | 626 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
| 635 InlineCacheState GetICState() const override { return MONOMORPHIC; } | 627 InlineCacheState GetICState() const override { return MONOMORPHIC; } |
| 636 ExtraICState GetExtraICState() const override { return Code::LOAD_IC; } | 628 ExtraICState GetExtraICState() const override { return Code::LOAD_IC; } |
| 629 |
| 630 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
| 631 DEFINE_TURBOFAN_CODE_STUB(StringLengthTF, TurboFanCodeStub); |
| 637 }; | 632 }; |
| 638 | 633 |
| 639 | 634 |
| 635 enum StringAddFlags { |
| 636 // Omit both parameter checks. |
| 637 STRING_ADD_CHECK_NONE = 0, |
| 638 // Check left parameter. |
| 639 STRING_ADD_CHECK_LEFT = 1 << 0, |
| 640 // Check right parameter. |
| 641 STRING_ADD_CHECK_RIGHT = 1 << 1, |
| 642 // Check both parameters. |
| 643 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT |
| 644 }; |
| 645 |
| 646 |
| 647 std::ostream& operator<<(std::ostream& os, const StringAddFlags& flags); |
| 648 |
| 649 |
| 650 class StringAddTFStub : public TurboFanCodeStub { |
| 651 public: |
| 652 StringAddTFStub(Isolate* isolate, StringAddFlags flags, |
| 653 PretenureFlag pretenure_flag) |
| 654 : TurboFanCodeStub(isolate) { |
| 655 minor_key_ = StringAddFlagsBits::encode(flags) | |
| 656 PretenureFlagBits::encode(pretenure_flag); |
| 657 } |
| 658 |
| 659 StringAddFlags flags() const { |
| 660 return StringAddFlagsBits::decode(MinorKey()); |
| 661 } |
| 662 |
| 663 PretenureFlag pretenure_flag() const { |
| 664 return PretenureFlagBits::decode(MinorKey()); |
| 665 } |
| 666 |
| 667 private: |
| 668 class StringAddFlagsBits : public BitField<StringAddFlags, 0, 2> {}; |
| 669 class PretenureFlagBits : public BitField<PretenureFlag, 2, 1> {}; |
| 670 |
| 671 void PrintBaseName(std::ostream& os) const override; // NOLINT |
| 672 |
| 673 DEFINE_CALL_INTERFACE_DESCRIPTOR(StringAdd); |
| 674 DEFINE_TURBOFAN_CODE_STUB(StringAddTF, TurboFanCodeStub); |
| 675 }; |
| 676 |
| 677 |
| 640 class NumberToStringStub final : public HydrogenCodeStub { | 678 class NumberToStringStub final : public HydrogenCodeStub { |
| 641 public: | 679 public: |
| 642 explicit NumberToStringStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} | 680 explicit NumberToStringStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} |
| 643 | 681 |
| 644 // Parameters accessed via CodeStubGraphBuilder::GetParameter() | 682 // Parameters accessed via CodeStubGraphBuilder::GetParameter() |
| 645 static const int kNumber = 0; | 683 static const int kNumber = 0; |
| 646 | 684 |
| 647 DEFINE_CALL_INTERFACE_DESCRIPTOR(NumberToString); | 685 DEFINE_CALL_INTERFACE_DESCRIPTOR(NumberToString); |
| 648 DEFINE_HYDROGEN_CODE_STUB(NumberToString, HydrogenCodeStub); | 686 DEFINE_HYDROGEN_CODE_STUB(NumberToString, HydrogenCodeStub); |
| 649 }; | 687 }; |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1466 // Parameters accessed via CodeStubGraphBuilder::GetParameter() | 1504 // Parameters accessed via CodeStubGraphBuilder::GetParameter() |
| 1467 static const int kAllocationSite = 0; | 1505 static const int kAllocationSite = 0; |
| 1468 static const int kLeft = 1; | 1506 static const int kLeft = 1; |
| 1469 static const int kRight = 2; | 1507 static const int kRight = 2; |
| 1470 | 1508 |
| 1471 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithAllocationSite); | 1509 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithAllocationSite); |
| 1472 DEFINE_HYDROGEN_CODE_STUB(BinaryOpWithAllocationSite, BinaryOpICStub); | 1510 DEFINE_HYDROGEN_CODE_STUB(BinaryOpWithAllocationSite, BinaryOpICStub); |
| 1473 }; | 1511 }; |
| 1474 | 1512 |
| 1475 | 1513 |
| 1476 enum StringAddFlags { | |
| 1477 // Omit both parameter checks. | |
| 1478 STRING_ADD_CHECK_NONE = 0, | |
| 1479 // Check left parameter. | |
| 1480 STRING_ADD_CHECK_LEFT = 1 << 0, | |
| 1481 // Check right parameter. | |
| 1482 STRING_ADD_CHECK_RIGHT = 1 << 1, | |
| 1483 // Check both parameters. | |
| 1484 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT | |
| 1485 }; | |
| 1486 | |
| 1487 | |
| 1488 class StringAddStub final : public HydrogenCodeStub { | 1514 class StringAddStub final : public HydrogenCodeStub { |
| 1489 public: | 1515 public: |
| 1490 StringAddStub(Isolate* isolate, StringAddFlags flags, | 1516 StringAddStub(Isolate* isolate, StringAddFlags flags, |
| 1491 PretenureFlag pretenure_flag) | 1517 PretenureFlag pretenure_flag) |
| 1492 : HydrogenCodeStub(isolate) { | 1518 : HydrogenCodeStub(isolate) { |
| 1493 set_sub_minor_key(StringAddFlagsBits::encode(flags) | | 1519 set_sub_minor_key(StringAddFlagsBits::encode(flags) | |
| 1494 PretenureFlagBits::encode(pretenure_flag)); | 1520 PretenureFlagBits::encode(pretenure_flag)); |
| 1495 } | 1521 } |
| 1496 | 1522 |
| 1497 StringAddFlags flags() const { | 1523 StringAddFlags flags() const { |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1784 public: | 1810 public: |
| 1785 explicit RestParamAccessStub(Isolate* isolate) : PlatformCodeStub(isolate) { } | 1811 explicit RestParamAccessStub(Isolate* isolate) : PlatformCodeStub(isolate) { } |
| 1786 | 1812 |
| 1787 CallInterfaceDescriptor GetCallInterfaceDescriptor() override { | 1813 CallInterfaceDescriptor GetCallInterfaceDescriptor() override { |
| 1788 return ContextOnlyDescriptor(isolate()); | 1814 return ContextOnlyDescriptor(isolate()); |
| 1789 } | 1815 } |
| 1790 | 1816 |
| 1791 private: | 1817 private: |
| 1792 void GenerateNew(MacroAssembler* masm); | 1818 void GenerateNew(MacroAssembler* masm); |
| 1793 | 1819 |
| 1794 virtual void PrintName(std::ostream& os) const override; // NOLINT | 1820 void PrintName(std::ostream& os) const override; // NOLINT |
| 1795 | 1821 |
| 1796 DEFINE_PLATFORM_CODE_STUB(RestParamAccess, PlatformCodeStub); | 1822 DEFINE_PLATFORM_CODE_STUB(RestParamAccess, PlatformCodeStub); |
| 1797 }; | 1823 }; |
| 1798 | 1824 |
| 1799 | 1825 |
| 1800 class RegExpExecStub: public PlatformCodeStub { | 1826 class RegExpExecStub: public PlatformCodeStub { |
| 1801 public: | 1827 public: |
| 1802 explicit RegExpExecStub(Isolate* isolate) : PlatformCodeStub(isolate) { } | 1828 explicit RegExpExecStub(Isolate* isolate) : PlatformCodeStub(isolate) { } |
| 1803 | 1829 |
| 1804 DEFINE_CALL_INTERFACE_DESCRIPTOR(ContextOnly); | 1830 DEFINE_CALL_INTERFACE_DESCRIPTOR(ContextOnly); |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2170 | 2196 |
| 2171 class LoadICStub : public PlatformCodeStub { | 2197 class LoadICStub : public PlatformCodeStub { |
| 2172 public: | 2198 public: |
| 2173 explicit LoadICStub(Isolate* isolate, const LoadICState& state) | 2199 explicit LoadICStub(Isolate* isolate, const LoadICState& state) |
| 2174 : PlatformCodeStub(isolate) { | 2200 : PlatformCodeStub(isolate) { |
| 2175 minor_key_ = state.GetExtraICState(); | 2201 minor_key_ = state.GetExtraICState(); |
| 2176 } | 2202 } |
| 2177 | 2203 |
| 2178 void GenerateForTrampoline(MacroAssembler* masm); | 2204 void GenerateForTrampoline(MacroAssembler* masm); |
| 2179 | 2205 |
| 2180 virtual Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } | 2206 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } |
| 2181 | 2207 |
| 2182 virtual InlineCacheState GetICState() const final override { return DEFAULT; } | 2208 InlineCacheState GetICState() const final override { return DEFAULT; } |
| 2183 | 2209 |
| 2184 virtual ExtraICState GetExtraICState() const final override { | 2210 ExtraICState GetExtraICState() const final override { |
| 2185 return static_cast<ExtraICState>(minor_key_); | 2211 return static_cast<ExtraICState>(minor_key_); |
| 2186 } | 2212 } |
| 2187 | 2213 |
| 2188 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 2214 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
| 2189 DEFINE_PLATFORM_CODE_STUB(LoadIC, PlatformCodeStub); | 2215 DEFINE_PLATFORM_CODE_STUB(LoadIC, PlatformCodeStub); |
| 2190 | 2216 |
| 2191 protected: | 2217 protected: |
| 2192 void GenerateImpl(MacroAssembler* masm, bool in_frame); | 2218 void GenerateImpl(MacroAssembler* masm, bool in_frame); |
| 2193 }; | 2219 }; |
| 2194 | 2220 |
| 2195 | 2221 |
| 2196 class KeyedLoadICStub : public PlatformCodeStub { | 2222 class KeyedLoadICStub : public PlatformCodeStub { |
| 2197 public: | 2223 public: |
| 2198 explicit KeyedLoadICStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 2224 explicit KeyedLoadICStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
| 2199 | 2225 |
| 2200 void GenerateForTrampoline(MacroAssembler* masm); | 2226 void GenerateForTrampoline(MacroAssembler* masm); |
| 2201 | 2227 |
| 2202 virtual Code::Kind GetCodeKind() const override { | 2228 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
| 2203 return Code::KEYED_LOAD_IC; | |
| 2204 } | |
| 2205 | 2229 |
| 2206 virtual InlineCacheState GetICState() const final override { return DEFAULT; } | 2230 InlineCacheState GetICState() const final override { return DEFAULT; } |
| 2207 | 2231 |
| 2208 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 2232 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
| 2209 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub); | 2233 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub); |
| 2210 | 2234 |
| 2211 protected: | 2235 protected: |
| 2212 void GenerateImpl(MacroAssembler* masm, bool in_frame); | 2236 void GenerateImpl(MacroAssembler* masm, bool in_frame); |
| 2213 }; | 2237 }; |
| 2214 | 2238 |
| 2215 | 2239 |
| 2216 class DoubleToIStub : public PlatformCodeStub { | 2240 class DoubleToIStub : public PlatformCodeStub { |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2852 | 2876 |
| 2853 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2877 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
| 2854 #undef DEFINE_PLATFORM_CODE_STUB | 2878 #undef DEFINE_PLATFORM_CODE_STUB |
| 2855 #undef DEFINE_HANDLER_CODE_STUB | 2879 #undef DEFINE_HANDLER_CODE_STUB |
| 2856 #undef DEFINE_HYDROGEN_CODE_STUB | 2880 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2857 #undef DEFINE_CODE_STUB | 2881 #undef DEFINE_CODE_STUB |
| 2858 #undef DEFINE_CODE_STUB_BASE | 2882 #undef DEFINE_CODE_STUB_BASE |
| 2859 } } // namespace v8::internal | 2883 } } // namespace v8::internal |
| 2860 | 2884 |
| 2861 #endif // V8_CODE_STUBS_H_ | 2885 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |