Changeset 105636 in webkit for trunk/Source/JavaScriptCore/assembler
- Timestamp:
- Jan 23, 2012, 1:08:34 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore/assembler
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/assembler/ARMAssembler.cpp
r95901 r105636 345 345 } 346 346 347 PassRefPtr<ExecutableMemoryHandle> ARMAssembler::executableCopy(JSGlobalData& globalData )347 PassRefPtr<ExecutableMemoryHandle> ARMAssembler::executableCopy(JSGlobalData& globalData, void* ownerUID) 348 348 { 349 349 // 64-bit alignment is required for next constant pool and JIT code as well … … 352 352 bkpt(0); 353 353 354 RefPtr<ExecutableMemoryHandle> result = m_buffer.executableCopy(globalData );354 RefPtr<ExecutableMemoryHandle> result = m_buffer.executableCopy(globalData, ownerUID); 355 355 char* data = reinterpret_cast<char*>(result->start()); 356 356 -
trunk/Source/JavaScriptCore/assembler/ARMAssembler.h
r101473 r105636 680 680 } 681 681 682 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& );682 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData&, void* ownerUID); 683 683 684 684 #ifndef NDEBUG -
trunk/Source/JavaScriptCore/assembler/AssemblerBuffer.h
r99634 r105636 130 130 } 131 131 132 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData )132 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData, void* ownerUID) 133 133 { 134 134 if (!m_index) 135 135 return 0; 136 136 137 RefPtr<ExecutableMemoryHandle> result = globalData.executableAllocator.allocate(globalData, m_index );137 RefPtr<ExecutableMemoryHandle> result = globalData.executableAllocator.allocate(globalData, m_index, ownerUID); 138 138 139 139 if (!result) -
trunk/Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h
r99382 r105636 196 196 } 197 197 198 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData )198 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData, void* ownerUID) 199 199 { 200 200 flushConstantPool(false); 201 return AssemblerBuffer::executableCopy(globalData );201 return AssemblerBuffer::executableCopy(globalData, ownerUID); 202 202 } 203 203 -
trunk/Source/JavaScriptCore/assembler/LinkBuffer.h
r99633 r105636 31 31 #define DUMP_LINK_STATISTICS 0 32 32 #define DUMP_CODE 0 33 34 #define GLOBAL_THUNK_ID reinterpret_cast<void*>(static_cast<intptr_t>(-1)) 35 #define REGEXP_CODE_ID reinterpret_cast<void*>(static_cast<intptr_t>(-2)) 33 36 34 37 #include <MacroAssembler.h> … … 70 73 71 74 public: 72 LinkBuffer(JSGlobalData& globalData, MacroAssembler* masm )75 LinkBuffer(JSGlobalData& globalData, MacroAssembler* masm, void* ownerUID) 73 76 : m_size(0) 74 77 , m_code(0) … … 79 82 #endif 80 83 { 81 linkCode( );84 linkCode(ownerUID); 82 85 } 83 86 … … 174 177 } 175 178 176 // Upon completion of all patching either 'finalizeCode()' or 'finalizeCodeAddendum()' should be called 177 // once to complete generation of the code. 'finalizeCode()' is suited to situations 178 // where the executable pool must also be retained, the lighter-weight 'finalizeCodeAddendum()' is 179 // suited to adding to an existing allocation. 179 // Upon completion of all patching 'finalizeCode()' should be called once to complete generation of the code. 180 180 CodeRef finalizeCode() 181 181 { … … 211 211 } 212 212 213 // Keep this private! - the underlying code should only be obtained externally via 214 // finalizeCode() or finalizeCodeAddendum(). 213 // Keep this private! - the underlying code should only be obtained externally via finalizeCode(). 215 214 void* code() 216 215 { … … 218 217 } 219 218 220 void linkCode( )219 void linkCode(void* ownerUID) 221 220 { 222 221 ASSERT(!m_code); 223 222 #if !ENABLE(BRANCH_COMPACTION) 224 m_executableMemory = m_assembler->m_assembler.executableCopy(*m_globalData );223 m_executableMemory = m_assembler->m_assembler.executableCopy(*m_globalData, ownerUID); 225 224 if (!m_executableMemory) 226 225 return; … … 230 229 #else 231 230 size_t initialSize = m_assembler->m_assembler.codeSize(); 232 m_executableMemory = m_globalData->executableAllocator.allocate(*m_globalData, initialSize );231 m_executableMemory = m_globalData->executableAllocator.allocate(*m_globalData, initialSize, ownerUID); 233 232 if (!m_executableMemory) 234 233 return; -
trunk/Source/JavaScriptCore/assembler/MIPSAssembler.h
r101658 r105636 646 646 } 647 647 648 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData )649 { 650 RefPtr<ExecutableMemoryHandle> result = m_buffer.executableCopy(globalData );648 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData, void* ownerUID) 649 { 650 RefPtr<ExecutableMemoryHandle> result = m_buffer.executableCopy(globalData, ownerUID); 651 651 if (!result) 652 652 return 0; -
trunk/Source/JavaScriptCore/assembler/SH4Assembler.h
r101980 r105636 1514 1514 } 1515 1515 1516 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData )1517 { 1518 return m_buffer.executableCopy(globalData );1516 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData, void* ownerUID) 1517 { 1518 return m_buffer.executableCopy(globalData, ownerUID); 1519 1519 } 1520 1520 -
trunk/Source/JavaScriptCore/assembler/X86Assembler.h
r103637 r105636 1783 1783 } 1784 1784 1785 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData )1786 { 1787 return m_formatter.executableCopy(globalData );1785 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData, void* ownerUID) 1786 { 1787 return m_formatter.executableCopy(globalData, ownerUID); 1788 1788 } 1789 1789 … … 2133 2133 void* data() const { return m_buffer.data(); } 2134 2134 2135 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData )2136 { 2137 return m_buffer.executableCopy(globalData );2135 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData, void* ownerUID) 2136 { 2137 return m_buffer.executableCopy(globalData, ownerUID); 2138 2138 } 2139 2139
Note:
See TracChangeset
for help on using the changeset viewer.