OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 | 449 |
450 private: | 450 private: |
451 Major MajorKey() { return RegExpCEntry; } | 451 Major MajorKey() { return RegExpCEntry; } |
452 int MinorKey() { return 0; } | 452 int MinorKey() { return 0; } |
453 | 453 |
454 bool NeedsImmovableCode() { return true; } | 454 bool NeedsImmovableCode() { return true; } |
455 | 455 |
456 const char* GetName() { return "RegExpCEntryStub"; } | 456 const char* GetName() { return "RegExpCEntryStub"; } |
457 }; | 457 }; |
458 | 458 |
| 459 // Trampoline stub to call into native code. To call safely into native code |
| 460 // in the presence of compacting GC (which can move code objects) we need to |
| 461 // keep the code which called into native pinned in the memory. Currently the |
| 462 // simplest approach is to generate such stub early enough so it can never be |
| 463 // moved by GC |
| 464 class DirectCEntryStub: public CodeStub { |
| 465 public: |
| 466 DirectCEntryStub() {} |
| 467 void Generate(MacroAssembler* masm); |
| 468 void GenerateCall(MacroAssembler* masm, |
| 469 ExternalReference function); |
| 470 void GenerateCall(MacroAssembler* masm, Register target); |
| 471 |
| 472 private: |
| 473 Major MajorKey() { return DirectCEntry; } |
| 474 int MinorKey() { return 0; } |
| 475 |
| 476 bool NeedsImmovableCode() { return true; } |
| 477 |
| 478 const char* GetName() { return "DirectCEntryStub"; } |
| 479 }; |
459 | 480 |
460 class FloatingPointHelper : public AllStatic { | 481 class FloatingPointHelper : public AllStatic { |
461 public: | 482 public: |
462 | 483 |
463 enum Destination { | 484 enum Destination { |
464 kFPURegisters, | 485 kFPURegisters, |
465 kCoreRegisters | 486 kCoreRegisters |
466 }; | 487 }; |
467 | 488 |
468 | 489 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 | 622 |
602 | 623 |
603 class StringDictionaryLookupStub: public CodeStub { | 624 class StringDictionaryLookupStub: public CodeStub { |
604 public: | 625 public: |
605 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; | 626 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
606 | 627 |
607 explicit StringDictionaryLookupStub(LookupMode mode) : mode_(mode) { } | 628 explicit StringDictionaryLookupStub(LookupMode mode) : mode_(mode) { } |
608 | 629 |
609 void Generate(MacroAssembler* masm); | 630 void Generate(MacroAssembler* masm); |
610 | 631 |
611 static void GenerateNegativeLookup(MacroAssembler* masm, | 632 MUST_USE_RESULT static MaybeObject* GenerateNegativeLookup( |
612 Label* miss, | 633 MacroAssembler* masm, |
613 Label* done, | 634 Label* miss, |
614 Register receiver, | 635 Label* done, |
615 Register properties, | 636 Register receiver, |
616 String* name, | 637 Register properties, |
617 Register scratch0) ; | 638 String* name, |
| 639 Register scratch0); |
618 | 640 |
619 static void GeneratePositiveLookup(MacroAssembler* masm, | 641 static void GeneratePositiveLookup(MacroAssembler* masm, |
620 Label* miss, | 642 Label* miss, |
621 Label* done, | 643 Label* done, |
622 Register elements, | 644 Register elements, |
623 Register name, | 645 Register name, |
624 Register r0, | 646 Register r0, |
625 Register r1); | 647 Register r1); |
626 | 648 |
627 private: | 649 private: |
(...skipping 23 matching lines...) Expand all Loading... |
651 | 673 |
652 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 674 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
653 | 675 |
654 LookupMode mode_; | 676 LookupMode mode_; |
655 }; | 677 }; |
656 | 678 |
657 | 679 |
658 } } // namespace v8::internal | 680 } } // namespace v8::internal |
659 | 681 |
660 #endif // V8_MIPS_CODE_STUBS_ARM_H_ | 682 #endif // V8_MIPS_CODE_STUBS_ARM_H_ |
OLD | NEW |