Changeset 105636 in webkit for trunk/Source/JavaScriptCore/assembler/LinkBuffer.h
- Timestamp:
- Jan 23, 2012, 1:08:34 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.