Changeset 39083 in webkit for trunk/JavaScriptCore/jit/JIT.cpp


Ignore:
Timestamp:
Dec 7, 2008, 3:55:04 PM (16 years ago)
Author:
[email protected]
Message:

<rdar://problem/6309878> Need more granular control over allocation of executable memory (21783)
<https://bugs.webkit.org/show_bug.cgi?id=21783>

Reviewed by Cameron Zwarich and Sam Weinig

Add a new allocator for use by the JIT that provides executable pages, so
we can get rid of the current hack that makes the entire heap executable.

1-2% progression on SunSpider-v8, 1% on SunSpider. Reduces memory usage as well!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JIT.cpp

    r39070 r39083  
    19911991    ASSERT(m_jmpTable.isEmpty());
    19921992
    1993     void* code = __ executableCopy();
     1993    RefPtr<ExecutablePool> allocator = m_globalData->poolForSize(__ size());
     1994    m_codeBlock->setExecutablePool(allocator.get());
     1995    void* code = __ executableCopy(allocator.get());
    19941996
    19951997    // Translate vPC offsets into addresses in JIT generated code, for switch tables.
     
    22192221
    22202222    // All trampolines constructed! copy the code, link up calls, and set the pointers on the Machine object.
    2221 
    2222     void* code = __ executableCopy();
     2223    m_interpreter->m_executablePool = m_globalData->poolForSize(__ size());
     2224    void* code = __ executableCopy(m_interpreter->m_executablePool.get());
    22232225
    22242226    X86Assembler::link(code, array_failureCases1, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_array_fail));
     
    22442246}
    22452247
    2246 void JIT::freeCTIMachineTrampolines(Interpreter* interpreter)
    2247 {
    2248     WTF::fastFreeExecutable(interpreter->m_ctiArrayLengthTrampoline);
    2249 }
    2250 
    22512248void JIT::emitGetVariableObjectRegister(RegisterID variableObject, int index, RegisterID dst)
    22522249{
Note: See TracChangeset for help on using the changeset viewer.