Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: src/arm/assembler-arm.h

Issue 2869683004: [arm] Share constant pool entries in snapshot. (Closed)
Patch Set: Update tools/v8heapconst.py Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | src/disassembler.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 // containers for constants and code target addresses until they are emitted 1719 // containers for constants and code target addresses until they are emitted
1720 // to the constant pool. These records are temporarily stored in a separate 1720 // to the constant pool. These records are temporarily stored in a separate
1721 // buffer until a constant pool is emitted. 1721 // buffer until a constant pool is emitted.
1722 // If every instruction in a long sequence is accessing the pool, we need one 1722 // If every instruction in a long sequence is accessing the pool, we need one
1723 // pending relocation entry per instruction. 1723 // pending relocation entry per instruction.
1724 1724
1725 // The buffers of pending constant pool entries. 1725 // The buffers of pending constant pool entries.
1726 std::vector<ConstantPoolEntry> pending_32_bit_constants_; 1726 std::vector<ConstantPoolEntry> pending_32_bit_constants_;
1727 std::vector<ConstantPoolEntry> pending_64_bit_constants_; 1727 std::vector<ConstantPoolEntry> pending_64_bit_constants_;
1728 1728
1729 // Map of address of handle to index in pending_32_bit_constants_.
1730 std::map<Address, int> handle_to_index_map_;
1731
1729 private: 1732 private:
1730 // Avoid overflows for displacements etc. 1733 // Avoid overflows for displacements etc.
1731 static const int kMaximalBufferSize = 512 * MB; 1734 static const int kMaximalBufferSize = 512 * MB;
1732 1735
1733 int next_buffer_check_; // pc offset of next buffer check 1736 int next_buffer_check_; // pc offset of next buffer check
1734 1737
1735 // Constant pool generation 1738 // Constant pool generation
1736 // Pools are emitted in the instruction stream, preferably after unconditional 1739 // Pools are emitted in the instruction stream, preferably after unconditional
1737 // jumps or after returns from functions (in dead code locations). 1740 // jumps or after returns from functions (in dead code locations).
1738 // If a long code sequence does not contain unconditional jumps, it is 1741 // If a long code sequence does not contain unconditional jumps, it is
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 void addrmod4(Instr instr, Register rn, RegList rl); 1780 void addrmod4(Instr instr, Register rn, RegList rl);
1778 void addrmod5(Instr instr, CRegister crd, const MemOperand& x); 1781 void addrmod5(Instr instr, CRegister crd, const MemOperand& x);
1779 1782
1780 // Labels 1783 // Labels
1781 void print(Label* L); 1784 void print(Label* L);
1782 void bind_to(Label* L, int pos); 1785 void bind_to(Label* L, int pos);
1783 void next(Label* L); 1786 void next(Label* L);
1784 1787
1785 // Record reloc info for current pc_ 1788 // Record reloc info for current pc_
1786 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); 1789 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
1787 ConstantPoolEntry::Access ConstantPoolAddEntry(int position, 1790 void ConstantPoolAddEntry(int position, RelocInfo::Mode rmode,
1788 RelocInfo::Mode rmode, 1791 intptr_t value);
1789 intptr_t value); 1792 void ConstantPoolAddEntry(int position, double value);
1790 ConstantPoolEntry::Access ConstantPoolAddEntry(int position, double value);
1791 1793
1792 friend class RelocInfo; 1794 friend class RelocInfo;
1793 friend class CodePatcher; 1795 friend class CodePatcher;
1794 friend class BlockConstPoolScope; 1796 friend class BlockConstPoolScope;
1795 friend class EnsureSpace; 1797 friend class EnsureSpace;
1796 }; 1798 };
1797 1799
1798 constexpr int kNoCodeAgeSequenceLength = 3 * Assembler::kInstrSize; 1800 constexpr int kNoCodeAgeSequenceLength = 3 * Assembler::kInstrSize;
1799 1801
1800 class EnsureSpace BASE_EMBEDDED { 1802 class EnsureSpace BASE_EMBEDDED {
1801 public: 1803 public:
1802 INLINE(explicit EnsureSpace(Assembler* assembler)); 1804 INLINE(explicit EnsureSpace(Assembler* assembler));
1803 }; 1805 };
1804 1806
1805 class PatchingAssembler : public Assembler { 1807 class PatchingAssembler : public Assembler {
1806 public: 1808 public:
1807 PatchingAssembler(IsolateData isolate_data, byte* address, int instructions); 1809 PatchingAssembler(IsolateData isolate_data, byte* address, int instructions);
1808 ~PatchingAssembler(); 1810 ~PatchingAssembler();
1809 1811
1810 void Emit(Address addr); 1812 void Emit(Address addr);
1811 void FlushICache(Isolate* isolate); 1813 void FlushICache(Isolate* isolate);
1812 }; 1814 };
1813 1815
1814 1816
1815 } // namespace internal 1817 } // namespace internal
1816 } // namespace v8 1818 } // namespace v8
1817 1819
1818 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1820 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | src/disassembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698