1. 31 Jan, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=53352 · 646165c0
      barraclough@apple.com authored
      Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
      
      Reviewed by Geoff Garen.
      
      The FixedVMPoolAllocator currently uses a best fix policy -
      switch to first fit, this is less prone to external fragmentation.
      
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::AllocationTableSizeClass::AllocationTableSizeClass):
      (JSC::AllocationTableSizeClass::blockSize):
      (JSC::AllocationTableSizeClass::blockCount):
      (JSC::AllocationTableSizeClass::blockAlignment):
      (JSC::AllocationTableSizeClass::size):
      (JSC::AllocationTableLeaf::AllocationTableLeaf):
      (JSC::AllocationTableLeaf::~AllocationTableLeaf):
      (JSC::AllocationTableLeaf::allocate):
      (JSC::AllocationTableLeaf::free):
      (JSC::AllocationTableLeaf::isEmpty):
      (JSC::AllocationTableLeaf::isFull):
      (JSC::AllocationTableLeaf::size):
      (JSC::AllocationTableLeaf::classForSize):
      (JSC::AllocationTableLeaf::dump):
      (JSC::LazyAllocationTable::LazyAllocationTable):
      (JSC::LazyAllocationTable::~LazyAllocationTable):
      (JSC::LazyAllocationTable::allocate):
      (JSC::LazyAllocationTable::free):
      (JSC::LazyAllocationTable::isEmpty):
      (JSC::LazyAllocationTable::isFull):
      (JSC::LazyAllocationTable::size):
      (JSC::LazyAllocationTable::dump):
      (JSC::LazyAllocationTable::classForSize):
      (JSC::AllocationTableDirectory::AllocationTableDirectory):
      (JSC::AllocationTableDirectory::~AllocationTableDirectory):
      (JSC::AllocationTableDirectory::allocate):
      (JSC::AllocationTableDirectory::free):
      (JSC::AllocationTableDirectory::isEmpty):
      (JSC::AllocationTableDirectory::isFull):
      (JSC::AllocationTableDirectory::size):
      (JSC::AllocationTableDirectory::classForSize):
      (JSC::AllocationTableDirectory::dump):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::alloc):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::FixedVMPoolAllocator::allocated):
      (JSC::FixedVMPoolAllocator::isValid):
      (JSC::FixedVMPoolAllocator::classForSize):
      (JSC::FixedVMPoolAllocator::offsetToPointer):
      (JSC::FixedVMPoolAllocator::pointerToOffset):
      (JSC::ExecutableAllocator::committedByteCount):
      (JSC::ExecutableAllocator::isValid):
      (JSC::ExecutableAllocator::underMemoryPressure):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      * wtf/PageReservation.h:
      (WTF::PageReservation::PageReservation):
      (WTF::PageReservation::commit):
      (WTF::PageReservation::decommit):
      (WTF::PageReservation::committed):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      646165c0
  2. 30 Jan, 2011 1 commit
    • ossy@webkit.org's avatar
      Unreviewed, rolling out r77025. · c80464ba
      ossy@webkit.org authored
      http://trac.webkit.org/changeset/77025
      https://bugs.webkit.org/show_bug.cgi?id=53401
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-01-30
      It made js1_5/Regress/regress-159334.js fail on 64 bit Linux
      (Requested by Ossy on #webkit).
      
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FreeListEntry::FreeListEntry):
      (JSC::AVLTreeAbstractorForFreeList::get_less):
      (JSC::AVLTreeAbstractorForFreeList::set_less):
      (JSC::AVLTreeAbstractorForFreeList::get_greater):
      (JSC::AVLTreeAbstractorForFreeList::set_greater):
      (JSC::AVLTreeAbstractorForFreeList::get_balance_factor):
      (JSC::AVLTreeAbstractorForFreeList::set_balance_factor):
      (JSC::AVLTreeAbstractorForFreeList::null):
      (JSC::AVLTreeAbstractorForFreeList::compare_key_key):
      (JSC::AVLTreeAbstractorForFreeList::compare_key_node):
      (JSC::AVLTreeAbstractorForFreeList::compare_node_node):
      (JSC::reverseSortFreeListEntriesByPointer):
      (JSC::reverseSortCommonSizedAllocations):
      (JSC::FixedVMPoolAllocator::release):
      (JSC::FixedVMPoolAllocator::reuse):
      (JSC::FixedVMPoolAllocator::addToFreeList):
      (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::alloc):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::FixedVMPoolAllocator::isValid):
      (JSC::FixedVMPoolAllocator::allocInternal):
      (JSC::FixedVMPoolAllocator::isWithinVMPool):
      (JSC::FixedVMPoolAllocator::addToCommittedByteCount):
      (JSC::ExecutableAllocator::committedByteCount):
      (JSC::maybeModifyVMPoolSize):
      (JSC::ExecutableAllocator::isValid):
      (JSC::ExecutableAllocator::underMemoryPressure):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      * wtf/PageReservation.h:
      (WTF::PageReservation::PageReservation):
      (WTF::PageReservation::commit):
      (WTF::PageReservation::decommit):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c80464ba
  3. 28 Jan, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=53352 · 85c4e205
      barraclough@apple.com authored
      Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
      
      Reviewed by Geoff Garen.
      
      The FixedVMPoolAllocator currently uses a best fix policy -
      switch to first fit, this is less prone to external fragmentation.
      
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::AllocationTableSizeClass::AllocationTableSizeClass):
      (JSC::AllocationTableSizeClass::blockSize):
      (JSC::AllocationTableSizeClass::blockCount):
      (JSC::AllocationTableSizeClass::blockAlignment):
      (JSC::AllocationTableSizeClass::size):
      (JSC::AllocationTableLeaf::AllocationTableLeaf):
      (JSC::AllocationTableLeaf::~AllocationTableLeaf):
      (JSC::AllocationTableLeaf::allocate):
      (JSC::AllocationTableLeaf::free):
      (JSC::AllocationTableLeaf::isEmpty):
      (JSC::AllocationTableLeaf::isFull):
      (JSC::AllocationTableLeaf::size):
      (JSC::AllocationTableLeaf::classForSize):
      (JSC::AllocationTableLeaf::dump):
      (JSC::LazyAllocationTable::LazyAllocationTable):
      (JSC::LazyAllocationTable::~LazyAllocationTable):
      (JSC::LazyAllocationTable::allocate):
      (JSC::LazyAllocationTable::free):
      (JSC::LazyAllocationTable::isEmpty):
      (JSC::LazyAllocationTable::isFull):
      (JSC::LazyAllocationTable::size):
      (JSC::LazyAllocationTable::dump):
      (JSC::LazyAllocationTable::classForSize):
      (JSC::AllocationTableDirectory::AllocationTableDirectory):
      (JSC::AllocationTableDirectory::~AllocationTableDirectory):
      (JSC::AllocationTableDirectory::allocate):
      (JSC::AllocationTableDirectory::free):
      (JSC::AllocationTableDirectory::isEmpty):
      (JSC::AllocationTableDirectory::isFull):
      (JSC::AllocationTableDirectory::size):
      (JSC::AllocationTableDirectory::classForSize):
      (JSC::AllocationTableDirectory::dump):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::alloc):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::FixedVMPoolAllocator::allocated):
      (JSC::FixedVMPoolAllocator::isValid):
      (JSC::FixedVMPoolAllocator::classForSize):
      (JSC::FixedVMPoolAllocator::offsetToPointer):
      (JSC::FixedVMPoolAllocator::pointerToOffset):
      (JSC::ExecutableAllocator::committedByteCount):
      (JSC::ExecutableAllocator::isValid):
      (JSC::ExecutableAllocator::underMemoryPressure):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      * wtf/PageReservation.h:
      (WTF::PageReservation::PageReservation):
      (WTF::PageReservation::commit):
      (WTF::PageReservation::decommit):
      (WTF::PageReservation::committed):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      85c4e205
  4. 17 Jan, 2011 1 commit
  5. 15 Jan, 2011 3 commits
  6. 13 Jan, 2011 1 commit
    • xan@webkit.org's avatar
      2011-01-13 Xan Lopez <xlopez@igalia.com> · 74ba663b
      xan@webkit.org authored
              Reviewed by Gavin Barraclough.
      
              JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
              https://bugs.webkit.org/show_bug.cgi?id=42756
      
              The FixedVMPool Allocator does not work well on systems where
              allocating very large amounts of memory upfront is not reasonable,
              like Linux without overcommit enabled. As a workaround, on Linux,
              default to the values used in embedded environments (in the MB
              range), and only jump to the GB range if we detect at runtime that
              overcommit is enabled. Should fix crashes on Linux/x86_64 with
              less than 3 or 4GB of RAM.
      
              * jit/ExecutableAllocatorFixedVMPool.cpp:
              (JSC::FixedVMPoolAllocator::free): use new variables for VM pool
              size and coalesce limit.
              (JSC::ExecutableAllocator::isValid): swap the variables from
              embedded to generic values at runtime, on linux, if overcommit is
              enabled.
              (JSC::ExecutableAllocator::underMemoryPressure): use new variables
              for VM pool size and coalesce limit.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      74ba663b
  7. 01 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move JavaScriptCore to Source · 76da8fc1
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=51604
      
      Reviewed by Eric Seidel.
      
      Update references to JavaScriptCore to point to the new location.
      
      * Android.mk:
      * CMakeLists.txt:
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * WebKit.pri:
      * WebKit.pro:
      * wscript:
      
      Tools: 
      
      Update references to JavaScriptCore to point to the new location.
      
      * BuildSlaveSupport/build.webkit.org-config/master.cfg:
      * DumpRenderTree/qt/DumpRenderTree.pro:
      * DumpRenderTree/qt/ImageDiff.pro:
      * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
      * DumpRenderTree/wscript:
      * Scripts/build-jsc:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/run-javascriptcore-tests:
      * Scripts/update-javascriptcore-test-results:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/common/config/build_unittest.py:
      * Scripts/webkitpy/style/checker.py:
      * Scripts/webkitpy/style/checker_unittest.py:
      * Scripts/webkitpy/style/checkers/cpp_unittest.py:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      * wx/build/settings.py:
      
      WebCore: 
      
      Update references to JavaScriptCore.
      
      * Android.derived.jscbindings.mk:
      * Android.v8bindings.mk:
      * CMakeLists.txt:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.pro:
        - These changes are subtle and might not be 100% correct.
      * move-js-headers.sh:
      
      WebKit/chromium: 
      
      * WebKit.gyp:
        - Point to JavaScriptCore in its new location.
      
      WebKit/gtk: 
      
      * GNUmakefile.am:
      * docs/GNUmakefile.am:
        - Point to JavaScriptCore in its new location.
      
      WebKit/qt: 
      
      * WebKit_pch.h:
      * docs/qtwebkit.qdocconf:
        - Point to JavaScriptCore in its new location.
      
      WebKit/win: 
      
      * WebKit.vcproj/WebKit.sln:
        - Point to JavaScriptCore in its new location.
      
      WebKit/wx: 
      
      * bindings/python/wscript:
      * wscript:
        - Point to JavaScriptCore in its new location.
      
      WebKit2: 
      
      * WebKit2.pro:
        - Point to JavaScriptCore in its new location.
      
      Websites/bugs.webkit.org: 
      
      * PrettyPatch/PrettyPatch.rb:
        - Remove reference to JavaScriptCore as a source directory.
      
      Websites/webkit.org: 
      
      * coding/assertion-guidelines.html:
        - Update documentation to point to the new location of
          JavaScriptCore.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76da8fc1
  8. 21 Dec, 2010 1 commit
    • barraclough@apple.com's avatar
      Reviewed by Geoff Garen. · bd837624
      barraclough@apple.com authored
       
      <rdar://problem/8765333> CRASH running out of executable memory, loading io9.com
      https://bugs.webkit.org/show_bug.cgi?id=51443
      
      The problem here is that each page uses a reasonable amount of memory, (~4Mb),
      and that when miultiple pages are open we keep all JIT code for all functions
      in all pages alive.
      
      Add a check to detect high memory pressure situations in the executable allocator
      (>50% of available memory allocated), and upon a top level entry into JSC (no code
      running on the stack) in this situation throw away all JIT code.
      
      * JavaScriptCore.exp:
      * debugger/Debugger.cpp:
      (JSC::Debugger::recompileAllJSFunctions): stop passing exec to recompile.
      * jit/ExecutableAllocator.h:
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::ExecutablePool::systemAlloc): Count allocations.
      (JSC::ExecutablePool::systemRelease): Count deallocations.
      (JSC::ExecutablePool::underMemoryPressure): Check memory pressure.
      * jit/ExecutableAllocatorPosix.cpp:
      (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
      * jit/ExecutableAllocatorWin.cpp:
      (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
      * runtime/Executable.cpp:
      (JSC::FunctionExecutable::recompile): Remove ExecState argument to recompile.
      * runtime/Executable.h:
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::recompileAllJSFunctions): throws away all JIT code.
      * runtime/JSGlobalData.h:
      * runtime/JSGlobalObject.h:
      (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): add check / call to throw away.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd837624
  9. 08 Dec, 2010 1 commit
    • ggaren@apple.com's avatar
      Migrated OS-specific allocation code from PageReservation and PageAllocation to OSAllocator · 05fad660
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=50653
      
      Reviewed by Sam Weinig.
      
      * JavaScriptCore.exp: Updated for new function signature.
      
      * interpreter/RegisterFile.h:
      (JSC::RegisterFile::RegisterFile):
      (JSC::RegisterFile::grow):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::reuse):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): Removed checkAllocatedOkay.
      OSAllocator is now the central location for verifying that allocation succeeds.
      This allowed me to remove some complicating cross-platform cruft.
      
      * runtime/AlignedMemoryAllocator.h:
      (JSC::::allocate): Updated for code motion.
      
      * wtf/OSAllocator.h: Added Usage, writable, and executable parameters, to
      support VM features required by clients of PageAllocation and PageReservation.
      
      * wtf/OSAllocatorPosix.cpp:
      (WTF::OSAllocator::reserve):
      (WTF::OSAllocator::reserveAndCommit):
      (WTF::OSAllocator::commit): Moved PageAllocation support for randomizing
      executable memory here.
      
      * wtf/OSAllocatorSymbian.cpp:
      (WTF::OSAllocator::reserve):
      (WTF::OSAllocator::reserveAndCommit):
      (WTF::OSAllocator::commit): Updated for new function signatures.
      
      * wtf/OSAllocatorWin.cpp:
      (WTF::protection):
      (WTF::OSAllocator::reserve):
      (WTF::OSAllocator::reserveAndCommit):
      (WTF::OSAllocator::commit):
      (WTF::OSAllocator::release): Updated for new function signatures. Moved
      some protection-related and WINCE-related code from PageAllocation here.
      
      * wtf/PageAllocation.cpp: Nixed cross-platform lastError abstraction, since
      it was only used by checkAllocatedOkay, which is now gone.
      
      * wtf/PageAllocation.h:
      (WTF::PageAllocation::allocate):
      (WTF::PageAllocation::allocateAligned):
      (WTF::PageAllocation::deallocate):
      (WTF::PageAllocation::isPowerOfTwo):
      (WTF::PageAllocation::systemAllocateAligned): Removed system* functions,
      and replaced calls to them with calls to OSAllocator.
      
      * wtf/PageReservation.h:
      (WTF::PageReservation::commit):
      (WTF::PageReservation::decommit):
      (WTF::PageReservation::reserve):
      (WTF::PageReservation::deallocate):
      (WTF::PageReservation::PageReservation): Ditto. Added m_writable and
      m_executable because these flags are now required when committing memory.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      05fad660
  10. 06 Dec, 2010 1 commit
    • ggaren@apple.com's avatar
      2010-12-06 Geoffrey Garen <ggaren@apple.com> · 36d5236d
      ggaren@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Simplified some ASLR-related code in PageAllocation/Reservation
              https://bugs.webkit.org/show_bug.cgi?id=50599
              
              Removed reserveAt, allocateAt, and friends, since they all existed to
              serve one feature: ASLR for executable memory on x86_64 on Mac. Moved
              ASLR code down into systemAllocate -- now, any time you allocate
              executable memory on a supporting platform, the memory's location is
              randomized.
      
              * jit/ExecutableAllocatorFixedVMPool.cpp:
              (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller
              to randomize anything.
      
              * wtf/PageAllocation.h:
              (WTF::PageAllocation::systemAllocate): Removed some *At() functions, and
              beefed up executable allocation with randomization.
      
              * wtf/PageReservation.h:
              (WTF::PageReservation::systemReserve): Removed some *At() functions.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      36d5236d
  11. 09 Sep, 2010 1 commit
    • slewis@apple.com's avatar
      Added statistics sampling and reporting for JavaScriptCore's RegisterFile and... · b2725f7a
      slewis@apple.com authored
      Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes
      https://bugs.webkit.org/show_bug.cgi?id=45134
      
      Reviewed by Alexey Proskuryakov.
      
      JavaScriptCore: 
      
      Added thread-safe committed byte counting and reporting functionality to RegisterFile and 
      ExecutableAllocator.
      
      * JavaScriptCore.exp:
      Exported new symbols to allow for WebKit to get statistics from JavaScriptCore classes.
              
      * interpreter/RegisterFile.cpp:
      (JSC::registerFileStatisticsMutex):
      Added function which returns a static Mutex used for locking during read/write access to
      static committed byte count variable.
      (JSC::RegisterFile::~RegisterFile):
      Added call to addToStatistics since memory is decommitted here.
      (JSC::RegisterFile::releaseExcessCapacity):
      Added call to addToStatistics since memory is decommitted here.
      (JSC::RegisterFile::initializeThreading):
      Added function which calls registerFileStatisticsMutex().
      (JSC::RegisterFile::committedByteCount):
      Added function which returns the current committed byte count for RegisterFile.
      (JSC::RegisterFile::addToCommittedByteCount):
      Added function which updates committed byte count.
              
      * interpreter/RegisterFile.h:
      (JSC::RegisterFile::RegisterFile):
      Added call to addToStatistics since memory is committed here.
      (JSC::RegisterFile::grow):
      Added call to addToStatistics since memory is committed here.
              
      * jit/ExecutableAllocator.h:
      Added function prototype for public static function committedByteCount().
              
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::release):
      Added call to addToStatistics since memory is decommitted here.
      (JSC::FixedVMPoolAllocator::reuse):
      Added call to addToStatistics since memory is committed here.
      (JSC::FixedVMPoolAllocator::addToCommittedByteCount):
      Added function which updates committed byte count.
      (JSC::ExecutableAllocator::committedByteCount):
      Added function which returns the current committed byte count for ExecutableAllocator.
              
      * runtime/InitializeThreading.cpp:
      (JSC::initializeThreadingOnce):
      Added call to RegisterFile::initializeThreading.
      
      WebKit/mac: 
      
      Added ability to enable new JavaScriptCore statistics sampling and reporting for RegisterFile 
      and ExecutableAllocator classes. Added reporting of JavaScriptCore's stack committed memory 
      and JIT code committed memory statistics to WebCoreStatistics memoryStatistics.
      
      * Misc/WebCoreStatistics.mm:
      (+[WebCoreStatistics memoryStatistics]):
      Added statistics reporting for JSC RegisterFile and ExecutableAllocator.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2725f7a
  12. 26 Aug, 2010 1 commit
    • barraclough@apple.com's avatar
      Rolling out r64608, this regressed performance. · ce1490e8
      barraclough@apple.com authored
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * assembler/ARMAssembler.cpp:
      (JSC::ARMAssembler::executableCopy):
      * assembler/LinkBuffer.h:
      (JSC::LinkBuffer::LinkBuffer):
      (JSC::LinkBuffer::~LinkBuffer):
      (JSC::LinkBuffer::performFinalization):
      * assembler/MIPSAssembler.h:
      (JSC::MIPSAssembler::executableCopy):
      * assembler/X86Assembler.h:
      (JSC::X86Assembler::executableCopy):
      * bytecode/StructureStubInfo.h:
      (JSC::StructureStubInfo::initGetByIdProto):
      (JSC::StructureStubInfo::initGetByIdChain):
      (JSC::StructureStubInfo::initGetByIdSelfList):
      (JSC::StructureStubInfo::initGetByIdProtoList):
      (JSC::StructureStubInfo::initPutByIdTransition):
      * jit/ExecutableAllocator.cpp:
      (JSC::ExecutablePool::systemAlloc):
      * jit/ExecutableAllocator.h:
      (JSC::ExecutablePool::create):
      (JSC::ExecutableAllocator::ExecutableAllocator):
      (JSC::ExecutableAllocator::poolForSize):
      (JSC::ExecutablePool::ExecutablePool):
      (JSC::ExecutablePool::poolAllocate):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::allocInternal):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompile):
      * jit/JIT.h:
      (JSC::JIT::compileGetByIdProto):
      (JSC::JIT::compileGetByIdSelfList):
      (JSC::JIT::compileGetByIdProtoList):
      (JSC::JIT::compileGetByIdChainList):
      (JSC::JIT::compileGetByIdChain):
      (JSC::JIT::compilePutByIdTransition):
      (JSC::JIT::compilePatchGetArrayLength):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      (JSC::JIT::privateCompileCTINativeCall):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      (JSC::JIT::privateCompileGetByIdProto):
      (JSC::JIT::privateCompileGetByIdSelfList):
      (JSC::JIT::privateCompileGetByIdProtoList):
      (JSC::JIT::privateCompileGetByIdChainList):
      (JSC::JIT::privateCompileGetByIdChain):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      (JSC::JIT::privateCompileGetByIdProto):
      (JSC::JIT::privateCompileGetByIdSelfList):
      (JSC::JIT::privateCompileGetByIdProtoList):
      (JSC::JIT::privateCompileGetByIdChainList):
      (JSC::JIT::privateCompileGetByIdChain):
      * jit/JITStubs.cpp:
      (JSC::JITThunks::tryCachePutByID):
      (JSC::JITThunks::tryCacheGetByID):
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC::getPolymorphicAccessStructureListSlot):
      * jit/JITStubs.h:
      * jit/SpecializedThunkJIT.h:
      (JSC::SpecializedThunkJIT::finalize):
      * runtime/ExceptionHelpers.cpp:
      * runtime/ExceptionHelpers.h:
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::compileInternal):
      (JSC::ProgramExecutable::compileInternal):
      (JSC::FunctionExecutable::compileForCallInternal):
      (JSC::FunctionExecutable::compileForConstructInternal):
      (JSC::FunctionExecutable::reparseExceptionInfo):
      (JSC::EvalExecutable::reparseExceptionInfo):
      * yarr/RegexJIT.cpp:
      (JSC::Yarr::RegexGenerator::compile):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ce1490e8
  13. 04 Aug, 2010 1 commit
    • barraclough@apple.com's avatar
      JavaScriptCore: Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation. · 70c0cc92
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      The PageAllocation class has a number of issues:
      * Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate
        blocks of memory for the GC heap, instead of allocating RChunks.  Revert this change in
        behaviour.
      * In order for PageAllocation to work correctly on WinCE we should be decommitting memory
        before deallocating.  In order to simplify understanding the expected state at deallocate,
        split behaviour out into PageAllocation and PageReservation classes.  Require that all
        memory be decommitted before calling deallocate on a PageReservation, add asserts to
        enforce this.
      * add many missing asserts.
      * inline more functions.
      * remove ability to create sub-PageAllocations from an existing PageAllocations object -
        this presented an interface that would allow sub regions to be deallocated, which would
        not have provided expected behaviour.
      * remove writable/executable arguments to commit, this value can be cached at the point
        the memory is reserved.
      * remove writable/executable arguments to allocateAligned, protection other than RW is not
        supported.
      * add missing checks for overflow & failed allocation to mmap path through allocateAligned.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * jit/ExecutableAllocator.cpp:
      (JSC::ExecutableAllocator::intializePageSize):
      * jit/ExecutableAllocator.h:
      (JSC::ExecutablePool::Allocation::Allocation):
      (JSC::ExecutablePool::Allocation::base):
      (JSC::ExecutablePool::Allocation::size):
      (JSC::ExecutablePool::Allocation::operator!):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::reuse):
      (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::alloc):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::FixedVMPoolAllocator::allocInternal):
      * runtime/AlignedMemoryAllocator.h:
      (JSC::::allocate):
      (JSC::::AlignedMemoryAllocator):
      * runtime/Collector.cpp:
      (JSC::Heap::allocateBlock):
      * runtime/Collector.h:
      * wtf/PageAllocation.cpp:
      * wtf/PageAllocation.h:
      (WTF::PageAllocation::operator!):
      (WTF::PageAllocation::allocate):
      (WTF::PageAllocation::allocateAt):
      (WTF::PageAllocation::allocateAligned):
      (WTF::PageAllocation::deallocate):
      (WTF::PageAllocation::pageSize):
      (WTF::PageAllocation::systemAllocate):
      (WTF::PageAllocation::systemAllocateAt):
      (WTF::PageAllocation::systemAllocateAligned):
      (WTF::PageAllocation::systemDeallocate):
      (WTF::PageAllocation::systemPageSize):
      * wtf/PageReservation.h: Copied from JavaScriptCore/wtf/PageAllocation.h.
      (WTF::PageReservation::PageReservation):
      (WTF::PageReservation::commit):
      (WTF::PageReservation::decommit):
      (WTF::PageReservation::reserve):
      (WTF::PageReservation::reserveAt):
      (WTF::PageReservation::deallocate):
      (WTF::PageReservation::systemCommit):
      (WTF::PageReservation::systemDecommit):
      (WTF::PageReservation::systemReserve):
      (WTF::PageReservation::systemReserveAt):
      * wtf/Platform.h:
      
      JavaScriptGlue: Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation.
      (add forwarding headers)
      
      Reviewed by Sam Weinig.
      
      * ForwardingHeaders/wtf/Bitmap.h: Added.
      * ForwardingHeaders/wtf/PageReservation.h: Added.
      
      WebCore: Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation.
      (add forwarding headers)
      
      Reviewed by Sam Weinig.
      
      * ForwardingHeaders/wtf/Bitmap.h: Added.
      * ForwardingHeaders/wtf/PageReservation.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      70c0cc92
  14. 03 Aug, 2010 1 commit
    • barraclough@apple.com's avatar
      Bug 43390 - Do not CRASH if we run out of room for jit code. · 3c803686
      barraclough@apple.com authored
      Reviewed by Oliver Hunt.
      
      Change the ExecutableAllocator implementations not to crash, and to return 0 if memory cannot be allocated.
      The assemblers should pass this through without trying to use it in executableCopy.
      Change the LinkBuffer to handle this, and to provide an allocationSuccessful() method to test for this.
      
      Change the JIT to throw an exception if allocation fails.
      Make JIT optimizations fail gracefully if memory cannot be allocated (use non-optimized path).
      Change YARR JIT to fallback to PCRE 
      
      * assembler/ARMAssembler.cpp:
      (JSC::ARMAssembler::executableCopy):
      * assembler/ARMv7Assembler.h:
      (JSC::ARMv7Assembler::executableCopy):
      * assembler/LinkBuffer.h:
      (JSC::LinkBuffer::allocationSuccessful):
      * assembler/MIPSAssembler.h:
      (JSC::MIPSAssembler::executableCopy):
      * assembler/X86Assembler.h:
      (JSC::X86Assembler::executableCopy):
      * bytecode/StructureStubInfo.h:
      (JSC::StructureStubInfo::initGetByIdProto):
      (JSC::StructureStubInfo::initGetByIdChain):
      (JSC::StructureStubInfo::initGetByIdSelfList):
      (JSC::StructureStubInfo::initGetByIdProtoList):
      (JSC::StructureStubInfo::initPutByIdTransition):
      * jit/ExecutableAllocator.cpp:
      (JSC::ExecutablePool::systemAlloc):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::allocInternal):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompile):
      * jit/JIT.h:
      (JSC::JIT::compileGetByIdProto):
      (JSC::JIT::compileGetByIdSelfList):
      (JSC::JIT::compileGetByIdProtoList):
      (JSC::JIT::compileGetByIdChainList):
      (JSC::JIT::compileGetByIdChain):
      (JSC::JIT::compilePutByIdTransition):
      (JSC::JIT::compilePatchGetArrayLength):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      (JSC::JIT::privateCompileCTINativeCall):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      (JSC::JIT::privateCompileGetByIdProto):
      (JSC::JIT::privateCompileGetByIdSelfList):
      (JSC::JIT::privateCompileGetByIdProtoList):
      (JSC::JIT::privateCompileGetByIdChainList):
      (JSC::JIT::privateCompileGetByIdChain):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      (JSC::JIT::privateCompileGetByIdProto):
      (JSC::JIT::privateCompileGetByIdSelfList):
      (JSC::JIT::privateCompileGetByIdProtoList):
      (JSC::JIT::privateCompileGetByIdChainList):
      (JSC::JIT::privateCompileGetByIdChain):
      * jit/JITStubs.cpp:
      (JSC::JITThunks::tryCachePutByID):
      (JSC::JITThunks::tryCacheGetByID):
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC::setupPolymorphicProtoList):
      * jit/JITStubs.h:
      * jit/SpecializedThunkJIT.h:
      (JSC::SpecializedThunkJIT::finalize):
      * runtime/ExceptionHelpers.cpp:
      (JSC::createOutOfMemoryError):
      * runtime/ExceptionHelpers.h:
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::compileInternal):
      (JSC::ProgramExecutable::compileInternal):
      (JSC::FunctionExecutable::compileForCallInternal):
      (JSC::FunctionExecutable::compileForConstructInternal):
      (JSC::FunctionExecutable::reparseExceptionInfo):
      (JSC::EvalExecutable::reparseExceptionInfo):
      * yarr/RegexJIT.cpp:
      (JSC::Yarr::RegexGenerator::compile):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3c803686
  15. 26 Jul, 2010 3 commits
    • barraclough@apple.com's avatar
      Bug 43009 - Abstract out page allocation from executable allocators · 28a32370
      barraclough@apple.com authored
      Reviewed by Oliver Hunt.
      
      JavaScriptCore: 
      
      It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
      
      In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
      I think this will match current behaviour for the next client we will want to port across (RegisterFile &
      Collector).
      
      * CMakeListsEfl.txt:
      * GNUmakefile.am:
      * JavaScriptCore.gypi:
      * JavaScriptCore.pro:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * jit/ExecutableAllocator.cpp:
      (JSC::ExecutableAllocator::intializePageSize):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      (JSC::ExecutableAllocator::isValid):
      * jit/ExecutableAllocator.h:
      (JSC::ExecutablePool::ExecutablePool):
      (JSC::ExecutablePool::poolAllocate):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::release):
      (JSC::FixedVMPoolAllocator::reuse):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::alloc):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::FixedVMPoolAllocator::isValid):
      (JSC::FixedVMPoolAllocator::isWithinVMPool):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      * jit/ExecutableAllocatorPosix.cpp: Removed.
      * jit/ExecutableAllocatorSymbian.cpp: Removed.
      * jit/ExecutableAllocatorWin.cpp: Removed.
      * wscript:
      * wtf/PageAllocator.cpp: Added.
      (WTF::protection):
      (WTF::PageAllocation::commit):
      (WTF::PageAllocation::decommit):
      (WTF::PageAllocator::allocate):
      (WTF::PageAllocator::reserve):
      (WTF::PageAllocator::deallocate):
      (WTF::PageAllocator::pagesize):
      * wtf/PageAllocator.h: Added.
      (WTF::PageAllocation::PageAllocation):
      (WTF::PageAllocation::base):
      (WTF::PageAllocation::size):
      (WTF::PageAllocation::chunk):
      (WTF::PageAllocation::operator!):
      (WTF::PageAllocator::):
      
      JavaScriptGlue: 
      
      * ForwardingHeaders/wtf/PageAllocation.h: Added.
      
      WebCore: 
      
      * ForwardingHeaders/wtf/PageAllocation.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      28a32370
    • barraclough@apple.com's avatar
      Rolling out r64097:64100, oops, more b0rked than I relized by my last changes, sorry! · 34ad3ae8
      barraclough@apple.com authored
      * CMakeListsEfl.txt:
      * GNUmakefile.am:
      * JavaScriptCore.gypi:
      * JavaScriptCore.pro:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * jit/ExecutableAllocator.cpp:
      (JSC::ExecutableAllocator::reprotectRegion):
      (JSC::ExecutableAllocator::cacheFlush):
      * jit/ExecutableAllocator.h:
      (JSC::ExecutablePool::ExecutablePool):
      (JSC::ExecutablePool::poolAllocate):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::release):
      (JSC::FixedVMPoolAllocator::reuse):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::alloc):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::FixedVMPoolAllocator::isValid):
      (JSC::FixedVMPoolAllocator::isWithinVMPool):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      * jit/ExecutableAllocatorPosix.cpp: Added.
      (JSC::ExecutableAllocator::intializePageSize):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      (JSC::ExecutableAllocator::isValid):
      * jit/ExecutableAllocatorSymbian.cpp: Added.
      (JSC::ExecutableAllocator::intializePageSize):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      (JSC::ExecutableAllocator::isValid):
      * jit/ExecutableAllocatorWin.cpp: Added.
      (JSC::ExecutableAllocator::intializePageSize):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      (JSC::ExecutableAllocator::isValid):
      * wscript:
      * wtf/PageAllocation.cpp: Removed.
      * wtf/PageAllocation.h: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34ad3ae8
    • barraclough@apple.com's avatar
      Bug 43009 - Abstract out page allocation from executable allocators · 28d8cd47
      barraclough@apple.com authored
      Reviewed by Oliver Hunt.
      
      It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
      
      In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
      I think this will match current behaviour for the next client we will want to port across (RegisterFile &
      Collector).
      
      * CMakeListsEfl.txt:
      * GNUmakefile.am:
      * JavaScriptCore.gypi:
      * JavaScriptCore.pro:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * jit/ExecutableAllocator.cpp:
      (JSC::ExecutableAllocator::intializePageSize):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      (JSC::ExecutableAllocator::isValid):
      * jit/ExecutableAllocator.h:
      (JSC::ExecutablePool::ExecutablePool):
      (JSC::ExecutablePool::poolAllocate):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::release):
      (JSC::FixedVMPoolAllocator::reuse):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::alloc):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::FixedVMPoolAllocator::isValid):
      (JSC::FixedVMPoolAllocator::isWithinVMPool):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      * jit/ExecutableAllocatorPosix.cpp: Removed.
      * jit/ExecutableAllocatorSymbian.cpp: Removed.
      * jit/ExecutableAllocatorWin.cpp: Removed.
      * wscript:
      * wtf/PageAllocator.cpp: Added.
      (WTF::protection):
      (WTF::PageAllocation::commit):
      (WTF::PageAllocation::decommit):
      (WTF::PageAllocator::allocate):
      (WTF::PageAllocator::reserve):
      (WTF::PageAllocator::deallocate):
      (WTF::PageAllocator::pagesize):
      * wtf/PageAllocator.h: Added.
      (WTF::PageAllocation::PageAllocation):
      (WTF::PageAllocation::base):
      (WTF::PageAllocation::size):
      (WTF::PageAllocation::chunk):
      (WTF::PageAllocation::operator!):
      (WTF::PageAllocator::):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      28d8cd47
  16. 14 Jul, 2010 1 commit
    • oliver@apple.com's avatar
      2010-07-14 Oliver Hunt <oliver@apple.com> · 815b8e19
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Make sure that mixed interpreter/jit builds don't try to use the jit if the allocator fails
              https://bugs.webkit.org/show_bug.cgi?id=42310
      
              Add some null checks to deal with the Fixed VM allocator failing
              to get the requested executable region, delay the creation of the
              JITStubs in JSGlobalData until after we know whether we're using
              the JIT.
      
              * jit/ExecutableAllocator.h:
              (JSC::ExecutableAllocator::ExecutableAllocator):
              (JSC::ExecutableAllocator::poolForSize):
              * jit/ExecutableAllocatorFixedVMPool.cpp:
              (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
              (JSC::FixedVMPoolAllocator::alloc):
              (JSC::FixedVMPoolAllocator::free):
              (JSC::FixedVMPoolAllocator::isValid):
              (JSC::ExecutableAllocator::isValid):
              (JSC::ExecutablePool::systemAlloc):
              (JSC::ExecutablePool::systemRelease):
              * jit/ExecutableAllocatorPosix.cpp:
              (JSC::ExecutableAllocator::isValid):
              * jit/ExecutableAllocatorWin.cpp:
              (JSC::ExecutableAllocator::isValid):
              * jit/JIT.cpp:
              (JSC::JIT::linkCall):
              (JSC::JIT::linkConstruct):
              * jit/JIT.h:
              (JSC::JIT::compileCTIMachineTrampolines):
              (JSC::JIT::compileCTINativeCall):
              * jit/JITArithmetic.cpp:
              (JSC::JIT::emit_op_mod):
              * jit/JITArithmetic32_64.cpp:
              (JSC::JIT::emit_op_mod):
              * jit/JITCall.cpp:
              (JSC::JIT::compileOpCallVarargs):
              (JSC::JIT::compileOpCall):
              (JSC::JIT::compileOpCallSlowCase):
              * jit/JITCall32_64.cpp:
              (JSC::JIT::compileOpCallVarargs):
              (JSC::JIT::compileOpCall):
              (JSC::JIT::compileOpCallSlowCase):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::privateCompileCTINativeCall):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::JITThunks):
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::JITThunks::hostFunctionStub):
              * jit/ThunkGenerators.cpp:
              (JSC::charCodeAtThunkGenerator):
              (JSC::charAtThunkGenerator):
              (JSC::fromCharCodeThunkGenerator):
              (JSC::sqrtThunkGenerator):
              (JSC::powThunkGenerator):
              * runtime/Executable.h:
              (JSC::NativeExecutable::create):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              (JSC::JSGlobalData::getHostFunction):
              * runtime/JSGlobalData.h:
              (JSC::JSGlobalData::getCTIStub):
              * yarr/RegexJIT.cpp:
              (JSC::Yarr::jitCompileRegex):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      815b8e19
  17. 08 Jul, 2010 2 commits
    • mrobinson@webkit.org's avatar
      2010-07-08 Martin Robinson <mrobinson@igalia.com> · 618bd7d8
      mrobinson@webkit.org authored
              Unreviewed.
      
              Try fix the GTK+ build by touching this file.
      
              * jit/ExecutableAllocatorFixedVMPool.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      618bd7d8
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=41641 · 70896dae
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
      other than x86-64 (this may be useful on 32-bit platforms, too).
      
      Simplify ifdefs by dividing into thwo broad allocation strategies
      (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
      
      Rename constant used in the code to have names descriptive of their purpose,
      rather than their specific value on a given platform.
      
      * jit/ExecutableAllocator.cpp:
      (JSC::ExecutableAllocator::reprotectRegion):
      (JSC::ExecutableAllocator::cacheFlush):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::ExecutablePool::systemAlloc):
      * jit/ExecutableAllocatorPosix.cpp:
      * jit/ExecutableAllocatorSymbian.cpp:
      * jit/ExecutableAllocatorWin.cpp:
      * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      70896dae
  18. 06 Jul, 2010 1 commit
  19. 05 Jul, 2010 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=41641 · f010f51d
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
      other than x86-64 (this may be useful on 32-bit platforms, too).
      
      Simplify ifdefs by dividing into thwo broad allocation strategies
      (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
      
      Rename constant used in the code to have names descriptive of their purpose,
      rather than their specific value on a given platform.
      
      * jit/ExecutableAllocator.cpp:
      (JSC::ExecutableAllocator::reprotectRegion):
      (JSC::ExecutableAllocator::cacheFlush):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::ExecutablePool::systemAlloc):
      * jit/ExecutableAllocatorPosix.cpp:
      * jit/ExecutableAllocatorSymbian.cpp:
      * jit/ExecutableAllocatorWin.cpp:
      * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f010f51d
  20. 19 Apr, 2010 1 commit
  21. 05 Jan, 2010 1 commit
    • mjs@apple.com's avatar
      2010-01-04 Maciej Stachowiak <mjs@apple.com> · acbcc283
      mjs@apple.com authored
              Reviewed by Darin Fisher.
      
              Reorganize, document and rename OS() platform macros.
              https://bugs.webkit.org/show_bug.cgi?id=33198
      
              * wtf/Platform.h: Rename, reorganize and document OS() macros.
      
              Adapt to name changes. Also fixed a few incorrect OS checks.
      
              * API/JSContextRef.cpp:
              * assembler/MacroAssemblerARM.cpp:
              (JSC::isVFPPresent):
              * assembler/MacroAssemblerX86Common.h:
              * bytecode/SamplingTool.cpp:
              * config.h:
              * interpreter/RegisterFile.cpp:
              (JSC::RegisterFile::~RegisterFile):
              * interpreter/RegisterFile.h:
              (JSC::RegisterFile::RegisterFile):
              (JSC::RegisterFile::grow):
              * jit/ExecutableAllocator.h:
              * jit/ExecutableAllocatorFixedVMPool.cpp:
              * jit/ExecutableAllocatorPosix.cpp:
              * jit/ExecutableAllocatorSymbian.cpp:
              * jit/ExecutableAllocatorWin.cpp:
              * jit/JITOpcodes.cpp:
              (JSC::JIT::privateCompileCTIMachineTrampolines):
              * jit/JITStubs.cpp:
              * jsc.cpp:
              (main):
              * parser/Grammar.y:
              * profiler/ProfileNode.cpp:
              (JSC::getCount):
              * runtime/Collector.cpp:
              (JSC::Heap::Heap):
              (JSC::Heap::allocateBlock):
              (JSC::Heap::freeBlockPtr):
              (JSC::currentThreadStackBase):
              (JSC::getCurrentPlatformThread):
              (JSC::suspendThread):
              (JSC::resumeThread):
              (JSC::getPlatformThreadRegisters):
              (JSC::otherThreadStackPointer):
              * runtime/Collector.h:
              * runtime/DateConstructor.cpp:
              * runtime/DatePrototype.cpp:
              (JSC::formatLocaleDate):
              * runtime/InitializeThreading.cpp:
              (JSC::initializeThreading):
              * runtime/MarkStack.h:
              (JSC::MarkStack::MarkStackArray::shrinkAllocation):
              * runtime/MarkStackPosix.cpp:
              * runtime/MarkStackSymbian.cpp:
              * runtime/MarkStackWin.cpp:
              * runtime/StringPrototype.cpp:
              (JSC::stringProtoFuncLastIndexOf):
              * runtime/TimeoutChecker.cpp:
              (JSC::getCPUTime):
              * runtime/UString.cpp:
              (JSC::UString::from):
              * wtf/Assertions.cpp:
              * wtf/Assertions.h:
              * wtf/CurrentTime.cpp:
              (WTF::lowResUTCTime):
              * wtf/CurrentTime.h:
              (WTF::getLocalTime):
              * wtf/DateMath.cpp:
              * wtf/FastMalloc.cpp:
              (WTF::TCMalloc_ThreadCache::InitModule):
              (WTF::TCMallocStats::):
              * wtf/FastMalloc.h:
              * wtf/MathExtras.h:
              * wtf/RandomNumber.cpp:
              (WTF::randomNumber):
              * wtf/RandomNumberSeed.h:
              (WTF::initializeRandomNumberGenerator):
              * wtf/StringExtras.h:
              * wtf/TCSpinLock.h:
              (TCMalloc_SpinLock::Unlock):
              (TCMalloc_SlowLock):
              * wtf/TCSystemAlloc.cpp:
              * wtf/ThreadSpecific.h:
              (WTF::::destroy):
              * wtf/Threading.h:
              * wtf/ThreadingPthreads.cpp:
              (WTF::initializeThreading):
              (WTF::isMainThread):
              * wtf/ThreadingWin.cpp:
              (WTF::wtfThreadEntryPoint):
              (WTF::createThreadInternal):
              * wtf/VMTags.h:
              * wtf/unicode/icu/CollatorICU.cpp:
              (WTF::Collator::userDefault):
              * wtf/win/MainThreadWin.cpp:
              (WTF::initializeMainThreadPlatform):
      2010-01-04  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Darin Fisher.
      
              Reorganize, document and rename OS() platform macros.
              https://bugs.webkit.org/show_bug.cgi?id=33198
      
              Adapt to name changes.
      
              * src/ChromiumBridge.cpp:
              * src/EditorClientImpl.cpp:
              (WebKit::EditorClientImpl::isSelectTrailingWhitespaceEnabled):
              (WebKit::):
              (WebKit::EditorClientImpl::handleEditingKeyboardEvent):
              * src/FrameLoaderClientImpl.cpp:
              (WebKit::FrameLoaderClientImpl::createPlugin):
              * src/GraphicsContext3D.cpp:
              (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
              (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal):
              (WebCore::GraphicsContext3DInternal::makeContextCurrent):
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::selectionAsText):
              (WebKit::WebFrameImpl::printPage):
              * src/WebPluginContainerImpl.cpp:
              (WebKit::WebPluginContainerImpl::handleMouseEvent):
              (WebKit::WebPluginContainerImpl::handleKeyboardEvent):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::mouseDown):
              (WebKit::WebViewImpl::mouseContextMenu):
              (WebKit::WebViewImpl::mouseUp):
              (WebKit::WebViewImpl::keyEvent):
              (WebKit::WebViewImpl::sendContextMenuEvent):
              (WebKit::WebViewImpl::setScrollbarColors):
              (WebKit::WebViewImpl::navigationPolicyFromMouseEvent):
      2010-01-04  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Darin Fisher.
      
              Reorganize, document and rename OS() platform macros.
              https://bugs.webkit.org/show_bug.cgi?id=33198
      
              Adapt to name changes.
      
              * webkit/webkitwebsettings.cpp:
              (webkit_get_user_agent):
      2010-01-04  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Darin Fisher.
      
              Reorganize, document and rename OS() platform macros.
              https://bugs.webkit.org/show_bug.cgi?id=33198
      
              Adapt to name changes. Also fixed a few incorrect OS checks.
      
              * accessibility/AccessibilityObject.h:
              * config.h:
              * dom/SelectElement.cpp:
              (WebCore::SelectElement::listBoxDefaultEventHandler):
              * inspector/InspectorFrontendHost.cpp:
              (WebCore::InspectorFrontendHost::platform):
              * loader/CachedFont.cpp:
              * loader/FTPDirectoryDocument.cpp:
              * loader/FTPDirectoryParser.cpp:
              * page/EventHandler.cpp:
              * page/Frame.cpp:
              (WebCore::Frame::setUseSecureKeyboardEntry):
              * page/NavigatorBase.cpp:
              (WebCore::NavigatorBase::platform):
              * page/Page.h:
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              * page/Settings.h:
              * page/chromium/DragControllerChromium.cpp:
              (WebCore::DragController::isCopyKeyDown):
              * page/chromium/EventHandlerChromium.cpp:
              (WebCore::EventHandler::accessKeyModifiers):
              * page/win/EventHandlerWin.cpp:
              (WebCore::EventHandler::createDraggingClipboard):
              * platform/FileSystem.h:
              * platform/KeyboardCodes.h:
              * platform/PurgeableBuffer.h:
              * platform/chromium/ChromiumBridge.h:
              * platform/chromium/ClipboardChromium.cpp:
              (WebCore::ClipboardChromium::writeRange):
              * platform/chromium/ClipboardUtilitiesChromium.cpp:
              * platform/chromium/ClipboardUtilitiesChromium.h:
              * platform/chromium/PasteboardChromium.cpp:
              (WebCore::Pasteboard::writeSelection):
              (WebCore::Pasteboard::writePlainText):
              (WebCore::Pasteboard::documentFragment):
              * platform/chromium/PlatformKeyboardEventChromium.cpp:
              (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
              (WebCore::PlatformKeyboardEvent::currentCapsLockState):
              * platform/chromium/PopupMenuChromium.cpp:
              (WebCore::PopupListBox::layout):
              (WebCore::PopupMenu::show):
              * platform/graphics/BitmapImage.h:
              (WebCore::BitmapImage::mayFillWithSolidColor):
              * platform/graphics/FloatPoint.h:
              * platform/graphics/FloatRect.h:
              * platform/graphics/FloatSize.h:
              * platform/graphics/FontCache.cpp:
              (WebCore::alternateFamilyName):
              * platform/graphics/FontCache.h:
              * platform/graphics/FontFastPath.cpp:
              (WebCore::Font::glyphDataForCharacter):
              * platform/graphics/GlyphBuffer.h:
              (WebCore::GlyphBuffer::advanceAt):
              (WebCore::GlyphBuffer::add):
              * platform/graphics/Gradient.h:
              * platform/graphics/GraphicsContext.cpp:
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/GraphicsContext3D.h:
              * platform/graphics/ImageSource.h:
              * platform/graphics/IntRect.h:
              * platform/graphics/MediaPlayer.cpp:
              * platform/graphics/Path.h:
              * platform/graphics/Pattern.h:
              * platform/graphics/SimpleFontData.h:
              * platform/graphics/cg/ColorCG.cpp:
              * platform/graphics/cg/GraphicsContextCG.cpp:
              * platform/graphics/chromium/FontCustomPlatformData.cpp:
              (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
              (WebCore::FontCustomPlatformData::fontPlatformData):
              (WebCore::createFontCustomPlatformData):
              * platform/graphics/chromium/FontCustomPlatformData.h:
              * platform/graphics/chromium/FontPlatformData.h:
              * platform/graphics/opentype/OpenTypeUtilities.cpp:
              * platform/graphics/opentype/OpenTypeUtilities.h:
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::getWindowsContext):
              * platform/graphics/qt/ImageQt.cpp:
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::clipToImageBuffer):
              * platform/graphics/skia/ImageBufferSkia.cpp:
              (WebCore::ImageBuffer::ImageBuffer):
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (PlatformContextSkia::State::State):
              (PlatformContextSkia::PlatformContextSkia):
              (PlatformContextSkia::save):
              (PlatformContextSkia::restore):
              * platform/graphics/skia/PlatformContextSkia.h:
              * platform/graphics/win/IconWin.cpp:
              (WebCore::Icon::createIconForFiles):
              (WebCore::Icon::paint):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              * platform/gtk/FileSystemGtk.cpp:
              (WebCore::filenameToString):
              (WebCore::filenameFromString):
              (WebCore::filenameForDisplay):
              * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
              * platform/network/curl/ResourceHandleManager.cpp:
              * platform/network/soup/ResourceHandleSoup.cpp:
              (WebCore::):
              * platform/text/String.cpp:
              (WebCore::String::format):
              (WebCore::String::number):
              * platform/text/TextEncoding.cpp:
              (WebCore::TextEncoding::encode):
              * platform/text/TextEncodingRegistry.cpp:
              (WebCore::buildBaseTextCodecMaps):
              (WebCore::extendTextCodecMaps):
              * platform/text/TextStream.cpp:
              * platform/text/TextStream.h:
              * platform/text/qt/TextCodecQt.cpp:
              (WebCore::TextCodecQt::decode):
              * platform/win/PlatformMouseEventWin.cpp:
              (WebCore::messageToEventType):
              (WebCore::PlatformMouseEvent::PlatformMouseEvent):
              * platform/win/PlatformScreenWin.cpp:
              (WebCore::deviceInfoForWidget):
              (WebCore::screenIsMonochrome):
              * platform/win/PopupMenuWin.cpp:
              (WebCore::PopupMenu::show):
              (WebCore::PopupMenu::paint):
              (WebCore::PopupMenu::registerClass):
              (WebCore::PopupMenu::PopupMenuWndProc):
              (WebCore::PopupMenu::wndProc):
              * platform/win/SystemTimeWin.cpp:
              (WebCore::userIdleTime):
              * platform/wx/FileSystemWx.cpp:
              (WebCore::unloadModule):
              * plugins/PluginDatabase.cpp:
              * plugins/PluginPackage.cpp:
              (WebCore::PluginPackage::compareFileVersion):
              * plugins/PluginPackage.h:
              * plugins/PluginView.cpp:
              (WebCore::PluginView::setFrameRect):
              (WebCore::PluginView::stop):
              (WebCore::PluginView::PluginView):
              * plugins/PluginView.h:
              * plugins/win/PluginDatabaseWin.cpp:
              (WebCore::addWindowsMediaPlayerPluginDirectory):
              (WebCore::addMacromediaPluginDirectories):
              * plugins/win/PluginPackageWin.cpp:
              (WebCore::PluginPackage::load):
              * plugins/win/PluginViewWin.cpp:
              (WebCore::registerPluginView):
              (WebCore::PluginView::wndProc):
              (WebCore::PluginView::updatePluginWidget):
              (WebCore::PluginView::paintIntoTransformedContext):
              (WebCore::PluginView::paintWindowedPluginIntoContext):
              (WebCore::PluginView::paint):
              (WebCore::PluginView::handleMouseEvent):
              (WebCore::PluginView::setParent):
              (WebCore::PluginView::setNPWindowRect):
              (WebCore::PluginView::platformStart):
      2010-01-04  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Darin Fisher.
      
              Reorganize, document and rename OS() platform macros.
              https://bugs.webkit.org/show_bug.cgi?id=33198
      
              Adapt to name changes.
              
              * DumpRenderTree/DumpRenderTree.h:
              * DumpRenderTree/config.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      acbcc283
  22. 04 Jan, 2010 1 commit
    • mjs@apple.com's avatar
      2010-01-04 Maciej Stachowiak <mjs@apple.com> · cc668212
      mjs@apple.com authored
              Reviewed by Adam Barth.
      
              Reorganize, document and rename CPU() platform macros.
              https://bugs.webkit.org/show_bug.cgi?id=33145
              ExecutableAllocatorSymbian appears to have buggy ARM version check
              https://bugs.webkit.org/show_bug.cgi?id=33138
              
              * wtf/Platform.h:
              Rename all macros related to detection of particular CPUs or
              classes of CPUs to CPU(), reorganize and document them.
      
              All remaining changes are adapting to the renames, plus fixing the
              second bug cited above.
              
              * assembler/ARMAssembler.cpp:
              * assembler/ARMAssembler.h:
              * assembler/ARMv7Assembler.h:
              * assembler/AbstractMacroAssembler.h:
              (JSC::AbstractMacroAssembler::Imm32::Imm32):
              * assembler/MacroAssembler.h:
              * assembler/MacroAssemblerARM.cpp:
              * assembler/MacroAssemblerARM.h:
              * assembler/MacroAssemblerCodeRef.h:
              (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
              * assembler/MacroAssemblerX86.h:
              * assembler/MacroAssemblerX86Common.h:
              * assembler/MacroAssemblerX86_64.h:
              * assembler/X86Assembler.h:
              (JSC::X86Registers::):
              (JSC::X86Assembler::):
              (JSC::X86Assembler::movl_mEAX):
              (JSC::X86Assembler::movl_EAXm):
              (JSC::X86Assembler::repatchLoadPtrToLEA):
              (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
              * jit/ExecutableAllocator.h:
              * jit/ExecutableAllocatorFixedVMPool.cpp:
              * jit/ExecutableAllocatorPosix.cpp:
              * jit/ExecutableAllocatorSymbian.cpp:
              (JSC::ExecutableAllocator::intializePageSize):
              * jit/JIT.cpp:
              * jit/JIT.h:
              * jit/JITArithmetic.cpp:
              * jit/JITInlineMethods.h:
              (JSC::JIT::beginUninterruptedSequence):
              (JSC::JIT::restoreArgumentReferenceForTrampoline):
              (JSC::JIT::emitCount):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::privateCompileCTIMachineTrampolines):
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::privateCompileGetByIdProto):
              (JSC::JIT::privateCompileGetByIdProtoList):
              (JSC::JIT::privateCompileGetByIdChainList):
              (JSC::JIT::privateCompileGetByIdChain):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::JITThunks):
              * jit/JITStubs.h:
              * runtime/Collector.cpp:
              (JSC::currentThreadStackBase):
              (JSC::getPlatformThreadRegisters):
              (JSC::otherThreadStackPointer):
              * wrec/WREC.h:
              * wrec/WRECGenerator.cpp:
              (JSC::WREC::Generator::generateEnter):
              (JSC::WREC::Generator::generateReturnSuccess):
              (JSC::WREC::Generator::generateReturnFailure):
              * wrec/WRECGenerator.h:
              * wtf/FastMalloc.cpp:
              * wtf/TCSpinLock.h:
              (TCMalloc_SpinLock::Lock):
              (TCMalloc_SpinLock::Unlock):
              (TCMalloc_SlowLock):
              * wtf/Threading.h:
              * wtf/dtoa.cpp:
              * yarr/RegexJIT.cpp:
              (JSC::Yarr::RegexGenerator::generateEnter):
              (JSC::Yarr::RegexGenerator::generateReturn):
              * yarr/RegexJIT.h:
      2010-01-04  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Adam Barth.
      
              Reorganize, document and rename CPU() platform macros.
              https://bugs.webkit.org/show_bug.cgi?id=33145
      
              * webkit/webkitwebsettings.cpp:
              (webkit_get_user_agent):
      2010-01-04  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Adam Barth.
      
              Reorganize, document and rename CPU() platform macros.
              https://bugs.webkit.org/show_bug.cgi?id=33145
      
              * page/NavigatorBase.cpp:
              * platform/text/AtomicString.cpp:
              (WebCore::equal):
              * platform/text/StringHash.h:
              (WebCore::StringHash::equal):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc668212
  23. 01 Jun, 2009 1 commit
    • barraclough@apple.com's avatar
      2009-06-01 Gavin Barraclough <barraclough@apple.com> · d00f4a6e
      barraclough@apple.com authored
              Reviewed by Sam "WX" Weinig.
      
              Allow the JIT to operate without relying on use of RWX memory, on platforms where this is supported.
      
              This patch adds a switch to Platform.h (ENABLE_ASSEMBLER_WX_EXCLUSIVE) which enables this mode of operation.
              When this flag is set, all executable memory will be allocated RX, and switched to RW only whilst being
              modified.  Upon completion of code generation the protection is switched back to RX to allow execution.
      
              Further optimization will be required before it is desirable to enable this mode of operation by default;
              enabling this presently incurs a 5%-10% regression.
      
              (Submitting disabled - no performance impact).
      
              * assembler/AbstractMacroAssembler.h:
              (JSC::AbstractMacroAssembler::CodeLocationInstruction::repatchLoadToLEA):
              (JSC::AbstractMacroAssembler::CodeLocationLabel::fromFunctionPointer):
              (JSC::AbstractMacroAssembler::CodeLocationJump::relink):
              (JSC::AbstractMacroAssembler::CodeLocationCall::relink):
              (JSC::AbstractMacroAssembler::CodeLocationNearCall::relink):
              (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::repatch):
              (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::repatch):
              (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToTrampoline):
              (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToFunction):
              (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkNearCallerToTrampoline):
              (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkNearCallerToFunction):
              (JSC::AbstractMacroAssembler::PatchBuffer::PatchBuffer):
              (JSC::AbstractMacroAssembler::PatchBuffer::~PatchBuffer):
              (JSC::AbstractMacroAssembler::PatchBuffer::link):
              (JSC::AbstractMacroAssembler::PatchBuffer::patch):
              (JSC::AbstractMacroAssembler::PatchBuffer::performFinalization):
              (JSC::::CodeLocationCommon::nearCallAtOffset):
              (JSC::::CodeLocationCall::CodeLocationCall):
              (JSC::::CodeLocationNearCall::CodeLocationNearCall):
              * assembler/AssemblerBuffer.h:
              (JSC::AssemblerBuffer::executableCopy):
              * assembler/X86Assembler.h:
              (JSC::CAN_SIGN_EXTEND_U32_64):
              (JSC::X86Assembler::linkJump):
              (JSC::X86Assembler::linkCall):
              (JSC::X86Assembler::patchPointer):
              (JSC::X86Assembler::relinkJump):
              (JSC::X86Assembler::relinkCall):
              (JSC::X86Assembler::repatchInt32):
              (JSC::X86Assembler::repatchPointer):
              (JSC::X86Assembler::repatchLoadToLEA):
              (JSC::X86Assembler::patchInt32):
              (JSC::X86Assembler::patchRel32):
              * jit/ExecutableAllocator.h:
              (JSC::ExecutableAllocator::):
              (JSC::ExecutableAllocator::makeWritable):
              (JSC::ExecutableAllocator::makeExecutable):
              * jit/ExecutableAllocatorFixedVMPool.cpp:
              (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
              * jit/ExecutableAllocatorPosix.cpp:
              (JSC::ExecutablePool::systemAlloc):
              (JSC::ExecutablePool::systemRelease):
              (JSC::ExecutableAllocator::reprotectRegion):
              * jit/ExecutableAllocatorWin.cpp:
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::patchGetByIdSelf):
              (JSC::JIT::patchPutByIdReplace):
              * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d00f4a6e
  24. 26 Apr, 2009 1 commit
  25. 22 Apr, 2009 2 commits
  26. 21 Apr, 2009 1 commit
    • ggaren@apple.com's avatar
      JavaScriptCore: · 41f3d950
      ggaren@apple.com authored
      2009-04-20  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Mark Rowe.
              
              Tiger crash fix: Put VM tags in their own header file, and fixed up the
              #ifdefs so they're not used on Tiger.
      
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * interpreter/RegisterFile.h:
              (JSC::RegisterFile::RegisterFile):
              * jit/ExecutableAllocatorFixedVMPool.cpp:
              (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
              * jit/ExecutableAllocatorPosix.cpp:
              (JSC::ExecutablePool::systemAlloc):
              * runtime/Collector.cpp:
              (JSC::allocateBlock):
              * wtf/VMTags.h: Added.
      
      JavaScriptGlue:
      
      2009-04-20  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Mark Rowe.
      
              Tiger crash fix: Put VM tags in their own header file, and fixed up the
              #ifdefs so they're not used on Tiger.
      
              * ForwardingHeaders/wtf/VMTags.h: Copied from JavaScriptGlue/ForwardingHeaders/wtf/HashTraits.h.
      
      WebCore:
      
      2009-04-20  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Mark Rowe.
      
              Tiger crash fix: Put VM tags in their own header file, and fixed up the
              #ifdefs so they're not used on Tiger.
      
              * ForwardingHeaders/wtf/VMTags.h: Copied from WebCore/ForwardingHeaders/wtf/HashTraits.h.
      
      WebKit/mac:
      
      2009-04-20  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Mark Rowe.
      
              Tiger crash fix: Put VM tags in their own header file, and fixed up the
              #ifdefs so they're not used on Tiger.
      
              * ForwardingHeaders/wtf/VMTags.h: Copied from ForwardingHeaders/wtf/HashTraits.h.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41f3d950
  27. 20 Apr, 2009 1 commit
    • weinig@apple.com's avatar
      2009-04-20 Sam Weinig <sam@webkit.org> · 5f068cf5
      weinig@apple.com authored
              Reviewed by Kevin McCullough.
      
              Always tag mmaped memory on darwin and clean up #defines
              now that they are a little bigger.
      
              * interpreter/RegisterFile.h:
              (JSC::RegisterFile::RegisterFile):
              * jit/ExecutableAllocatorFixedVMPool.cpp:
              (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
              * jit/ExecutableAllocatorPosix.cpp:
              (JSC::ExecutablePool::systemAlloc):
              * runtime/Collector.cpp:
              (JSC::allocateBlock):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5f068cf5
  28. 18 Apr, 2009 1 commit
  29. 17 Apr, 2009 1 commit
    • barraclough@apple.com's avatar
      2009-04-17 Gavin Barraclough <barraclough@apple.com> · 7bfd5984
      barraclough@apple.com authored
              Reviewed by Geoff Garen.
      
              On x86_64, make all JIT-code allocations from a new heap, managed
              by FixedVMPoolAllocator.  This class allocates a single large (2Gb)
              pool of virtual memory from which all further allocations take place.
              Since all JIT code is allocated from this pool, we can continue to
              safely assume (as is already asserted) that it will always be possible
              to link any JIT-code to JIT-code jumps and calls.
      
              * JavaScriptCore.xcodeproj/project.pbxproj:
                  Add new file.
              * jit/ExecutableAllocatorFixedVMPool.cpp: Added.
              (JSC::FreeListEntry::FreeListEntry):
              (JSC::AVLTreeAbstractorForFreeList::get_less):
              (JSC::AVLTreeAbstractorForFreeList::set_less):
              (JSC::AVLTreeAbstractorForFreeList::get_greater):
              (JSC::AVLTreeAbstractorForFreeList::set_greater):
              (JSC::AVLTreeAbstractorForFreeList::get_balance_factor):
              (JSC::AVLTreeAbstractorForFreeList::set_balance_factor):
              (JSC::AVLTreeAbstractorForFreeList::null):
              (JSC::AVLTreeAbstractorForFreeList::compare_key_key):
              (JSC::AVLTreeAbstractorForFreeList::compare_key_node):
              (JSC::AVLTreeAbstractorForFreeList::compare_node_node):
              (JSC::sortFreeListEntriesByPointer):
              (JSC::sortCommonSizedAllocations):
              (JSC::FixedVMPoolAllocator::release):
              (JSC::FixedVMPoolAllocator::reuse):
              (JSC::FixedVMPoolAllocator::addToFreeList):
              (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
              (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
              (JSC::FixedVMPoolAllocator::alloc):
              (JSC::FixedVMPoolAllocator::free):
              (JSC::ExecutableAllocator::intializePageSize):
              (JSC::ExecutablePool::systemAlloc):
              (JSC::ExecutablePool::systemRelease):
                  The new 2Gb heap class!
              * jit/ExecutableAllocatorPosix.cpp:
                  Disable use of this implementation on x86_64.
              * wtf/AVLTree.h:
                  Add missing variable initialization.
              (WTF::::remove):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7bfd5984