1. 23 Feb, 2012 1 commit
    • mhahnenberg@apple.com's avatar
      Zero out CopiedBlocks on initialization · 13bbb9d7
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79199
      
      Reviewed by Filip Pizlo.
      
      Made CopyBlocks zero their payloads during construction. This allows
      JSArray to avoid having to manually clear its backing store upon allocation
      and also alleviates any future pain with regard to the garbage collector trying
      to mark what it thinks are values in what is actually uninitialized memory.
      
      * heap/CopiedBlock.h:
      (JSC::CopiedBlock::CopiedBlock):
      * runtime/JSArray.cpp:
      (JSC::JSArray::finishCreation):
      (JSC::JSArray::tryFinishCreationUninitialized):
      (JSC::JSArray::increaseVectorLength):
      (JSC::JSArray::unshiftCountSlowCase):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13bbb9d7
  2. 22 Feb, 2012 1 commit
    • mhahnenberg@apple.com's avatar
      Allocations from CopiedBlocks should always be 8-byte aligned · bd5ac227
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79271
      
      Reviewed by Geoffrey Garen.
      
      * heap/CopiedAllocator.h:
      (JSC::CopiedAllocator::allocate):
      * heap/CopiedBlock.h: Changed to add padding so that the start of the payload is always 
      guaranteed to be 8 byte aligned on both 64- and 32-bit platforms.
      (CopiedBlock):
      * heap/CopiedSpace.cpp: Changed all assertions of isPointerAligned to is8ByteAligned.
      (JSC::CopiedSpace::tryAllocateOversize):
      (JSC::CopiedSpace::getFreshBlock):
      * heap/CopiedSpaceInlineMethods.h:
      (JSC::CopiedSpace::allocateFromBlock):
      * runtime/JSArray.h:
      (ArrayStorage): Added padding for ArrayStorage to make sure that it is always 8 byte 
      aligned on both 64- and 32-bit platforms.
      * wtf/StdLibExtras.h:
      (WTF::is8ByteAligned): Added new utility function that functions similarly to the 
      way isPointerAligned does, but it just always checks for 8 byte alignment.
      (WTF):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd5ac227
  3. 20 Feb, 2012 1 commit
    • mhahnenberg@apple.com's avatar
      Factor out allocation in CopySpace into a separate CopyAllocator · 9daa324e
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=78610
      
      Reviewed by Oliver Hunt.
      
      Added a new CopyAllocator class, which allows us to do allocations without 
      having to load the current offset and store the current offset in the current 
      block. This change will allow us to easily do inline assembly in the JIT for 
      array allocations.
      
      * GNUmakefile.list.am:
      * JavaScriptCore.gypi:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * heap/CopiedAllocator.h: Added.
      (JSC):
      (CopiedAllocator):
      (JSC::CopiedAllocator::currentBlock):
      (JSC::CopiedAllocator::CopiedAllocator):
      (JSC::CopiedAllocator::allocate):
      (JSC::CopiedAllocator::fitsInCurrentBlock):
      (JSC::CopiedAllocator::wasLastAllocation):
      (JSC::CopiedAllocator::startedCopying):
      (JSC::CopiedAllocator::resetCurrentBlock):
      (JSC::CopiedAllocator::currentUtilization):
      (JSC::CopiedAllocator::resetLastAllocation):
      * heap/CopiedBlock.h:
      (CopiedBlock):
      * heap/CopiedSpace.cpp: Moved some stuff from CopiedSpaceInlineMethods to here because we 
      weren't really getting any benefits from having such big functions in a header file.
      (JSC::CopiedSpace::CopiedSpace):
      (JSC):
      (JSC::CopiedSpace::init):
      (JSC::CopiedSpace::tryAllocateSlowCase):
      (JSC::CopiedSpace::tryAllocateOversize):
      (JSC::CopiedSpace::tryReallocate):
      (JSC::CopiedSpace::tryReallocateOversize):
      (JSC::CopiedSpace::doneFillingBlock):
      (JSC::CopiedSpace::doneCopying):
      (JSC::CopiedSpace::getFreshBlock):
      * heap/CopiedSpace.h:
      (CopiedSpace):
      * heap/CopiedSpaceInlineMethods.h:
      (JSC):
      (JSC::CopiedSpace::startedCopying):
      (JSC::CopiedSpace::addNewBlock):
      (JSC::CopiedSpace::allocateNewBlock):
      (JSC::CopiedSpace::fitsInBlock):
      (JSC::CopiedSpace::tryAllocate):
      (JSC::CopiedSpace::allocateFromBlock):
      * heap/Heap.cpp:
      (JSC::Heap::collectAllGarbage):
      * heap/HeapBlock.h:
      (HeapBlock):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9daa324e
  4. 17 Feb, 2012 1 commit
    • mhahnenberg@apple.com's avatar
      Rename Bump* to Copy* · 4e822638
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=78573
      
      Reviewed by Geoffrey Garen.
      
      Renamed anything with "Bump" in the name to have "Copied" instead.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.gypi:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * heap/BumpBlock.h: Removed.
      * heap/BumpSpace.cpp: Removed.
      * heap/BumpSpace.h: Removed.
      * heap/BumpSpaceInlineMethods.h: Removed.
      * heap/ConservativeRoots.cpp:
      (JSC::ConservativeRoots::ConservativeRoots):
      (JSC::ConservativeRoots::genericAddPointer):
      * heap/ConservativeRoots.h:
      (ConservativeRoots):
      * heap/CopiedBlock.h: Added.
      (JSC):
      (CopiedBlock):
      (JSC::CopiedBlock::CopiedBlock):
      * heap/CopiedSpace.cpp: Added.
      (JSC):
      (JSC::CopiedSpace::tryAllocateSlowCase):
      * heap/CopiedSpace.h: Added.
      (JSC):
      (CopiedSpace):
      (JSC::CopiedSpace::isInCopyPhase):
      (JSC::CopiedSpace::totalMemoryAllocated):
      (JSC::CopiedSpace::totalMemoryUtilized):
      * heap/CopiedSpaceInlineMethods.h: Added.
      (JSC):
      (JSC::CopiedSpace::CopiedSpace):
      (JSC::CopiedSpace::init):
      (JSC::CopiedSpace::contains):
      (JSC::CopiedSpace::pin):
      (JSC::CopiedSpace::startedCopying):
      (JSC::CopiedSpace::doneCopying):
      (JSC::CopiedSpace::doneFillingBlock):
      (JSC::CopiedSpace::recycleBlock):
      (JSC::CopiedSpace::getFreshBlock):
      (JSC::CopiedSpace::borrowBlock):
      (JSC::CopiedSpace::addNewBlock):
      (JSC::CopiedSpace::allocateNewBlock):
      (JSC::CopiedSpace::fitsInBlock):
      (JSC::CopiedSpace::fitsInCurrentBlock):
      (JSC::CopiedSpace::tryAllocate):
      (JSC::CopiedSpace::tryAllocateOversize):
      (JSC::CopiedSpace::allocateFromBlock):
      (JSC::CopiedSpace::tryReallocate):
      (JSC::CopiedSpace::tryReallocateOversize):
      (JSC::CopiedSpace::isOversize):
      (JSC::CopiedSpace::isPinned):
      (JSC::CopiedSpace::oversizeBlockFor):
      (JSC::CopiedSpace::blockFor):
      * heap/Heap.cpp:
      * heap/Heap.h:
      (JSC):
      (Heap):
      * heap/MarkStack.cpp:
      (JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
      (JSC::SlotVisitor::drainFromShared):
      (JSC::SlotVisitor::startCopying):
      (JSC::SlotVisitor::allocateNewSpace):
      (JSC::SlotVisitor::doneCopying):
      * heap/MarkStack.h:
      (MarkStackThreadSharedData):
      * heap/SlotVisitor.h:
      (SlotVisitor):
      * runtime/JSArray.cpp:
      * runtime/JSObject.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e822638
  5. 19 Jan, 2012 1 commit
    • mhahnenberg@apple.com's avatar
      Implement a new allocator for backing stores · 5d0b30a2
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=75181
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore: 
      
      We want to move away from using fastMalloc for the backing stores for 
      some of our objects (e.g. JSArray, JSObject, JSString, etc).  These backing 
      stores have a nice property in that they only have a single owner (i.e. a 
      single pointer to them at any one time).  One way that we can take advantage 
      of this property is to implement a simple bump allocator/copying collector, 
      which will run alongside our normal mark/sweep collector, that only needs to 
      update the single owner pointer rather than having to redirect an arbitrary 
      number of pointers in from-space to to-space.
      
      This plan can give us a number of benefits. We can beat fastMalloc in terms 
      of both performance and memory usage, we can track how much memory we're using 
      far more accurately than our rough estimation now through the use of 
      reportExtraMemoryCost, and we can allocate arbitrary size objects (as opposed 
      to being limited to size classes like we have been historically). This is also 
      another step toward moving away from lazy destruction, which will improve our memory footprint.
      
      We start by creating said allocator and moving the ArrayStorage for JSArray 
      to use it rather than fastMalloc.
      
      The design of the collector is as follows:
      Allocation:
      -The collector allocates 64KB chunks from the OS to use for object allocation.
      -Each chunk contains an offset, a flag indicating if the block has been pinned, 
       and a payload, along with next and prev pointers so that they can be put in DoublyLinkedLists.
      -Any allocation greater than 64KB gets its own separate oversize block, which 
       is managed separately from the rest.
      -If the allocator receives a request for more than the remaining amount in the 
       current block, it grabs a fresh block.
      -Grabbing a fresh block means grabbing one off of the global free list (which is now 
       shared between the mark/sweep allocator and the bump allocator) if there is one. 
       If there isn't a new one we do one of two things: allocate a new block from the OS 
       if we're not ready for a GC yet, or run a GC and then try again. If we still don't 
       have enough space after the GC, we allocate a new block from the OS.
      
      Garbage collection:
      -At the start of garbage collection during conservative stack scanning, if we encounter 
       what appears to be a pointer to a bump-allocated block of memory, we pin that block so 
       that it will not be copied for this round of collection.
      -We also pin any oversize blocks that we encounter, which effectively doubles as a 
       "mark bit" for that block. Any oversize blocks that aren't pinned at the end of copying 
       are given back to the OS.
      -Marking threads are now also responsible for copying bump-allocated objects to newSpace
      -Each marking thread has a private 64KB block into which it copies bump-allocated objects that it encounters.
      -When that block fills up, the marking thread gives it back to the allocator and requests a new one.
      -When all marking has concluded, each thread gives back its copy block, even if it isn't full.
      -At the conclusion of copying (which is done by the end of the marking phase), we un-pin 
       any pinned blocks and give any blocks left in from-space to the global free list.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.gypi:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * heap/AllocationSpace.cpp:
      (JSC::AllocationSpace::allocateSlowCase):
      (JSC::AllocationSpace::allocateBlock):
      (JSC::AllocationSpace::freeBlocks):
      * heap/AllocationSpace.h:
      (JSC::AllocationSpace::waterMark):
      * heap/BumpBlock.h: Added.
      (JSC::BumpBlock::BumpBlock):
      * heap/BumpSpace.cpp: Added.
      (JSC::BumpSpace::tryAllocateSlowCase):
      * heap/BumpSpace.h: Added.
      (JSC::BumpSpace::isInCopyPhase):
      (JSC::BumpSpace::totalMemoryAllocated):
      (JSC::BumpSpace::totalMemoryUtilized):
      * heap/BumpSpaceInlineMethods.h: Added.
      (JSC::BumpSpace::BumpSpace):
      (JSC::BumpSpace::init):
      (JSC::BumpSpace::contains):
      (JSC::BumpSpace::pin):
      (JSC::BumpSpace::startedCopying):
      (JSC::BumpSpace::doneCopying):
      (JSC::BumpSpace::doneFillingBlock):
      (JSC::BumpSpace::recycleBlock):
      (JSC::BumpSpace::getFreshBlock):
      (JSC::BumpSpace::borrowBlock):
      (JSC::BumpSpace::addNewBlock):
      (JSC::BumpSpace::allocateNewBlock):
      (JSC::BumpSpace::fitsInBlock):
      (JSC::BumpSpace::fitsInCurrentBlock):
      (JSC::BumpSpace::tryAllocate):
      (JSC::BumpSpace::tryAllocateOversize):
      (JSC::BumpSpace::allocateFromBlock):
      (JSC::BumpSpace::tryReallocate):
      (JSC::BumpSpace::tryReallocateOversize):
      (JSC::BumpSpace::isOversize):
      (JSC::BumpSpace::isPinned):
      (JSC::BumpSpace::oversizeBlockFor):
      (JSC::BumpSpace::blockFor):
      * heap/ConservativeRoots.cpp:
      (JSC::ConservativeRoots::ConservativeRoots):
      (JSC::ConservativeRoots::genericAddPointer):
      (JSC::ConservativeRoots::add):
      * heap/ConservativeRoots.h:
      * heap/Heap.cpp:
      (JSC::Heap::Heap):
      (JSC::Heap::blockFreeingThreadMain):
      (JSC::Heap::reportExtraMemoryCostSlowCase):
      (JSC::Heap::getConservativeRegisterRoots):
      (JSC::Heap::markRoots):
      (JSC::Heap::collect):
      (JSC::Heap::releaseFreeBlocks):
      * heap/Heap.h:
      (JSC::Heap::waterMark):
      (JSC::Heap::highWaterMark):
      (JSC::Heap::setHighWaterMark):
      (JSC::Heap::tryAllocateStorage):
      (JSC::Heap::tryReallocateStorage):
      * heap/HeapBlock.h: Added.
      (JSC::HeapBlock::HeapBlock):
      * heap/MarkStack.cpp:
      (JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
      (JSC::SlotVisitor::drain):
      (JSC::SlotVisitor::drainFromShared):
      (JSC::SlotVisitor::startCopying):
      (JSC::SlotVisitor::allocateNewSpace):
      (JSC::SlotVisitor::copy):
      (JSC::SlotVisitor::copyAndAppend):
      (JSC::SlotVisitor::doneCopying):
      * heap/MarkStack.h:
      * heap/MarkedBlock.cpp:
      (JSC::MarkedBlock::recycle):
      (JSC::MarkedBlock::MarkedBlock):
      * heap/MarkedBlock.h:
      * heap/MarkedSpace.cpp:
      (JSC::MarkedSpace::MarkedSpace):
      * heap/MarkedSpace.h:
      (JSC::MarkedSpace::allocate):
      (JSC::MarkedSpace::forEachBlock):
      (JSC::MarkedSpace::SizeClass::resetAllocator):
      * heap/SlotVisitor.h:
      (JSC::SlotVisitor::SlotVisitor):
      * heap/TinyBloomFilter.h:
      (JSC::TinyBloomFilter::reset):
      * runtime/JSArray.cpp:
      (JSC::JSArray::JSArray):
      (JSC::JSArray::finishCreation):
      (JSC::JSArray::tryFinishCreationUninitialized):
      (JSC::JSArray::~JSArray):
      (JSC::JSArray::enterSparseMode):
      (JSC::JSArray::defineOwnNumericProperty):
      (JSC::JSArray::setLengthWritable):
      (JSC::JSArray::getOwnPropertySlotByIndex):
      (JSC::JSArray::getOwnPropertyDescriptor):
      (JSC::JSArray::putByIndexBeyondVectorLength):
      (JSC::JSArray::deletePropertyByIndex):
      (JSC::JSArray::getOwnPropertyNames):
      (JSC::JSArray::increaseVectorLength):
      (JSC::JSArray::unshiftCountSlowCase):
      (JSC::JSArray::setLength):
      (JSC::JSArray::pop):
      (JSC::JSArray::unshiftCount):
      (JSC::JSArray::visitChildren):
      (JSC::JSArray::sortNumeric):
      (JSC::JSArray::sort):
      (JSC::JSArray::compactForSorting):
      (JSC::JSArray::subclassData):
      (JSC::JSArray::setSubclassData):
      (JSC::JSArray::checkConsistency):
      * runtime/JSArray.h:
      (JSC::JSArray::inSparseMode):
      (JSC::JSArray::isLengthWritable):
      * wtf/CheckedBoolean.h: Added.
      (CheckedBoolean::CheckedBoolean):
      (CheckedBoolean::~CheckedBoolean):
      (CheckedBoolean::operator bool):
      * wtf/DoublyLinkedList.h:
      (WTF::::push):
      * wtf/StdLibExtras.h:
      (WTF::isPointerAligned):
      
      Source/JavaScriptGlue: 
      
      Added forwarding header for new CheckedBoolean used in the bump allocator.
      
      * ForwardingHeaders/wtf/CheckedBoolean.h: Added.
      
      Source/WebCore: 
      
      No new tests.
      
      Added forwarding header for new CheckedBoolean used in the bump allocator.
      
      * ForwardingHeaders/wtf/CheckedBoolean.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5d0b30a2
  6. 16 Nov, 2011 1 commit
    • fpizlo@apple.com's avatar
      Code block jettisoning should be part of the GC's transitive closure · 45928f82
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=72467
      
      Reviewed by Geoff Garen.
              
      Replaced JettisonedCodeBlocks with DFGCodeBlocks. The latter knows about all
      DFG code blocks (i.e. those that may be jettisoned, and may have inlined weak
      references) and helps track what state each of those code blocks is in during
      GC. The state consists of two flags; mayBeExecuting, which tells if the code block
      is live from call frames; and isJettisoned, which tells if the code block is
      not owned by any executable and thus should be deleted as soon as it is not
      mayBeExecuting.
              
      - Not executing, Not jettisoned: The code block may or may not be reachable from
        any executables, but it is owned by an executable, and hence should be
        kept alive if its executable is live and if all of its weak references are
        live. Otherwise it should be deleted during the current GC cycle, and its
        outgoing references should not be scanned.
                
      - Not executing but jettisoned: The code block should be deleted as soon as
        possible and none of its outgoing references should be scanned.
                
      - Executing but not jettisoned: The code block should be kept alive during this
        GC cycle, and all of its outgoing references (including the weak ones)
        should be scanned and marked strongly. The mayBeExecuting bit will be cleared at
        the end of the GC cycle.
                
      - Executing and jettisoned: The code block should be kept alive during this
        GC cycle, and all of its outgoing references (including the weak ones)
        should be scanned and marked strongly. However, on the next GC cycle, it
        will have its mayBeExecuting bit cleared and hence it will become a candidate
        for immediate deletion provided it is not executing again.
      
      This is performance-neutral.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::~CodeBlock):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::setJITCode):
      (JSC::CodeBlock::DFGData::DFGData):
      (JSC::DFGCodeBlocks::mark):
      * heap/ConservativeRoots.cpp:
      (JSC::ConservativeRoots::add):
      * heap/ConservativeRoots.h:
      * heap/DFGCodeBlocks.cpp: Added.
      (JSC::DFGCodeBlocks::DFGCodeBlocks):
      (JSC::DFGCodeBlocks::~DFGCodeBlocks):
      (JSC::DFGCodeBlocks::jettison):
      (JSC::DFGCodeBlocks::clearMarks):
      (JSC::DFGCodeBlocks::deleteUnmarkedJettisonedCodeBlocks):
      (JSC::DFGCodeBlocks::traceMarkedCodeBlocks):
      * heap/DFGCodeBlocks.h: Added.
      * heap/Heap.cpp:
      (JSC::Heap::jettisonDFGCodeBlock):
      (JSC::Heap::markRoots):
      (JSC::Heap::collect):
      * heap/Heap.h:
      * heap/JettisonedCodeBlocks.cpp: Removed.
      * heap/JettisonedCodeBlocks.h: Removed.
      * interpreter/RegisterFile.cpp:
      (JSC::RegisterFile::gatherConservativeRoots):
      * interpreter/RegisterFile.h:
      * runtime/Executable.cpp:
      (JSC::jettisonCodeBlock):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      45928f82
  7. 21 Sep, 2011 1 commit
    • fpizlo@apple.com's avatar
      DFG should support continuous optimization · 706f5f34
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68329
      
      Reviewed by Geoffrey Garen.
              
      This adds the ability to reoptimize a code block if speculation
      failures happen frequently. 6% speed-up on Kraken, 1% slow-down
      on V8, neutral on SunSpider.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.pro:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::CodeBlock):
      (JSC::ProgramCodeBlock::jettison):
      (JSC::EvalCodeBlock::jettison):
      (JSC::FunctionCodeBlock::jettison):
      (JSC::CodeBlock::shouldOptimizeNow):
      (JSC::CodeBlock::dumpValueProfiles):
      * bytecode/CodeBlock.h:
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::getStrongPrediction):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
      (JSC::DFG::JITCompiler::compileEntry):
      (JSC::DFG::JITCompiler::compileBody):
      * dfg/DFGJITCompiler.h:
      (JSC::DFG::JITCompiler::noticeOSREntry):
      * dfg/DFGOSREntry.cpp:
      (JSC::DFG::prepareOSREntry):
      * dfg/DFGOSREntry.h:
      (JSC::DFG::getOSREntryDataBytecodeIndex):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * heap/ConservativeRoots.cpp:
      (JSC::ConservativeRoots::ConservativeRoots):
      (JSC::ConservativeRoots::~ConservativeRoots):
      (JSC::DummyMarkHook::mark):
      (JSC::ConservativeRoots::genericAddPointer):
      (JSC::ConservativeRoots::genericAddSpan):
      (JSC::ConservativeRoots::add):
      * heap/ConservativeRoots.h:
      * heap/Heap.cpp:
      (JSC::Heap::addJettisonCodeBlock):
      (JSC::Heap::markRoots):
      * heap/Heap.h:
      * heap/JettisonedCodeBlocks.cpp: Added.
      (JSC::JettisonedCodeBlocks::JettisonedCodeBlocks):
      (JSC::JettisonedCodeBlocks::~JettisonedCodeBlocks):
      (JSC::JettisonedCodeBlocks::addCodeBlock):
      (JSC::JettisonedCodeBlocks::clearMarks):
      (JSC::JettisonedCodeBlocks::deleteUnmarkedCodeBlocks):
      (JSC::JettisonedCodeBlocks::traceCodeBlocks):
      * heap/JettisonedCodeBlocks.h: Added.
      (JSC::JettisonedCodeBlocks::mark):
      * interpreter/RegisterFile.cpp:
      (JSC::RegisterFile::gatherConservativeRoots):
      * interpreter/RegisterFile.h:
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/Executable.cpp:
      (JSC::jettisonCodeBlock):
      (JSC::EvalExecutable::jettisonOptimizedCode):
      (JSC::ProgramExecutable::jettisonOptimizedCode):
      (JSC::FunctionExecutable::jettisonOptimizedCodeForCall):
      (JSC::FunctionExecutable::jettisonOptimizedCodeForConstruct):
      * runtime/Executable.h:
      (JSC::FunctionExecutable::jettisonOptimizedCodeFor):
      * wtf/BitVector.h: Added.
      (WTF::BitVector::BitVector):
      (WTF::BitVector::~BitVector):
      (WTF::BitVector::operator=):
      (WTF::BitVector::size):
      (WTF::BitVector::ensureSize):
      (WTF::BitVector::resize):
      (WTF::BitVector::clearAll):
      (WTF::BitVector::get):
      (WTF::BitVector::set):
      (WTF::BitVector::clear):
      (WTF::BitVector::bitsInPointer):
      (WTF::BitVector::maxInlineBits):
      (WTF::BitVector::byteCount):
      (WTF::BitVector::makeInlineBits):
      (WTF::BitVector::OutOfLineBits::numBits):
      (WTF::BitVector::OutOfLineBits::numWords):
      (WTF::BitVector::OutOfLineBits::bits):
      (WTF::BitVector::OutOfLineBits::create):
      (WTF::BitVector::OutOfLineBits::destroy):
      (WTF::BitVector::OutOfLineBits::OutOfLineBits):
      (WTF::BitVector::isInline):
      (WTF::BitVector::outOfLineBits):
      (WTF::BitVector::resizeOutOfLine):
      (WTF::BitVector::bits):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      706f5f34
  8. 09 Jun, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-06-09 Geoffrey Garen <ggaren@apple.com> · 28cfb358
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              Factored MarkedBlock set management into a helper class with a fast case Bloom filter
              https://bugs.webkit.org/show_bug.cgi?id=62413
              
              SunSpider reports a small speedup.
              
              This is in preparation for having ConservativeSet operate on arbitrary
              sets of MarkedBlocks, and in preparation for conservative scanning
              becoming proportionally more important than other GC activities.
      
              * GNUmakefile.list.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.xcodeproj/project.pbxproj: Build-o.
      
              * heap/ConservativeRoots.cpp:
              (JSC::ConservativeRoots::add):
              * heap/ConservativeRoots.h:
              (JSC::ConservativeRoots::ConservativeRoots): Operate on a MarkedBlockSet
              directly, instead of a Heap, so we can operate on subsets of the Heap
              instead.
              
              Use a TinyBloomFilter for single-cycle exclusion of most pointers. This
              is particularly important since we expect not to find our subject pointer
              in the MarkedBlock hash, and hash misses are more expensive than typical
              hash lookups because they have high collision rates.
              
              No need for single-pointer add() to be public anymore, since nobody uses it.
      
              * heap/Heap.cpp:
              (JSC::Heap::markRoots):
              * heap/Heap.h:
              (JSC::Heap::forEachCell):
              (JSC::Heap::forEachBlock): Use MarkedBlockSet since that's what
              ConservativeRoots relies on.
              
              Nixed contains(), since nobody uses it anymore.
      
              * heap/MarkedBlock.h:
              (WTF::MarkedBlockHash::hash): Added a faster hash taking advantage of
              the VM layout properties of MarkedBlocks.
      
              * heap/MarkedBlockSet.h: Added.
              (JSC::MarkedBlockSet::add):
              (JSC::MarkedBlockSet::remove):
              (JSC::MarkedBlockSet::recomputeFilter):
              (JSC::MarkedBlockSet::filter):
              (JSC::MarkedBlockSet::set):
              * heap/TinyBloomFilter.h: Added.
              (JSC::TinyBloomFilter::TinyBloomFilter):
              (JSC::TinyBloomFilter::add):
              (JSC::TinyBloomFilter::ruleOut): New helper class, used above.
      
              * interpreter/RegisterFile.cpp:
              (JSC::RegisterFile::gatherConservativeRoots): No need to specifically
              exclude values by tag -- the tiny bloom filter is already a register-register
              compare, so adding another "rule out" factor just slows things down.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      28cfb358
  9. 27 May, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-05-26 Geoffrey Garen <ggaren@apple.com> · d887ac60
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              Optimized ConservativeSet to avoid double-visiting objects
              https://bugs.webkit.org/show_bug.cgi?id=61592
              
              SunSpider thinks this might be a 1% speedup
      
              * heap/ConservativeRoots.h:
              (JSC::ConservativeRoots::add): Use testAndClearMarked to avoid double-visiting
              an object.
      
              * heap/Heap.h:
              (JSC::Heap::isMarked):
              (JSC::Heap::testAndSetMarked):
              (JSC::Heap::testAndClearMarked):
              (JSC::Heap::setMarked): Added testAndClearMarked. Changed argument type
              to void*, since clients want to ask questions about arbitrary pointers
              into the heap, even when they aren't known to be JSCells.
      
              * heap/MarkedBlock.h:
              (JSC::MarkedBlock::testAndClearMarked):
              * heap/MarkedSpace.h:
              (JSC::MarkedSpace::isMarked):
              (JSC::MarkedSpace::testAndSetMarked):
              (JSC::MarkedSpace::testAndClearMarked):
              (JSC::MarkedSpace::setMarked):
              (JSC::MarkedSpace::contains): Ditto.
      
              * wtf/Bitmap.h:
              (WTF::::testAndClear): New function for ConservativeRoots's inverted
              marking pass.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d887ac60
  10. 11 Apr, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-04-11 Geoffrey Garen <ggaren@apple.com> · 0b32d098
      ggaren@apple.com authored
              Rubber-stamped by Sam Weinig.
              
              Moved remaining heap implementation files to the heap folder.
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.pro:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * heap/ConservativeRoots.cpp: Copied from runtime/ConservativeSet.cpp.
              * heap/ConservativeRoots.h: Copied from runtime/ConservativeSet.h.
              * heap/Handle.h:
              * heap/Heap.cpp:
              * heap/MachineStackMarker.cpp: Copied from runtime/MachineStackMarker.cpp.
              * heap/MachineStackMarker.h: Copied from runtime/MachineStackMarker.h.
              * heap/MarkStack.cpp: Copied from runtime/MarkStack.cpp.
              * heap/MarkStack.h: Copied from runtime/MarkStack.h.
              * heap/MarkStackPosix.cpp: Copied from runtime/MarkStackPosix.cpp.
              * heap/MarkStackSymbian.cpp: Copied from runtime/MarkStackSymbian.cpp.
              * heap/MarkStackWin.cpp: Copied from runtime/MarkStackWin.cpp.
              * heap/MarkedBlock.cpp: Copied from runtime/MarkedBlock.cpp.
              * heap/MarkedBlock.h: Copied from runtime/MarkedBlock.h.
              * heap/MarkedSpace.cpp: Copied from runtime/MarkedSpace.cpp.
              * heap/MarkedSpace.h: Copied from runtime/MarkedSpace.h.
              * interpreter/RegisterFile.cpp:
              * runtime/ConservativeSet.cpp: Removed.
              * runtime/ConservativeSet.h: Removed.
              * runtime/MachineStackMarker.cpp: Removed.
              * runtime/MachineStackMarker.h: Removed.
              * runtime/MarkStack.cpp: Removed.
              * runtime/MarkStack.h: Removed.
              * runtime/MarkStackPosix.cpp: Removed.
              * runtime/MarkStackSymbian.cpp: Removed.
              * runtime/MarkStackWin.cpp: Removed.
              * runtime/MarkedBlock.cpp: Removed.
              * runtime/MarkedBlock.h: Removed.
              * runtime/MarkedSpace.cpp: Removed.
              * runtime/MarkedSpace.h: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b32d098
  11. 16 Mar, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-03-16 Geoffrey Garen <ggaren@apple.com> · 02bf0404
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              Some conservative root gathering cleanup
              https://bugs.webkit.org/show_bug.cgi?id=56447
              
              SunSpider says 0.5% - 1.8% faster.
      
              * interpreter/RegisterFile.cpp:
              (JSC::RegisterFile::gatherConservativeRoots):
              * interpreter/RegisterFile.h: New helper function for doing the
              conservative gathering of the register file. It's still conservative,
              since the register file may contain uninitialized values, but it's
              moving-safe, because it only visits values tagged as pointers, so there's
              no risk of mistaking an integer for a pointer and accidentally changing it.
      
              * runtime/ConservativeSet.cpp:
              (JSC::ConservativeRoots::add):
              * runtime/ConservativeSet.h: Added a single-value add function, used above.
      
              * runtime/Heap.cpp:
              (JSC::Heap::markRoots): Separated machine stack conservative roots from
              register file conservative roots because machine stack roots must be
              pinned, but register file roots need not be pinned.
              
              Adopted new interface for passing the current stack extent to the machine
              stack root gathering routine. This allows us to exclude marking-related
              data structures on the stack, and thus avoid double-marking the set of
              machine roots.
      
              * runtime/MachineStackMarker.cpp:
              (JSC::MachineThreads::gatherFromCurrentThread):
              (JSC::MachineThreads::gatherConservativeRoots):
              * runtime/MachineStackMarker.h: Added new interface, described above.
      
              * runtime/MarkedBlock.h:
              (JSC::MarkedBlock::firstAtom):
              * wtf/StdLibExtras.h:
              (WTF::roundUpToMultipleOf): Moved roundUpToMultipleOf so it could be used
              by MachineStacks.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      02bf0404
  12. 13 Mar, 2011 2 commits
    • ggaren@apple.com's avatar
      A few Heap-related renames (sans file moves, which should come next) · 123f685d
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=56283
              
      Reviewed by Sam Weinig.
      
      ConservativeSet => ConservativeRoots. "Set" was misleading, since items
      are not uniqued. Also, "Roots" is more specific about what's in the set.
              
      MachineStackMarker => MachineThreads. "Threads" is more descriptive of
      the fact that this class maintains a set of all threads using JSC.
      "Stack" was misleading, since this class traverses stacks and registers.
      "Mark" was misleading, since this class doesn't mark anything anymore.
              
      registerThread => addCurrentThread. "Current" is more specific.
      unregisterThread => removeCurrentThread. "Current" is more specific.
              
      "currentThreadRegistrar" => threadSpecific. The only point of this data
      structure is to register a thread-specific destructor with a pointer to
      this.
              
      "mark...Conservatively" => "gather". "Mark" is not true, since these
      functions don't mark anything. "Conservatively" is redundant, since they
      take "ConservativeRoots" as an argument.
      
      * API/APIShims.h:
      (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
      * JavaScriptCore.exp:
      * runtime/ConservativeSet.cpp:
      (JSC::ConservativeRoots::grow):
      (JSC::ConservativeRoots::add):
      * runtime/ConservativeSet.h:
      (JSC::ConservativeRoots::ConservativeRoots):
      (JSC::ConservativeRoots::~ConservativeRoots):
      (JSC::ConservativeRoots::size):
      (JSC::ConservativeRoots::roots):
      * runtime/Heap.cpp:
      (JSC::Heap::Heap):
      (JSC::Heap::markRoots):
      * runtime/Heap.h:
      (JSC::Heap::machineThreads):
      * runtime/JSGlobalData.h:
      (JSC::JSGlobalData::makeUsableFromMultipleThreads):
      * runtime/MachineStackMarker.cpp:
      (JSC::MachineThreads::MachineThreads):
      (JSC::MachineThreads::~MachineThreads):
      (JSC::MachineThreads::makeUsableFromMultipleThreads):
      (JSC::MachineThreads::addCurrentThread):
      (JSC::MachineThreads::removeThread):
      (JSC::MachineThreads::removeCurrentThread):
      (JSC::MachineThreads::gatherFromCurrentThreadInternal):
      (JSC::MachineThreads::gatherFromCurrentThread):
      (JSC::MachineThreads::gatherFromOtherThread):
      (JSC::MachineThreads::gatherConservativeRoots):
      * runtime/MachineStackMarker.h:
      * runtime/MarkStack.h:
      (JSC::MarkStack::append):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      123f685d
    • ggaren@apple.com's avatar
      2011-03-13 Geoffrey Garen <ggaren@apple.com> · febf8f4f
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              Removed another case of DeprecatedPtr (ConservativeSet)
              https://bugs.webkit.org/show_bug.cgi?id=56281
              
              The ConservativeSet is an internal data structure used during marking,
              so direct pointers are fine.
      
              * runtime/ConservativeSet.cpp:
              (JSC::ConservativeSet::grow):
              * runtime/ConservativeSet.h: Added some accessors, for use by MarkStack::append.
              (JSC::ConservativeSet::~ConservativeSet): Fixed a typo where we calculated
              the size of the set based on sizeof(DeprecatedPtr<T>*) instead of
              sizeof(DeprecatedPtr<T>). I'm not sure if this had real-world implications or not.
              (JSC::ConservativeSet::size):
              (JSC::ConservativeSet::set): Use direct pointers, as stated above. 
      
              * runtime/Heap.cpp:
              (JSC::Heap::markRoots):
              * runtime/MarkStack.h:
              (JSC::MarkStack::append): Created a special case of append for
              ConservativeSet. I didn't want to add back a generic "append JSCell*"
              function, since other class might start using that wrong. (In the end,
              this function might go away, since the Heap will want to do something
              slightly more interesting with the conservative set, but this is OK for
              now.)
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      febf8f4f
  13. 31 Jan, 2011 1 commit
  14. 30 Jan, 2011 2 commits
    • ossy@webkit.org's avatar
      2011-01-30 Csaba Osztrogonác <ossy@webkit.org> · ad0e9df1
      ossy@webkit.org authored
              Unreviewed, rolling out r77098, r77099, r77100, r77109, and
              r77111.
              http://trac.webkit.org/changeset/77098
              http://trac.webkit.org/changeset/77099
              http://trac.webkit.org/changeset/77100
              http://trac.webkit.org/changeset/77109
              http://trac.webkit.org/changeset/77111
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Qt build is broken
      
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObjectData::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
              (JSC::JSCallbackObject::setPrivateProperty):
              * API/JSCallbackObjectFunctions.h:
              (JSC::::put):
              (JSC::::staticFunctionGetter):
              * API/JSObjectRef.cpp:
              (JSObjectMakeConstructor):
              (JSObjectSetPrivateProperty):
              * API/JSWeakObjectMapRefInternal.h:
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::markAggregate):
              * bytecode/CodeBlock.h:
              (JSC::CodeBlock::globalObject):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::BytecodeGenerator):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              (JSC::BytecodeGenerator::findScopedProperty):
              * debugger/Debugger.cpp:
              (JSC::evaluateInGlobalCallFrame):
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              (JSC::DebuggerActivation::markChildren):
              * debugger/DebuggerActivation.h:
              * debugger/DebuggerCallFrame.cpp:
              (JSC::DebuggerCallFrame::evaluate):
              * interpreter/CallFrame.h:
              (JSC::ExecState::exception):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::resolve):
              (JSC::Interpreter::resolveSkip):
              (JSC::Interpreter::resolveGlobal):
              (JSC::Interpreter::resolveGlobalDynamic):
              (JSC::Interpreter::resolveBaseAndProperty):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::appendSourceToError):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::tryCacheGetByID):
              (JSC::Interpreter::privateExecute):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              * runtime/ArgList.cpp:
              (JSC::MarkedArgumentBuffer::markLists):
              * runtime/Arguments.cpp:
              (JSC::Arguments::markChildren):
              (JSC::Arguments::getOwnPropertySlot):
              (JSC::Arguments::getOwnPropertyDescriptor):
              (JSC::Arguments::put):
              * runtime/Arguments.h:
              (JSC::Arguments::setActivation):
              (JSC::Arguments::Arguments):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::constructArrayWithSizeQuirk):
              * runtime/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncSplice):
              * runtime/BatchedTransitionOptimizer.h:
              (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
              (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              (JSC::constructBoolean):
              (JSC::constructBooleanFromImmediateBoolean):
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/ConservativeSet.cpp:
              (JSC::ConservativeSet::grow):
              * runtime/ConservativeSet.h:
              (JSC::ConservativeSet::~ConservativeSet):
              (JSC::ConservativeSet::mark):
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateInstance.cpp:
              (JSC::DateInstance::DateInstance):
              * runtime/DatePrototype.cpp:
              (JSC::dateProtoFuncSetTime):
              (JSC::setNewValueFromTimeArgs):
              (JSC::setNewValueFromDateArgs):
              (JSC::dateProtoFuncSetYear):
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/ErrorInstance.cpp:
              (JSC::ErrorInstance::ErrorInstance):
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              * runtime/GetterSetter.cpp:
              (JSC::GetterSetter::markChildren):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::GetterSetter):
              (JSC::GetterSetter::getter):
              (JSC::GetterSetter::setGetter):
              (JSC::GetterSetter::setter):
              (JSC::GetterSetter::setSetter):
              * runtime/GlobalEvalFunction.cpp:
              (JSC::GlobalEvalFunction::GlobalEvalFunction):
              (JSC::GlobalEvalFunction::markChildren):
              * runtime/GlobalEvalFunction.h:
              (JSC::GlobalEvalFunction::cachedGlobalObject):
              * runtime/Heap.cpp:
              (JSC::Heap::markProtectedObjects):
              (JSC::Heap::markTempSortVectors):
              (JSC::Heap::markRoots):
              * runtime/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::value):
              (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::markChildren):
              (JSC::JSActivation::put):
              * runtime/JSArray.cpp:
              (JSC::JSArray::JSArray):
              (JSC::JSArray::getOwnPropertySlot):
              (JSC::JSArray::getOwnPropertyDescriptor):
              (JSC::JSArray::put):
              (JSC::JSArray::putSlowCase):
              (JSC::JSArray::deleteProperty):
              (JSC::JSArray::increaseVectorLength):
              (JSC::JSArray::setLength):
              (JSC::JSArray::pop):
              (JSC::JSArray::push):
              (JSC::JSArray::unshiftCount):
              (JSC::JSArray::sort):
              (JSC::JSArray::fillArgList):
              (JSC::JSArray::copyToRegisters):
              (JSC::JSArray::compactForSorting):
              * runtime/JSArray.h:
              (JSC::JSArray::getIndex):
              (JSC::JSArray::setIndex):
              (JSC::JSArray::uncheckedSetIndex):
              (JSC::JSArray::markChildrenDirect):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::JSValue::toThisObject):
              (JSC::JSCell::MarkStack::append):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::getOwnPropertySlot):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              (JSC::JSGlobalObject::reset):
              (JSC::JSGlobalObject::resetPrototype):
              (JSC::JSGlobalObject::markChildren):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
              (JSC::JSGlobalObject::regExpConstructor):
              (JSC::JSGlobalObject::errorConstructor):
              (JSC::JSGlobalObject::evalErrorConstructor):
              (JSC::JSGlobalObject::rangeErrorConstructor):
              (JSC::JSGlobalObject::referenceErrorConstructor):
              (JSC::JSGlobalObject::syntaxErrorConstructor):
              (JSC::JSGlobalObject::typeErrorConstructor):
              (JSC::JSGlobalObject::URIErrorConstructor):
              (JSC::JSGlobalObject::evalFunction):
              (JSC::JSGlobalObject::objectPrototype):
              (JSC::JSGlobalObject::functionPrototype):
              (JSC::JSGlobalObject::arrayPrototype):
              (JSC::JSGlobalObject::booleanPrototype):
              (JSC::JSGlobalObject::stringPrototype):
              (JSC::JSGlobalObject::numberPrototype):
              (JSC::JSGlobalObject::datePrototype):
              (JSC::JSGlobalObject::regExpPrototype):
              (JSC::JSGlobalObject::methodCallDummy):
              (JSC::Structure::prototypeForLookup):
              (JSC::constructArray):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Holder::object):
              (JSC::Stringifier::markAggregate):
              (JSC::Stringifier::stringify):
              (JSC::Stringifier::Holder::appendNextProperty):
              (JSC::Walker::callReviver):
              (JSC::Walker::walk):
              * runtime/JSObject.cpp:
              (JSC::JSObject::defineGetter):
              (JSC::JSObject::defineSetter):
              (JSC::JSObject::removeDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::putDescriptor):
              (JSC::JSObject::defineOwnProperty):
              * runtime/JSObject.h:
              (JSC::JSObject::getDirectOffset):
              (JSC::JSObject::putDirectOffset):
              (JSC::JSObject::flattenDictionaryObject):
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::putDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectWithoutTransition):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::JSValue::putDirect):
              (JSC::JSObject::allocatePropertyStorageInline):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
              (JSC::JSPropertyNameIterator::get):
              * runtime/JSPropertyNameIterator.h:
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::markChildren):
              * runtime/JSString.cpp:
              (JSC::StringObject::create):
              * runtime/JSValue.h:
              * runtime/JSWrapperObject.cpp:
              (JSC::JSWrapperObject::markChildren):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::internalValue):
              (JSC::JSWrapperObject::setInternalValue):
              * runtime/LiteralParser.cpp:
              (JSC::LiteralParser::parse):
              * runtime/Lookup.cpp:
              (JSC::setUpStaticFunctionSlot):
              * runtime/Lookup.h:
              (JSC::lookupPut):
              * runtime/MarkStack.h:
              (JSC::MarkStack::appendValues):
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              (JSC::constructWithNumberConstructor):
              * runtime/NumberObject.cpp:
              (JSC::constructNumber):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              (JSC::objectConstructorGetOwnPropertyDescriptor):
              * runtime/Operations.h:
              (JSC::normalizePrototypeChain):
              (JSC::resolveBase):
              * runtime/PrototypeFunction.cpp:
              (JSC::PrototypeFunction::PrototypeFunction):
              * runtime/PutPropertySlot.h:
              (JSC::PutPropertySlot::setExistingProperty):
              (JSC::PutPropertySlot::setNewProperty):
              (JSC::PutPropertySlot::base):
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              * runtime/ScopeChain.cpp:
              (JSC::ScopeChainNode::print):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::~ScopeChainNode):
              (JSC::ScopeChainIterator::operator*):
              (JSC::ScopeChainIterator::operator->):
              (JSC::ScopeChain::top):
              * runtime/ScopeChainMark.h:
              (JSC::ScopeChain::markAggregate):
              * runtime/SmallStrings.cpp:
              (JSC::isMarked):
              (JSC::SmallStrings::markChildren):
              * runtime/SmallStrings.h:
              (JSC::SmallStrings::emptyString):
              (JSC::SmallStrings::singleCharacterString):
              (JSC::SmallStrings::singleCharacterStrings):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringObject.cpp:
              (JSC::StringObject::StringObject):
              * runtime/StringObject.h:
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * runtime/Structure.cpp:
              (JSC::Structure::Structure):
              (JSC::Structure::addPropertyTransition):
              (JSC::Structure::toDictionaryTransition):
              (JSC::Structure::flattenDictionaryStructure):
              * runtime/Structure.h:
              (JSC::Structure::storedPrototype):
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::uncheckedGet):
              (JSC::WeakGCMap::isValid):
              (JSC::::get):
              (JSC::::take):
              (JSC::::set):
              (JSC::::uncheckedRemove):
              * runtime/WriteBarrier.h: Removed.
      2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
      
              Unreviewed, rolling out r77098, r77099, r77100, r77109, and
              r77111.
              http://trac.webkit.org/changeset/77098
              http://trac.webkit.org/changeset/77099
              http://trac.webkit.org/changeset/77100
              http://trac.webkit.org/changeset/77109
              http://trac.webkit.org/changeset/77111
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Qt build is broken
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
      2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
      
              Unreviewed, rolling out r77098, r77099, r77100, r77109, and
              r77111.
              http://trac.webkit.org/changeset/77098
              http://trac.webkit.org/changeset/77099
              http://trac.webkit.org/changeset/77100
              http://trac.webkit.org/changeset/77109
              http://trac.webkit.org/changeset/77111
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Qt build is broken
      
              * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
              * WebCore.exp.in:
              * bindings/js/DOMWrapperWorld.h:
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::markDOMNodesForDocument):
              (WebCore::markDOMObjectWrapper):
              (WebCore::markDOMNodeWrapper):
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::markChildren):
              (WebCore::JSDOMGlobalObject::setInjectedScript):
              (WebCore::JSDOMGlobalObject::injectedScript):
              * bindings/js/JSDOMGlobalObject.h:
              (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
              (WebCore::getDOMConstructor):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::setLocation):
              (WebCore::DialogHandler::dialogCreated):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              (WebCore::JSDOMWindowShell::markChildren):
              (WebCore::JSDOMWindowShell::unwrappedObject):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::window):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSDeviceMotionEventCustom.cpp:
              (WebCore::createAccelerationObject):
              (WebCore::createRotationRateObject):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::JSEventListener):
              (WebCore::JSEventListener::markJSFunction):
              * bindings/js/JSEventListener.h:
              (WebCore::JSEventListener::jsFunction):
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::setAll):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor):
              * bindings/js/JSImageDataCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::scopeChain):
              (WebCore::JSJavaScriptCallFrame::scopeType):
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::markAggregate):
              (WebCore::JSNodeFilterCondition::acceptNode):
              * bindings/js/JSNodeFilterCondition.h:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor):
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              (WebCore::JSSQLResultSetRowList::item):
              * bindings/js/ScriptCachedFrameData.cpp:
              (WebCore::ScriptCachedFrameData::restore):
              * bindings/js/ScriptObject.cpp:
              (WebCore::ScriptGlobalObject::set):
              * bindings/js/SerializedScriptValue.cpp:
              (WebCore::CloneDeserializer::putProperty):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/qt/qt_instance.cpp:
              (JSC::Bindings::QtInstance::QtInstance):
              (JSC::Bindings::QtInstance::removeCachedMethod):
              (JSC::Bindings::QtInstance::markAggregate):
              * bridge/qt/qt_instance.h:
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
              (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
              (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
              (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
              * bridge/qt/qt_runtime.h:
              * bridge/runtime_root.cpp:
              (JSC::Bindings::RootObject::invalidate):
              * bridge/runtime_root.h:
              * dom/Document.h:
      2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
      
              Unreviewed, rolling out r77098, r77099, r77100, r77109, and
              r77111.
              http://trac.webkit.org/changeset/77098
              http://trac.webkit.org/changeset/77099
              http://trac.webkit.org/changeset/77100
              http://trac.webkit.org/changeset/77109
              http://trac.webkit.org/changeset/77111
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Qt build is broken
      
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame scopeChain]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad0e9df1
    • oliver@apple.com's avatar
      Convert markstack to a slot visitor API · ba805bee
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=53219
      
      rolling r77006 and r77020 back in.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba805bee
  15. 28 Jan, 2011 2 commits
    • rniwa@webkit.org's avatar
      2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com> · 3857b1ea
      rniwa@webkit.org authored
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObjectData::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
              (JSC::JSCallbackObject::setPrivateProperty):
              * API/JSCallbackObjectFunctions.h:
              (JSC::::put):
              (JSC::::staticFunctionGetter):
              * API/JSObjectRef.cpp:
              (JSObjectMakeConstructor):
              (JSObjectSetPrivateProperty):
              * API/JSWeakObjectMapRefInternal.h:
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::markAggregate):
              * bytecode/CodeBlock.h:
              (JSC::CodeBlock::globalObject):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::BytecodeGenerator):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              (JSC::BytecodeGenerator::findScopedProperty):
              * debugger/Debugger.cpp:
              (JSC::evaluateInGlobalCallFrame):
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              (JSC::DebuggerActivation::markChildren):
              * debugger/DebuggerActivation.h:
              * debugger/DebuggerCallFrame.cpp:
              (JSC::DebuggerCallFrame::evaluate):
              * interpreter/CallFrame.h:
              (JSC::ExecState::exception):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::resolve):
              (JSC::Interpreter::resolveSkip):
              (JSC::Interpreter::resolveGlobal):
              (JSC::Interpreter::resolveGlobalDynamic):
              (JSC::Interpreter::resolveBaseAndProperty):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::appendSourceToError):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::tryCacheGetByID):
              (JSC::Interpreter::privateExecute):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              * runtime/ArgList.cpp:
              (JSC::MarkedArgumentBuffer::markLists):
              * runtime/Arguments.cpp:
              (JSC::Arguments::markChildren):
              (JSC::Arguments::getOwnPropertySlot):
              (JSC::Arguments::getOwnPropertyDescriptor):
              (JSC::Arguments::put):
              * runtime/Arguments.h:
              (JSC::Arguments::setActivation):
              (JSC::Arguments::Arguments):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::constructArrayWithSizeQuirk):
              * runtime/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncSplice):
              * runtime/BatchedTransitionOptimizer.h:
              (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
              (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              (JSC::constructBoolean):
              (JSC::constructBooleanFromImmediateBoolean):
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/ConservativeSet.cpp:
              (JSC::ConservativeSet::grow):
              * runtime/ConservativeSet.h:
              (JSC::ConservativeSet::~ConservativeSet):
              (JSC::ConservativeSet::mark):
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateInstance.cpp:
              (JSC::DateInstance::DateInstance):
              * runtime/DatePrototype.cpp:
              (JSC::dateProtoFuncSetTime):
              (JSC::setNewValueFromTimeArgs):
              (JSC::setNewValueFromDateArgs):
              (JSC::dateProtoFuncSetYear):
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/ErrorInstance.cpp:
              (JSC::ErrorInstance::ErrorInstance):
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              * runtime/GetterSetter.cpp:
              (JSC::GetterSetter::markChildren):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::GetterSetter):
              (JSC::GetterSetter::getter):
              (JSC::GetterSetter::setGetter):
              (JSC::GetterSetter::setter):
              (JSC::GetterSetter::setSetter):
              * runtime/GlobalEvalFunction.cpp:
              (JSC::GlobalEvalFunction::GlobalEvalFunction):
              (JSC::GlobalEvalFunction::markChildren):
              * runtime/GlobalEvalFunction.h:
              (JSC::GlobalEvalFunction::cachedGlobalObject):
              * runtime/Heap.cpp:
              (JSC::Heap::markProtectedObjects):
              (JSC::Heap::markTempSortVectors):
              (JSC::Heap::markRoots):
              * runtime/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::value):
              (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::markChildren):
              (JSC::JSActivation::put):
              * runtime/JSArray.cpp:
              (JSC::JSArray::JSArray):
              (JSC::JSArray::getOwnPropertySlot):
              (JSC::JSArray::getOwnPropertyDescriptor):
              (JSC::JSArray::put):
              (JSC::JSArray::putSlowCase):
              (JSC::JSArray::deleteProperty):
              (JSC::JSArray::increaseVectorLength):
              (JSC::JSArray::setLength):
              (JSC::JSArray::pop):
              (JSC::JSArray::push):
              (JSC::JSArray::unshiftCount):
              (JSC::JSArray::sort):
              (JSC::JSArray::fillArgList):
              (JSC::JSArray::copyToRegisters):
              (JSC::JSArray::compactForSorting):
              * runtime/JSArray.h:
              (JSC::JSArray::getIndex):
              (JSC::JSArray::setIndex):
              (JSC::JSArray::uncheckedSetIndex):
              (JSC::JSArray::markChildrenDirect):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::JSValue::toThisObject):
              (JSC::JSCell::MarkStack::append):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::getOwnPropertySlot):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              (JSC::JSGlobalObject::reset):
              (JSC::JSGlobalObject::resetPrototype):
              (JSC::JSGlobalObject::markChildren):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
              (JSC::JSGlobalObject::regExpConstructor):
              (JSC::JSGlobalObject::errorConstructor):
              (JSC::JSGlobalObject::evalErrorConstructor):
              (JSC::JSGlobalObject::rangeErrorConstructor):
              (JSC::JSGlobalObject::referenceErrorConstructor):
              (JSC::JSGlobalObject::syntaxErrorConstructor):
              (JSC::JSGlobalObject::typeErrorConstructor):
              (JSC::JSGlobalObject::URIErrorConstructor):
              (JSC::JSGlobalObject::evalFunction):
              (JSC::JSGlobalObject::objectPrototype):
              (JSC::JSGlobalObject::functionPrototype):
              (JSC::JSGlobalObject::arrayPrototype):
              (JSC::JSGlobalObject::booleanPrototype):
              (JSC::JSGlobalObject::stringPrototype):
              (JSC::JSGlobalObject::numberPrototype):
              (JSC::JSGlobalObject::datePrototype):
              (JSC::JSGlobalObject::regExpPrototype):
              (JSC::JSGlobalObject::methodCallDummy):
              (JSC::Structure::prototypeForLookup):
              (JSC::constructArray):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Holder::object):
              (JSC::Stringifier::markAggregate):
              (JSC::Stringifier::stringify):
              (JSC::Stringifier::Holder::appendNextProperty):
              (JSC::Walker::callReviver):
              (JSC::Walker::walk):
              * runtime/JSObject.cpp:
              (JSC::JSObject::defineGetter):
              (JSC::JSObject::defineSetter):
              (JSC::JSObject::removeDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::putDescriptor):
              (JSC::JSObject::defineOwnProperty):
              * runtime/JSObject.h:
              (JSC::JSObject::getDirectOffset):
              (JSC::JSObject::putDirectOffset):
              (JSC::JSObject::flattenDictionaryObject):
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::putDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectWithoutTransition):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::JSValue::putDirect):
              (JSC::JSObject::allocatePropertyStorageInline):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
              (JSC::JSPropertyNameIterator::get):
              * runtime/JSPropertyNameIterator.h:
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::markChildren):
              * runtime/JSString.cpp:
              (JSC::StringObject::create):
              * runtime/JSValue.h:
              * runtime/JSWrapperObject.cpp:
              (JSC::JSWrapperObject::markChildren):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::internalValue):
              (JSC::JSWrapperObject::setInternalValue):
              * runtime/LiteralParser.cpp:
              (JSC::LiteralParser::parse):
              * runtime/Lookup.cpp:
              (JSC::setUpStaticFunctionSlot):
              * runtime/Lookup.h:
              (JSC::lookupPut):
              * runtime/MarkStack.h:
              (JSC::MarkStack::appendValues):
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              (JSC::constructWithNumberConstructor):
              * runtime/NumberObject.cpp:
              (JSC::constructNumber):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              (JSC::objectConstructorGetOwnPropertyDescriptor):
              * runtime/Operations.h:
              (JSC::normalizePrototypeChain):
              (JSC::resolveBase):
              * runtime/PrototypeFunction.cpp:
              (JSC::PrototypeFunction::PrototypeFunction):
              * runtime/PutPropertySlot.h:
              (JSC::PutPropertySlot::setExistingProperty):
              (JSC::PutPropertySlot::setNewProperty):
              (JSC::PutPropertySlot::base):
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              * runtime/ScopeChain.cpp:
              (JSC::ScopeChainNode::print):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::~ScopeChainNode):
              (JSC::ScopeChainIterator::operator*):
              (JSC::ScopeChainIterator::operator->):
              (JSC::ScopeChain::top):
              * runtime/ScopeChainMark.h:
              (JSC::ScopeChain::markAggregate):
              * runtime/SmallStrings.cpp:
              (JSC::isMarked):
              (JSC::SmallStrings::markChildren):
              * runtime/SmallStrings.h:
              (JSC::SmallStrings::emptyString):
              (JSC::SmallStrings::singleCharacterString):
              (JSC::SmallStrings::singleCharacterStrings):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringObject.cpp:
              (JSC::StringObject::StringObject):
              * runtime/StringObject.h:
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * runtime/Structure.cpp:
              (JSC::Structure::Structure):
              (JSC::Structure::addPropertyTransition):
              (JSC::Structure::toDictionaryTransition):
              (JSC::Structure::flattenDictionaryStructure):
              * runtime/Structure.h:
              (JSC::Structure::storedPrototype):
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::uncheckedGet):
              (JSC::WeakGCMap::isValid):
              (JSC::::get):
              (JSC::::take):
              (JSC::::set):
              (JSC::::uncheckedRemove):
              * runtime/WriteBarrier.h: Removed.
      2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
      2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame scopeChain]):
      2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
              * WebCore.exp.in:
              * bindings/js/DOMWrapperWorld.h:
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::markDOMNodesForDocument):
              (WebCore::markDOMObjectWrapper):
              (WebCore::markDOMNodeWrapper):
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::markChildren):
              (WebCore::JSDOMGlobalObject::setInjectedScript):
              (WebCore::JSDOMGlobalObject::injectedScript):
              * bindings/js/JSDOMGlobalObject.h:
              (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
              (WebCore::getDOMConstructor):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::setLocation):
              (WebCore::DialogHandler::dialogCreated):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              (WebCore::JSDOMWindowShell::markChildren):
              (WebCore::JSDOMWindowShell::unwrappedObject):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::window):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSDeviceMotionEventCustom.cpp:
              (WebCore::createAccelerationObject):
              (WebCore::createRotationRateObject):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::JSEventListener):
              (WebCore::JSEventListener::markJSFunction):
              * bindings/js/JSEventListener.h:
              (WebCore::JSEventListener::jsFunction):
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::setAll):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor):
              * bindings/js/JSImageDataCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::scopeChain):
              (WebCore::JSJavaScriptCallFrame::scopeType):
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::markAggregate):
              (WebCore::JSNodeFilterCondition::acceptNode):
              * bindings/js/JSNodeFilterCondition.h:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor):
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              (WebCore::JSSQLResultSetRowList::item):
              * bindings/js/ScriptCachedFrameData.cpp:
              (WebCore::ScriptCachedFrameData::restore):
              * bindings/js/ScriptObject.cpp:
              (WebCore::ScriptGlobalObject::set):
              * bindings/js/SerializedScriptValue.cpp:
              (WebCore::CloneDeserializer::putProperty):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
              (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
              (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
              (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
              * bridge/qt/qt_runtime.h:
              * bridge/runtime_root.cpp:
              (JSC::Bindings::RootObject::invalidate):
              * bridge/runtime_root.h:
              * dom/Document.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3857b1ea
    • oliver@apple.com's avatar
      2011-01-27 Oliver Hunt <oliver@apple.com> · c975423a
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Move the MarkStack over to a slot based marking API.
      
              In order to avoiding aliasing concerns there are two new types
              that need to be used when holding on to JSValues and JSCell that
              need to be marked: WriteBarrier and DeprecatedPtr.  WriteBarrier
              is expected to be used for any JSValue or Cell that's lifetime and
              marking is controlled by another GC object.  DeprecatedPtr is used
              for any value that we need to rework ownership for.
      
              The change over to this model has produced a large amount of
              code changes, but they are mostly mechanical (forwarding JSGlobalData,
              etc).
      
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObjectData::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
              (JSC::JSCallbackObject::setPrivateProperty):
              * API/JSCallbackObjectFunctions.h:
              (JSC::::put):
              (JSC::::staticFunctionGetter):
              * API/JSObjectRef.cpp:
              (JSObjectMakeConstructor):
              (JSObjectSetPrivateProperty):
              * API/JSWeakObjectMapRefInternal.h:
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::markAggregate):
              * bytecode/CodeBlock.h:
              (JSC::CodeBlock::globalObject):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::BytecodeGenerator):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              (JSC::BytecodeGenerator::findScopedProperty):
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              (JSC::DebuggerActivation::markChildren):
              * debugger/DebuggerActivation.h:
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::resolve):
              (JSC::Interpreter::resolveSkip):
              (JSC::Interpreter::resolveGlobalDynamic):
              (JSC::Interpreter::resolveBaseAndProperty):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::appendSourceToError):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::privateExecute):
              * interpreter/Register.h:
              (JSC::Register::jsValueSlot):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              * runtime/Arguments.cpp:
              (JSC::Arguments::markChildren):
              (JSC::Arguments::getOwnPropertySlot):
              (JSC::Arguments::getOwnPropertyDescriptor):
              (JSC::Arguments::put):
              * runtime/Arguments.h:
              (JSC::Arguments::setActivation):
              (JSC::Arguments::Arguments):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::constructArrayWithSizeQuirk):
              * runtime/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncSplice):
              * runtime/BatchedTransitionOptimizer.h:
              (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
              (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              (JSC::constructBoolean):
              (JSC::constructBooleanFromImmediateBoolean):
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/ConservativeSet.h:
              (JSC::ConservativeSet::mark):
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateInstance.cpp:
              (JSC::DateInstance::DateInstance):
              * runtime/DatePrototype.cpp:
              (JSC::dateProtoFuncSetTime):
              (JSC::setNewValueFromTimeArgs):
              (JSC::setNewValueFromDateArgs):
              (JSC::dateProtoFuncSetYear):
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/ErrorInstance.cpp:
              (JSC::ErrorInstance::ErrorInstance):
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              * runtime/GetterSetter.cpp:
              (JSC::GetterSetter::markChildren):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::GetterSetter):
              (JSC::GetterSetter::getter):
              (JSC::GetterSetter::setGetter):
              (JSC::GetterSetter::setter):
              (JSC::GetterSetter::setSetter):
              * runtime/GlobalEvalFunction.cpp:
              (JSC::GlobalEvalFunction::GlobalEvalFunction):
              (JSC::GlobalEvalFunction::markChildren):
              * runtime/GlobalEvalFunction.h:
              (JSC::GlobalEvalFunction::cachedGlobalObject):
              * runtime/Heap.cpp:
              (JSC::Heap::markProtectedObjects):
              (JSC::Heap::markTempSortVectors):
              (JSC::Heap::markRoots):
              * runtime/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::value):
              (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::put):
              * runtime/JSArray.cpp:
              (JSC::JSArray::JSArray):
              (JSC::JSArray::getOwnPropertySlot):
              (JSC::JSArray::getOwnPropertyDescriptor):
              (JSC::JSArray::put):
              (JSC::JSArray::putSlowCase):
              (JSC::JSArray::deleteProperty):
              (JSC::JSArray::increaseVectorLength):
              (JSC::JSArray::setLength):
              (JSC::JSArray::pop):
              (JSC::JSArray::push):
              (JSC::JSArray::unshiftCount):
              (JSC::JSArray::sort):
              (JSC::JSArray::fillArgList):
              (JSC::JSArray::copyToRegisters):
              (JSC::JSArray::compactForSorting):
              * runtime/JSArray.h:
              (JSC::JSArray::getIndex):
              (JSC::JSArray::setIndex):
              (JSC::JSArray::uncheckedSetIndex):
              (JSC::JSArray::markChildrenDirect):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::MarkStack::append):
              (JSC::JSCell::MarkStack::appendCell):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::getOwnPropertySlot):
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              (JSC::JSGlobalObject::reset):
              (JSC::JSGlobalObject::resetPrototype):
              (JSC::JSGlobalObject::markChildren):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
              (JSC::JSGlobalObject::regExpConstructor):
              (JSC::JSGlobalObject::errorConstructor):
              (JSC::JSGlobalObject::evalErrorConstructor):
              (JSC::JSGlobalObject::rangeErrorConstructor):
              (JSC::JSGlobalObject::referenceErrorConstructor):
              (JSC::JSGlobalObject::syntaxErrorConstructor):
              (JSC::JSGlobalObject::typeErrorConstructor):
              (JSC::JSGlobalObject::URIErrorConstructor):
              (JSC::JSGlobalObject::evalFunction):
              (JSC::JSGlobalObject::objectPrototype):
              (JSC::JSGlobalObject::functionPrototype):
              (JSC::JSGlobalObject::arrayPrototype):
              (JSC::JSGlobalObject::booleanPrototype):
              (JSC::JSGlobalObject::stringPrototype):
              (JSC::JSGlobalObject::numberPrototype):
              (JSC::JSGlobalObject::datePrototype):
              (JSC::JSGlobalObject::regExpPrototype):
              (JSC::JSGlobalObject::methodCallDummy):
              (JSC::constructArray):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Holder::object):
              (JSC::Stringifier::Holder::objectSlot):
              (JSC::Stringifier::markAggregate):
              (JSC::Stringifier::stringify):
              (JSC::Stringifier::Holder::appendNextProperty):
              (JSC::Walker::callReviver):
              (JSC::Walker::walk):
              * runtime/JSObject.cpp:
              (JSC::JSObject::defineGetter):
              (JSC::JSObject::defineSetter):
              (JSC::JSObject::removeDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::putDescriptor):
              (JSC::JSObject::defineOwnProperty):
              * runtime/JSObject.h:
              (JSC::JSObject::putDirectOffset):
              (JSC::JSObject::putUndefinedAtDirectOffset):
              (JSC::JSObject::flattenDictionaryObject):
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::putDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectWithoutTransition):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::JSValue::putDirect):
              (JSC::JSObject::allocatePropertyStorageInline):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::markChildren):
              * runtime/JSString.cpp:
              (JSC::StringObject::create):
              * runtime/JSValue.h:
              * runtime/JSWrapperObject.cpp:
              (JSC::JSWrapperObject::markChildren):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::internalValue):
              (JSC::JSWrapperObject::setInternalValue):
              * runtime/LiteralParser.cpp:
              (JSC::LiteralParser::parse):
              * runtime/Lookup.cpp:
              (JSC::setUpStaticFunctionSlot):
              * runtime/Lookup.h:
              (JSC::lookupPut):
              * runtime/MarkStack.h:
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              (JSC::constructWithNumberConstructor):
              * runtime/NumberObject.cpp:
              (JSC::constructNumber):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              (JSC::objectConstructorGetOwnPropertyDescriptor):
              * runtime/Operations.h:
              (JSC::normalizePrototypeChain):
              (JSC::resolveBase):
              * runtime/PrototypeFunction.cpp:
              (JSC::PrototypeFunction::PrototypeFunction):
              * runtime/PutPropertySlot.h:
              (JSC::PutPropertySlot::setExistingProperty):
              (JSC::PutPropertySlot::setNewProperty):
              (JSC::PutPropertySlot::base):
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              * runtime/ScopeChain.cpp:
              (JSC::ScopeChainNode::print):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::~ScopeChainNode):
              (JSC::ScopeChainIterator::operator*):
              (JSC::ScopeChainIterator::operator->):
              (JSC::ScopeChain::top):
              * runtime/ScopeChainMark.h:
              (JSC::ScopeChain::markAggregate):
              * runtime/SmallStrings.cpp:
              (JSC::isMarked):
              (JSC::SmallStrings::markChildren):
              * runtime/SmallStrings.h:
              (JSC::SmallStrings::emptyString):
              (JSC::SmallStrings::singleCharacterString):
              (JSC::SmallStrings::singleCharacterStrings):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringObject.cpp:
              (JSC::StringObject::StringObject):
              * runtime/StringObject.h:
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * runtime/Structure.cpp:
              (JSC::Structure::flattenDictionaryStructure):
              * runtime/Structure.h:
              (JSC::Structure::storedPrototypeSlot):
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::uncheckedGet):
              (JSC::WeakGCMap::uncheckedGetSlot):
              (JSC::::get):
              (JSC::::take):
              (JSC::::set):
              (JSC::::uncheckedRemove):
              * runtime/WriteBarrier.h: Added.
              (JSC::DeprecatedPtr::DeprecatedPtr):
              (JSC::DeprecatedPtr::get):
              (JSC::DeprecatedPtr::operator*):
              (JSC::DeprecatedPtr::operator->):
              (JSC::DeprecatedPtr::slot):
              (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
              (JSC::DeprecatedPtr::operator!):
              (JSC::WriteBarrierBase::set):
              (JSC::WriteBarrierBase::get):
              (JSC::WriteBarrierBase::operator*):
              (JSC::WriteBarrierBase::operator->):
              (JSC::WriteBarrierBase::slot):
              (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
              (JSC::WriteBarrierBase::operator!):
              (JSC::WriteBarrier::WriteBarrier):
              (JSC::operator==):
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              There's no reason to recurse here, the value we
              were marking was protected.
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Update WebCore to the new marking apis, correct bindings
              codegen.
      
              * ForwardingHeaders/runtime/WriteBarrier.h: Added.
              * WebCore.exp.in:
              * bindings/js/DOMWrapperWorld.h:
              (WebCore::DOMWrapperWorld::globalData):
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::markDOMNodesForDocument):
              (WebCore::markDOMObjectWrapper):
              (WebCore::markDOMNodeWrapper):
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::markChildren):
              (WebCore::JSDOMGlobalObject::setInjectedScript):
              (WebCore::JSDOMGlobalObject::injectedScript):
              * bindings/js/JSDOMGlobalObject.h:
              (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
              (WebCore::getDOMConstructor):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::setLocation):
              (WebCore::DialogHandler::dialogCreated):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              (WebCore::JSDOMWindowShell::markChildren):
              (WebCore::JSDOMWindowShell::unwrappedObject):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::window):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::JSEventListener):
              (WebCore::JSEventListener::markJSFunction):
              * bindings/js/JSEventListener.h:
              (WebCore::JSEventListener::jsFunction):
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::setAll):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor):
              * bindings/js/JSImageDataCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::scopeChain):
              (WebCore::JSJavaScriptCallFrame::scopeType):
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::markAggregate):
              (WebCore::JSNodeFilterCondition::acceptNode):
              * bindings/js/JSNodeFilterCondition.h:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor):
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              (WebCore::JSSQLResultSetRowList::item):
              * bindings/js/ScriptCachedFrameData.cpp:
              (WebCore::ScriptCachedFrameData::restore):
              * bindings/js/ScriptObject.cpp:
              (WebCore::ScriptGlobalObject::set):
              * bindings/js/SerializedScriptValue.cpp:
              (WebCore::CloneDeserializer::putProperty):
              * bindings/scripts/CodeGeneratorJS.pm:
              * dom/Document.h:
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Update to new marking api
      
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame scopeChain]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c975423a
  16. 22 Jan, 2011 2 commits
    • ggaren@apple.com's avatar
      2011-01-22 Geoffrey Garen <ggaren@apple.com> · 7fc55f20
      ggaren@apple.com authored
              Reviewed by Dan Bernstein.
      
              ASSERT running run-webkit-tests --threaded.
              https://bugs.webkit.org/show_bug.cgi?id=52971
              
              SunSpider and v8 report no change.
      
              * runtime/ConservativeSet.cpp:
              (JSC::ConservativeSet::grow):
              (JSC::ConservativeSet::add):
              * runtime/ConservativeSet.h: Tweaked the inline capacity to 128, and
              the growth policy to 2X, to make SunSpider and v8 happy.
              (JSC::ConservativeSet::ConservativeSet):
              (JSC::ConservativeSet::~ConservativeSet):
              (JSC::ConservativeSet::mark): Use OSAllocator directly, instead of malloc.
              Malloc is forbidden during a multi-threaded mark phase because it can
              cause deadlock.
      2011-01-22  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Dan Bernstein.
      
              Beefed up --threaded mode to catch even more kinds of errors.
              https://bugs.webkit.org/show_bug.cgi?id=52971
      
              * DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp: Use a shared
              context group to force JSC to mark multiple threads. (This used to be
              the default, but it changed in SnowLeopard.)
              (runJavaScriptThread): Do more locking and unlocking, and more allocation,
              to give threading mistakes more chances to show themselves.
              (startJavaScriptThreads):
              (stopJavaScriptThreads):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7fc55f20
    • ggaren@apple.com's avatar
      2011-01-22 Geoffrey Garen <ggaren@apple.com> · c9bfff41
      ggaren@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Rubber-stamped by Maciej Stachowiak.
      
              A few of Maciej's review suggestions for my last patch.
              https://bugs.webkit.org/show_bug.cgi?id=52946        
      
              SunSpider reports no change.
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.pro:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems.
      
              * runtime/ConservativeSet.cpp: Added.
              (JSC::isPointerAligned):
              (JSC::ConservativeSet::add):
              * runtime/ConservativeSet.h: Added.
              (JSC::ConservativeSet::ConservativeSet):
              (JSC::ConservativeSet::mark): Split ConservativeSet out into its own
              file, and moved the conservative check into ConservativeSet::add, making
              ConservativeSet's responsibility clearer.
      
              * runtime/Heap.cpp:
              (JSC::Heap::markRoots):
              * runtime/MachineStackMarker.cpp:
              (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
              (JSC::MachineStackMarker::markOtherThreadConservatively):
              * runtime/MachineStackMarker.h:
              * runtime/MarkStack.h: Updated for changes above.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9bfff41
  17. 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/I...
      76da8fc1
  18. 13 Oct, 2010 1 commit
    • barraclough@apple.com's avatar
      JavaScriptCore: Bug 43987 - Downloading using XHR is much slower than before · 0d9181a4
      barraclough@apple.com authored
      Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector.
      Fundamentally this should be the same (copies current contents to expand capacity,
      rather than using a rope), but this approach allows the intermadiate state of the
      String to be inspected in the buffer without copying to resolve.
      
      Reviewed by Oliver Hunt.
      
      * runtime/JSONObject.cpp:
      (JSC::Stringifier::appendQuotedString):
      (JSC::Stringifier::Holder::appendNextProperty):
          Renamed StringBuilder::size() -> length() (to match other String types).
      
      * runtime/UStringBuilder.h:
      (JSC::UStringBuilder::append):
      (JSC::UStringBuilder::toUString):
          Update for changes in parent class, can just 'using' the append methods.
      
      * wtf/text/StringBuilder.cpp: Added.
      (WTF::StringBuilder::reifyString):
      (WTF::StringBuilder::resize):
      (WTF::StringBuilder::reserveCapacity):
      (WTF::StringBuilder::allocateBuffer):
      (WTF::StringBuilder::appendUninitialized):
      (WTF::StringBuilder::append):
      (WTF::StringBuilder::shrinkToFit):
      * wtf/text/StringBuilder.h:
      (WTF::StringBuilder::StringBuilder):
      (WTF::StringBuilder::append):
      (WTF::StringBuilder::toString):
      (WTF::StringBuilder::toStringPreserveCapacity):
      (WTF::StringBuilder::length):
      (WTF::StringBuilder::isEmpty):
      (WTF::StringBuilder::operator[]):
      (WTF::StringBuilder::clear):
          Class updated to use overcapacity in a StringImpl, rather than a Vector.
      
      * Android.mk:
      * Android.v8.wtf.mk:
      * GNUmakefile.am:
      * JavaScriptCore.exp:
      * JavaScriptCore.gypi:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.vcproj/jsc/jsc.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * wtf/CMakeLists.txt:
      * wtf/wtf.pri:
      
      WebCore: Bug 43987 - Downloading using XHR is much slower than before
      
      Reviewed by Oliver Hunt.
      
      * svg/SVGPathStringBuilder.cpp:
      (WebCore::SVGPathStringBuilder::result):
          StringBuilder::size() -> StringBuilder::length().
      
      WebKit/chromium: Bug 43987 - Downloading using XHR is much slower than before
      
      Reviewed by Oliver Hunt.
      
      * src/WebPageSerializerImpl.cpp:
      (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0d9181a4
  19. 12 Oct, 2010 1 commit
    • zimmermann@webkit.org's avatar
      2010-10-12 Nikolas Zimmermann <nzimmermann@rim.com> · dffa3cad
      zimmermann@webkit.org authored
              Reviewed by Gavin Barraclough.
      
              Unify JSC::StringBuilder & WebCore::StringBuilder
              https://bugs.webkit.org/show_bug.cgi?id=47538
      
              Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String().
              Move the append(const JSC::UString&) method into runtime/UStringBuilder.h.
              UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality.
      
              No new code, just move code around.
      
              * GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h.
              * JavaScriptCore.gypi: Ditto.
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
              * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
              * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
              * runtime/Executable.cpp:
              (JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString().
              * runtime/FunctionConstructor.cpp:
              (JSC::constructFunction): Ditto.
              * runtime/JSGlobalObjectFunctions.cpp:
              (JSC::globalFuncUnescape): Ditto.
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::stringify): Ditto.
              (JSC::Stringifier::appendQuotedString): Ditto.
              (JSC::Stringifier::appendStringifiedValue): Ditto.
              (JSC::Stringifier::startNewLine): Ditto.
              (JSC::Stringifier::Holder::appendNextProperty): Ditto.
              * runtime/LiteralParser.cpp:
              (JSC::LiteralParser::Lexer::lexString): Ditto.
              * runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include.
              * runtime/StringBuilder.h: Removed.
              * runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods.
              (JSC::UStringBuilder::append): append(const JSC::UString&)
              (JSC::UStringBuilder::toUString):
              * wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h
              (WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere.
              (WTF::StringBuilder::isEmpty): Ditto (+ constify method). 
              (WTF::StringBuilder::reserveCapacity): Ditto.
              (WTF::StringBuilder::resize): Ditto.
              (WTF::StringBuilder::size): Ditto.
              (WTF::StringBuilder::operator[]): Ditto.
              (WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder.
      2010-10-12  Nikolas Zimmermann  <nzimmermann@rim.com>
      
              Reviewed by Gavin Barraclough.
      
              Unify JSC::StringBuilder & WebCore::StringBuilder
              https://bugs.webkit.org/show_bug.cgi?id=47538
      
              * src/LocalizedStrings.cpp:
              (WebCore::imageTitle): Use WTF::StringBuilder.
              * src/WebEntities.cpp:
              (WebKit::WebEntities::convertEntitiesInString): Ditto.
              * src/WebPageSerializerImpl.cpp: Remove useless includes.
              (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer): 
              * src/WebPageSerializerImpl.h: Use WTF::StringBuilder.
      2010-10-12  Nikolas Zimmermann  <nzimmermann@rim.com>
      
              Reviewed by Gavin Barraclough.
      
              Unify JSC::StringBuilder & WebCore::StringBuilder
              https://bugs.webkit.org/show_bug.cgi?id=47538
      
              JSC::StringBuilder operates on a Vector<UChar, 64> and allows to build a string based on a stream of characters in an efficient manner.
              WebCore::StringBuilder operates on a Vector<String, 16> and allows to concat an arbitary number of Strings. It's not efficient in handling single
              characters, as a String with length=1 has to be constructed for those. An analysis of the callers of WebCore::StringBuilder shows that
              most callsites actually combine Strings and single characters, so using a Vector<UChar> would be more efficient. Those who only combine large
              strings are only used for debugging purposes, so it's fine to switch them to a Vector<UChar> approach as well.
      
              Replace WebCore::StringBuilder with JSC::StringBuilder, and move it to wtf/text/StringBuilder.h into the WTF namespace.
              While I was at it remove platform/text/StringBuffer.h, as it was only including wtf/text/StringBuffer.h.
      
              No change in functionality, thus no new tests.
      
              * Android.mk: Remove platform/text/StringBuilder.* and platform/text/StringBuffer.h.
              * CMakeLists.txt: Ditto.
              * GNUmakefile.am: Ditto. 
              * WebCore.gypi: Ditto.
              * WebCore.order: Ditto.
              * WebCore.pro: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * ForwardingHeaders/runtime/StringBuilder.h: Removed.
              * ForwardingHeaders/runtime/UStringBuilder.h: Added.
              * ForwardingHeaders/wtf/text/StringBuilder.h: Added.
              * bindings/js/ScriptString.h: Don't include PlatformString.h but wtf/text/WTFString.h.
              (WebCore::ScriptString::operator+=): Use JSC::UStringBuilder instead of JSC::StringBuilder.
              * bridge/jni/JNIBridge.cpp: Use WTF::StringBuilder (+ use append(const UChar) for single characters).
              * css/MediaQuery.cpp: Ditto.
              * css/MediaQueryExp.cpp: Ditto.
              * dom/Node.cpp: Ditto.
              (WebCore::Node::appendTextContent): Manually track wheter the StringBuilder content is empty or null, the new StringBuilder doesn't differentiate between null & empty strings.
              * dom/Node.h: Remove appendTextContent definition, it's not needed to be exported, removes the need for a StringBuilder.h include or forward declaration.
              * html/DOMTokenList.cpp: Use WTF::StringBuilder.
              * inspector/InspectorResource.cpp: Remove useless StringBuffer.h include.
              * platform/android/FileSystemAndroid.cpp: Use WTF::StringBuilder.
              * platform/brew/FileSystemBrew.cpp: Ditto.
              * platform/chromium/ClipboardChromium.cpp: Ditto (+ use append(const UChar) for single characters).
              * platform/graphics/gpu/PODInterval.h: Ditto (Only used as debugging helper here, in debug builds).
              * platform/graphics/gpu/PODRedBlackTree.h: Ditto (Only used as debugging helper here, in debug builds).
              * platform/graphics/mac/GraphicsLayerCA.mm: Remove useless StringBuilder.h include.
              * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Use WTF::StringBuilder, and use append(const UChar) for single characters.
              * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Ditto.
              * platform/network/ProxyServer.cpp:
              (WebCore::appendProxyServerString): Use WTF::StringBuilder.
              * platform/text/StringBuffer.h: Removed.
              * platform/text/StringBuilder.cpp: Removed.
              * platform/text/StringBuilder.h: Removed.
              * plugins/DOMMimeType.cpp: Use WTF::StringBuilder.
              * svg/SVGPathParserFactory.cpp: Ditto.
              * svg/SVGPathStringBuilder.cpp: SVGPathStringBuilder used stringBuilder.toString(ConcatAddingSpacesBetweenIndividualStrings), adapt to the change, that this mode is gone now.
              (WebCore::SVGPathStringBuilder::result): Just use toString(), append a space to the end of each command, when building the string. Remove the last trailing space before building the result.
              (WebCore::SVGPathStringBuilder::moveTo):
              (WebCore::SVGPathStringBuilder::lineTo):
              (WebCore::SVGPathStringBuilder::lineToHorizontal):
              (WebCore::SVGPathStringBuilder::lineToVertical):
              (WebCore::SVGPathStringBuilder::curveToCubic):
              (WebCore::SVGPathStringBuilder::curveToCubicSmooth):
              (WebCore::SVGPathStringBuilder::curveToQuadratic):
              (WebCore::SVGPathStringBuilder::curveToQuadraticSmooth):
              (WebCore::SVGPathStringBuilder::arcTo):
              (WebCore::SVGPathStringBuilder::closePath):
              * svg/SVGPathStringBuilder.h:
              (WebCore::SVGPathStringBuilder::cleanup): StringBuilder::clear() is gone, just cleanup by assigning StringBuilder().
              * websockets/WebSocket.cpp: Use WTF::StringBuilder.
              * websockets/WebSocketHandshake.cpp: Ditto (+ use append(const UChar) for single characters).
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dffa3cad
  20. 14 Sep, 2009 1 commit
    • mrowe@apple.com's avatar
      Add RenderWidgetProtector to simplify protecting a RenderWidget from... · 95331ba2
      mrowe@apple.com authored
      Add RenderWidgetProtector to simplify protecting a RenderWidget from destruction for the duration of a function.  Deploy it within RenderWidget.
      
      Reviewed by Dan Bernstein.
      
      * rendering/RenderWidget.cpp:
      (WebCore::RenderWidget::setWidgetGeometry):
      (WebCore::RenderWidget::updateWidgetPosition): Use a RefPtr rather than explicitly
      ref'ing and deref'ing the node.
      * rendering/RenderWidget.h:
      * rendering/RenderWidgetProtector.h:
      (WebCore::RenderWidgetProtector::RenderWidgetProtector):
      (WebCore::RenderWidgetProtector::~RenderWidgetProtector):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      95331ba2
  21. 15 Aug, 2009 1 commit
    • darin@apple.com's avatar
      Make DOM classes start with a reference count of 1, like all other RefCounted · 7e131b6d
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28068
      
      Patch by Darin Adler <darin@apple.com> on 2009-08-14
      Reviewed by Sam Weinig.
      
      First half, everything except for element classes.
      
      * GNUmakefile.am: Removed DocPtr.h.
      * WebCore.gypi: Ditto.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      
      * dom/Attr.cpp:
      (WebCore::Attr::Attr): Added a call to createTextChild here so callers don't
      have to call it explicitly.
      (WebCore::Attr::create): Added.
      (WebCore::Attr::setValue): Changed to take AtomicString.
      (WebCore::Attr::cloneNode): Use create.
      
      * dom/Attr.h: Added a create function. Made the constructor private,
      and a lot of other functions private as well.
      
      * dom/Attribute.cpp:
      (WebCore::Attribute::createAttrIfNeeded): Use Attr::create.
      
      * dom/CDATASection.cpp:
      (WebCore::CDATASection::create): Added.
      (WebCore::CDATASection::cloneNode): Use create.
      (WebCore::CDATASection::virtualCreate): Ditto.
      
      * dom/CDATASection.h: Added a create function. Made everything private.
      Removed unneeded destructor declaration.
      
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::CharacterData): Replaced the multiple constructors
      with a single one that takes ConstructionType.
      
      * dom/CharacterData.h: Made more functions be protected and private.
      Made m_data be private.
      
      * dom/Comment.cpp:
      (WebCore::Comment::Comment): Got rid of an extra constructor.
      (WebCore::Comment::create): Added.
      (WebCore::Comment::cloneNode): Call create.
      
      * dom/Comment.h: Added a create function. Made everything private.
      
      * dom/ContainerNode.cpp:
      (WebCore::dispatchChildInsertionEvents): Use RefPtr instead of DocPtr.
      (WebCore::dispatchChildRemovalEvents): Ditto.
      
      * dom/ContainerNode.h: Made the constructor protected and passed
      ConstructionType instead of an isElement boolean.
      
      * dom/DocPtr.h: Removed.
      
      * dom/Document.cpp:
      (WebCore::Document::Document): Simplified the code that sets m_document
      since it's no longer a smart pointer.
      (WebCore::Document::removedLastRef): Use explicit calls to selfOnlyRef
      and selfOnlyDeref instead of a DocPtr in here.
      (WebCore::Document::~Document): Simplified the code that sets m_document
      since it's no longer a smart pointer.
      (WebCore::Document::createDocumentFragment): Call create.
      (WebCore::Document::createTextNode): Ditto.
      (WebCore::Document::createComment): Ditto.
      (WebCore::Document::createCDATASection): Ditto.
      (WebCore::Document::createProcessingInstruction): Ditto.
      (WebCore::Document::createEntityReference): Ditto.
      (WebCore::Document::createEditingTextNode): Ditto.
      (WebCore::Document::importNode): Call Attr::create.
      (WebCore::Document::createAttributeNS): Ditto.
      
      * dom/Document.h: Call adoptRef. Made a lot of functions private and
      protected and sorted them so public functions come first.
      
      * dom/DocumentFragment.cpp:
      (WebCore::DocumentFragment::create): Added.
      (WebCore::DocumentFragment::cloneNode): Call create.
      * dom/DocumentFragment.h: Added create.
      
      * dom/DocumentType.cpp:
      (WebCore::DocumentType::DocumentType): Pass type to Node constructor.
      (WebCore::DocumentType::cloneNode): Use create.
      * dom/DocumentType.h:
      (WebCore::DocumentType::create): Call adoptRef.
      
      * dom/EditingText.cpp:
      (WebCore::EditingText::create): Added.
      * dom/EditingText.h: Added a create function. Made everything private.
      
      * dom/Element.cpp:
      (WebCore::Element::Element): Pass CreateElementZeroRefCount to preserve
      the zero reference count behavior for classes derived from Element.
      
      * dom/EntityReference.cpp:
      (WebCore::EntityReference::create): Added.
      (WebCore::EntityReference::cloneNode): Call create.
      * dom/EntityReference.h: Added create. Made everything private.
      
      * dom/Node.cpp:
      (WebCore::Node::initialRefCount): Added. Inline helper function for
      the constructor.
      (WebCore::Node::isContainer): Ditto.
      (WebCore::Node::isElement): Ditto.
      (WebCore::Node::isText): Ditto.
      (WebCore::Node::Node): Changed to take a construction type argument.
      Since m_document is now a normal pointer, added a call to selfOnlyRef.
      (WebCore::Node::~Node): Ditto, but selfOnlyDeref.
      (WebCore::Node::setDocument): Added selfOnlyRef/Deref calls.
      (WebCore::Node::appendTextContent): Use the data function instead of
      calling nodeValue functions, which do the same thing in a roundabout way.
      
      * dom/Node.h: Made the constructor protected and replaced the multiple
      arguments iwth a single ConstructionType argument. Sorted the public
      things first.
      
      * dom/Notation.h: Made most things private.
      * dom/Notation.cpp: Removed extra constructor.
      
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::create): Added.
      (WebCore::ProcessingInstruction::cloneNode): Call create.
      * dom/ProcessingInstruction.h: Added create function. Made many other
      members private.
      
      * dom/Range.cpp:
      (WebCore::Range::processContents): Use DocumentFragment::create.
      
      * dom/Text.cpp:
      (WebCore::Text::Text): Updated for base class change.
      (WebCore::Text::create): Added.
      (WebCore::Text::splitText): Changed to not require access to m_data.
      (WebCore::Text::cloneNode): Call create.
      (WebCore::Text::createRenderer): Call dataImpl.
      (WebCore::Text::attach): Call data.
      (WebCore::Text::recalcStyle): Call dataImpl.
      (WebCore::Text::virtualCreate): Call create.
      (WebCore::Text::createWithLengthLimit): Call create.
      (WebCore::Text::formatForDebugger): Call data.
      
      * dom/Text.h: Added a create function. Made many other members private.
      Renamed createNew to virtualCreate.
      
      * dom/XMLTokenizer.cpp:
      (WebCore::XMLTokenizer::enterText): Call Text::create.
      
      * dom/XMLTokenizerLibxml2.cpp:
      (WebCore::XMLTokenizer::cdataBlock): Call CDATASection::create.
      (WebCore::XMLTokenizer::comment): Call Comment::create.
      
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::deleteInsignificantText):
      Call data instead of string.
      
      * editing/CreateLinkCommand.cpp:
      (WebCore::CreateLinkCommand::doApply): Call Text::create.
      
      * editing/EditorCommand.cpp:
      (WebCore::executeInsertNode): Call DocumentFragment::create.
      
      * editing/SplitTextNodeCommand.cpp:
      (WebCore::SplitTextNodeCommand::doApply): Call Text::create.
      
      * editing/markup.cpp:
      (WebCore::appendStartMarkup): Call data instead of nodeValue.
      
      * html/HTMLDocument.h:
      (WebCore::HTMLDocument::create): Call adoptRef.
      
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::createContextualFragment): Call DocumentFragment::create.
      (WebCore::replaceChildrenWithFragment): Call data instead of string.
      (WebCore::replaceChildrenWithText): Call Text::create.
      (WebCore::HTMLElement::setInnerText): Call DocumentFragment::create and
      Text::create.
      (WebCore::HTMLElement::setOuterText): Call Text::create.
      
      * html/HTMLKeygenElement.cpp:
      (WebCore::HTMLKeygenElement::HTMLKeygenElement): Call Text::create.
      
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::setText): Call Text::create.
      
      * html/HTMLParser.cpp:
      (WebCore::HTMLParser::textCreateErrorCheck): Call Text::create.
      (WebCore::HTMLParser::commentCreateErrorCheck): Call Comment::create.
      (WebCore::HTMLParser::handleIsindex): Call Text::create.
      
      * html/HTMLViewSourceDocument.cpp:
      (WebCore::HTMLViewSourceDocument::addText): Call Text::create.
      
      * html/HTMLViewSourceDocument.h:
      (WebCore::HTMLViewSourceDocument::create): Call adoptRef.
      
      * loader/FTPDirectoryDocument.cpp:
      (WebCore::FTPDirectoryTokenizer::appendEntry): Call Text::create.
      (WebCore::FTPDirectoryTokenizer::createTDForFilename): Call Text::create.
      
      * loader/FTPDirectoryDocument.h:
      (WebCore::FTPDirectoryDocument::create): Call adoptRef.
      * loader/ImageDocument.h:
      (WebCore::ImageDocument::create): Ditto.
      * loader/MediaDocument.h:
      (WebCore::MediaDocument::create): Ditto.
      * loader/PlaceholderDocument.h:
      (WebCore::PlaceholderDocument::create): Ditto.
      * loader/PluginDocument.h:
      (WebCore::PluginDocument::create): Ditto.
      * loader/TextDocument.h:
      (WebCore::TextDocument::create): Ditto.
      
      * loader/loader.cpp:
      (WebCore::Loader::Host::didFinishLoading): Use RefPtr instead of DocPtr.
      (WebCore::Loader::Host::didFail): Ditto.
      
      * platform/TreeShared.h:
      (WebCore::TreeShared::TreeShared): Added an initialRefCount argument,
      defaulting to 1. Node still sometimes initializes it to 0 instead for now.
      
      * rendering/RenderText.cpp:
      (WebCore::RenderText::originalText): Use dataImpl instead of string.
      
      * rendering/RenderTextFragment.cpp:
      (WebCore::RenderTextFragment::originalText): Use dataImpl instead of string.
      (WebCore::RenderTextFragment::previousCharacter): Ditto.
      
      * svg/SVGDocument.h:
      (WebCore::SVGDocument::create): Use adoptRef.
      
      * svg/SVGElementInstance.cpp:
      (WebCore::SVGElementInstance::SVGElementInstance): Updated to take a
      PassRefPtr.
      
      * svg/SVGElementInstance.h: Made everything private.
      
      * wml/WMLDocument.h:
      (WebCore::WMLDocument::create): Called adoptRef.
      
      * xml/XPathNamespace.cpp:
      (WebCore::XPathNamespace::XPathNamespace): Take AtomicString arguments.
      * xml/XPathNamespace.h: Made everything private.
      
      * xml/XSLTProcessor.cpp:
      (WebCore::createFragmentFromSource): Use DocumentFragment::create and
      Text::create.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e131b6d
  22. 20 Jul, 2009 1 commit
    • mitz@apple.com's avatar
      WebCore: · ab752611
      mitz@apple.com authored
              Reviewed by Anders Carlsson.
      
              When loading a custom view into a frame, the old document is still
              around
              <rdar://problem/5145841>
      
              Safari fires onload before PDF is loaded into the browser
              <rdar://problem/6618869>
      
              Test: fast/loader/non-html-load-event.html
      
              * GNUmakefile.am: Added PlaceholderDocument.{cpp,h}
              * WebCore.gypi: Ditto.
              * WebCore.pro: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * WebCoreSources.bkl: Ditto.
              * dom/Document.h:
              (WebCore::Document::setStyleSelector): Added this protected accessor for
                  PlaceholderDocument to use.
              * dom/Element.cpp:
              (WebCore::Element::clientWidth): Check whether the document has a
                  renderer.
              (WebCore::Element::clientHeight): Ditto.
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::begin): Create a PlaceholderDocument for frames
                  that do not use an HTML view. Do not nullify the content size in
                  that case.
              (WebCore::FrameLoader::transitionToCommitted): For frames that do not
                  use an HTML view, call receivedFirstData(), which sets up the
                  frame with a new PlaceHolderDocument.
              * loader/PlaceholderDocument.cpp: Added.
              (WebCore::PlaceholderDocument::attach): Sets up the style selector but
                  does not create a RenderView.
              * loader/PlaceholderDocument.h: Added.
              (WebCore::PlaceholderDocument::create):
              (WebCore::PlaceholderDocument::PlaceholderDocument):
      
      LayoutTests:
      
              Reviewed by Anders Carlsson.
      
              Safari fires onload before PDF is loaded into the browser
              <rdar://problem/6618869>
      
              * fast/loader/non-html-load-event-expected.txt: Added.
              * fast/loader/non-html-load-event.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ab752611
  23. 29 Jun, 2009 1 commit
    • weinig@apple.com's avatar
      WebCore: · 6ebc8efe
      weinig@apple.com authored
      2009-06-29  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Dave Hyatt.
      
              Remove initialize method from DataGridDataSource and add
              DOMDataGridDataSource.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSDataGridDataSource.cpp:
              * bindings/js/JSDataGridDataSource.h:
              * bindings/js/JSHTMLDataGridElementCustom.cpp:
              (WebCore::JSHTMLDataGridElement::setDataSource):
              * html/DOMDataGridDataSource.cpp: Added.
              (WebCore::DOMDataGridDataSource::DOMDataGridDataSource):
              (WebCore::DOMDataGridDataSource::~DOMDataGridDataSource):
              * html/DOMDataGridDataSource.h: Added.
              (WebCore::DOMDataGridDataSource::create):
              (WebCore::DOMDataGridDataSource::isDOMDataGridDataSource):
              (WebCore::asDOMDataGridDataSource):
              * html/DataGridDataSource.h:
              (WebCore::DataGridDataSource::isDOMDataGridDataSource):
              (WebCore::DataGridDataSource::isJSDataGridDataSource):
              * html/HTMLDataGridElement.cpp:
              (WebCore::HTMLDataGridElement::HTMLDataGridElement):
              (WebCore::HTMLDataGridElement::setDataSource):
              (WebCore::HTMLDataGridElement::dataSource):
              * html/HTMLDataGridElement.h:
      
      LayoutTests:
      
      2009-06-29  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Dave Hyatt.
      
              Update for the change in DataGridDataSource API.
      
              * fast/dom/HTMLDataGridElement/DataGridDataSource-basic-expected.txt:
              * fast/dom/HTMLDataGridElement/DataGridDataSource-basic.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6ebc8efe
  24. 18 May, 2009 1 commit
  25. 09 Nov, 2008 1 commit
    • ddkilzer@apple.com's avatar
      BUILD FIX: Qt build broke after r38235. · 8d878632
      ddkilzer@apple.com authored
              Added HAVE(ACCESSIBILITY) header guards to platform implementation
              source files.
      
              * page/gtk/AccessibilityObjectAtk.cpp: Added HAVE(ACCESSIBILITY)
              guards.
              * page/gtk/AccessibilityObjectWrapperAtk.cpp: Ditto.
              * page/qt/AccessibilityObjectQt.cpp: Ditto.
              * page/win/AccessibilityObjectWin.cpp: Ditto.
              * page/wx/AccessibilityObjectWx.cpp: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8d878632
  26. 26 Aug, 2008 1 commit
  27. 22 May, 2008 1 commit
    • andersca@apple.com's avatar
      ..: · 9541a22e
      andersca@apple.com authored
      2008-05-21  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Maciej.
      
              Add WebIconFetcher files.
              
              * WebKit.xcodeproj/project.pbxproj:
      
      ../mac:
      
      2008-05-21  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Maciej.
      
              Add WebIconFetcher.
              
              * Misc/WebIconFetcher.h: Added.
              * Misc/WebIconFetcher.mm: Added.
              (WebIconFetcherClient::WebIconFetcherClient):
              (WebIconFetcherClient::finishedFetchingIcon):
              (WebIconFetcherClient::setFetcher):
              (-[WebIconFetcher init]):
              (-[WebIconFetcher dealloc]):
              (-[WebIconFetcher finalize]):
              (-[WebIconFetcher cancel]):
              (-[WebIconFetcher _initWithIconFetcher:client:]):
              (+[WebIconFetcher _fetchApplicationIconForFrame:target:selector:]):
              * Misc/WebIconFetcherInternal.h: Added.
              * WebView/WebFrame.mm:
              (-[WebFrame fetchApplicationIcon:selector:]):
              * WebView/WebFramePrivate.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9541a22e
  28. 21 May, 2008 1 commit
  29. 23 Feb, 2008 1 commit
    • ddkilzer@apple.com's avatar
      WebCore: · 267da135
      ddkilzer@apple.com authored
              Please clarify licensing for some files
              <http://bugs.webkit.org/show_bug.cgi?id=14970>
      
              Reviewed by Darin.
      
              * bindings/objc/WebScriptObject.h: Added Apple BSD-style license.
              * bindings/objc/WebScriptObjectPrivate.h: Ditto.
              * platform/text/mac/ShapeArabic.c: Added ICU license from WebCore/icu/LICENSE.
      
      WebKit/mac:
      
              Please clarify licensing for some files
              <http://bugs.webkit.org/show_bug.cgi?id=14970>
      
              Reviewed by Darin.
      
              * Plugins/WebNetscapeDeprecatedFunctions.c: Updated copyright statement
              and added Apple BSD-style license.
              * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
      
      WebKitTools:
      
              Please clarify licensing for some files
              <http://bugs.webkit.org/show_bug.cgi?id=14970>
      
              Reviewed by Darin.
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp: Added
              copyright statement.  Replaced license with newer Apple BSD-style license.
              * DumpRenderTree/Te...
      267da135
  30. 30 Mar, 2007 2 commits
    • andersca's avatar
      Reviewed by Geoff. · b5e193f8
      andersca authored
              * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c:
              (testAllocate):
              (testEnumerate):
              Add casts.
              
              * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h:
              Don't use #import, use #include.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5e193f8
    • andersca's avatar
      JavaScriptCore: · 77d5e0d0
      andersca authored
              Reviewed by Geoff.
      
              Implement _NPN_Enumerate support.
              
              * JavaScriptCore.exp:
              * bindings/NP_jsobject.cpp:
              (_NPN_Enumerate):
              * bindings/c/c_instance.cpp:
              (KJS::Bindings::CInstance::getPropertyNames):
              * bindings/c/c_instance.h:
              * bindings/npapi.h:
              * bindings/npruntime.h:
              * bindings/npruntime_impl.h:
              * bindings/runtime.h:
              (KJS::Bindings::Instance::getPropertyNames):
              * bindings/runtime_object.cpp:
              (RuntimeObjectImp::getPropertyNames):
              * bindings/runtime_object.h:
              (KJS::RuntimeObjectImp::getInternalInstance):
      
      LayoutTests:
      
              Reviewed by Geoff.
      
              Add enumeration test.
              
              * plugins/netscape-enumerate-expected.txt: Added.
              * plugins/netscape-enumerate.html: Added.
      
      WebKit:
      
              Reviewed by Geoff.
      
              * Plugins/WebNetscapePluginPackage.m:
              (-[WebNetscapePluginPackage load]):
              Initialize pushpopupsenabledstate, poppopupsenabledstate and enumerate.
              
              * Plugins/npapi.m:
              (NPN_PushPopupsEnabledState):
              (NPN_PopPopupsEnabledState):
              Add stubs for these functions.
              
              * Plugins/npfunctions.h:
              Add new methods to NPNetscapeFuncs.
      
      WebKitTools:
      
              Reviewed by Geoff.
      
              * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
              Add TestObject.c and TestObject.h
              
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              (pluginGetProperty):
              Implement the testObject property.
              
              (pluginInvoke):
              Implement testEnumerate which takes an object and an array and enumerates
              the properties of the object and adds them to the array.
              
              (pluginAllocate):
              Allocate the test object.
              
              (pluginDeallocate):
              Free the test object.
              
              * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c: Added.
              * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h: Added.
              Add a test object with two enumerable properties.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      77d5e0d0
  31. 29 Mar, 2007 1 commit
    • ggaren's avatar
      LayoutTests: · 2663f9a7
      ggaren authored
              Reviewed by Beth Dakin.
              
              Layout test for <rdar://problem/5091330> REGRESSION: Repro crash in 
              -[WebBaseNetscapePluginView(WebNPPCallbacks) destroyStream:reason:] 
              navigating away from page with DivX movie plug-in (13203)
      
              * plugins/destroy-stream-twice-expected.txt: Added.
              * plugins/destroy-stream-twice.html: Added.
      
      WebKit:
      
              Reviewed by Beth Dakin, reviewed by Maciej Stachowiak.
              
              Layout test for <rdar://problem/5091330> REGRESSION: Repro crash in 
              -[WebBaseNetscapePluginView(WebNPPCallbacks) destroyStream:reason:] 
              navigating away from page with DivX movie plug-in (13203)
              
              Changed LOG_ERROR to LOG so the layout test doesn't produce console spew
              every time you run it.
      
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView destroyStream:reason:]):
      
      WebKitTools:
      
              Reviewed by Beth Dakin.
              
              Layout test for <rdar://problem/5091330> REGRESSION: Repro crash in 
              -[WebBaseNetscapePluginView(WebNPPCallbacks) destroyStream:reason:] 
              navigating away from page with DivX movie plug-in (13203)
              
              Added hasStream property and destroyStream function, used by layout test.
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              (pluginGetProperty):
              (pluginInvoke):
              (pluginAllocate):
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
              (NPP_NewStream):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2663f9a7
  32. 05 Mar, 2007 1 commit
    • andersca's avatar
      LayoutTests: · 526c36f0
      andersca authored
              Reviewed by Adam, Darin.
      
              <rdar://problem/5025212>
              In Mail, a crash occurs at WebCore::Frame::tree() when clicking on embedded flash object
      
              * plugins/get-url-with-blank-target-expected.txt: Added.
              * plugins/get-url-with-blank-target.html: Added.
      
      WebKit:
      
              Reviewed by Adam, Darin.
       
              <rdar://problem/5025212>
              In Mail, a crash occurs at WebCore::Frame::tree() when clicking on embedded flash object
      
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView loadPluginRequest:]):
              Handle the case where the web view returned from the delegate method is null. Also, send out an error notification
              in that case so we can catch it.
      
      WebKitTools:
      
              Reviewed by Adam, Darin.
      
              <rdar://problem/5025212>
              In Mail, a crash occurs at WebCore::Frame::tree() when clicking on embedded flash object
              
              Add a "getURLNotify" method to the plugin object. This lets you pass a URL, a target and a callback function
              to be run when the URL has finished (or failed) loading.
              
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              (pluginInvoke):
              (handleCallback):
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
              (NPP_URLNotify):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      526c36f0
  33. 06 Nov, 2006 1 commit
    • ap's avatar
      Reviewed by Maciej. · fdfb9d6f
      ap authored
              http://bugs.webkit.org/show_bug.cgi?id=11517
              REGRESSION: Flash clicks/interactivity not working properly
      
      WebCore:
              * bridge/mac/FrameMac.mm:
              (WebCore::FrameMac::handleMouseMoveEvent):
              (WebCore::FrameMac::handleMouseReleaseEvent):
              Restore parts of event dispatching that were removed when fixing
              bug 7323 - just bypass those for subframes.
      
      WebKitTools:
              Teach TestNetscapePlugin to log events passed to it. To enable, set eventLoggingEnabled to true:
      
              <embed name="plg" type="application/x-webkit-test-netscape" width=100 height=100></embed>
              <script>
                  plg.eventLoggingEnabled = true;
                  // use eventSender to simulate events...
              </script>
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              (pluginGetProperty):
              (pluginSetProperty):
              (pluginAllocate):
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
              (NPP_HandleEvent):
      
      LayoutTests:
              * plugins/mouse-events-expected.txt: Added.
              * plugins/mouse-events.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fdfb9d6f
  34. 09 Mar, 2006 1 commit
    • darin's avatar
      Reviewed by John Sullivan. · 24fbf130
      darin authored
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7681
                memory leak in the plug-in tests
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
              (NPP_Destroy): Added code to release the plug-in object. This is the leak fix.
              (NPP_SetWindow): Remove unneeded code to store the window pointer.
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              Moved the browser global in here since it's declared in this file's header.
              Changed the code to set up the pluginClass structure to not use function
              pointer casts. Those are dangerous because they can hide many types of mismatch.
              And indeed when I did this I discovered that many functions were missing their
              boolean return values or had parameter declarations with the wrong types.
              (pluginGetProperty): Use STRINGZ_TO_NPVARIANT macro for greater simplicity and
              clarity. Added boolean return value: return true when successful and false when not.
              (pluginSetProperty): Added boolean return value, return false since we have no
              properties we can set.
              (pluginInvoke): Added boolean return value. Return true when successful and false
              when not. Use NPVARIANT macros where appropriate. Added a missing release for the
              return value from calling the browser. Changed code to put the strings in malloc
              buffers instead of relying on GCC's extension that allows variable-sized arrays
              on the stack.
              (pluginInvokeDefault): Added boolean return value, return false since we have no
              default function to call.
              (pluginInvalidate): Added missing parameter. Removed comment.
              (pluginAllocate): Removed unneeded cast. This is C code, not C++, so you don't have
              to cast the result of malloc.
              (pluginDeallocate): Removed uneeded cast.
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: Removed some unneeded
              includes. Changed our PluginObject to use NPObject instead of re-declaring fields
              that match NPObject's fields. Removed unused NPWindow pointer.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24fbf130
  35. 05 Jan, 2006 1 commit
    • ggaren's avatar
      LayoutTests: · 7dd73f87
      ggaren authored
              Layout test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6318
              REGRESSION: Repro crash in JS called from Flash on bdash.net.nz
      
              * fast/plugins/netscape-back-forward-expected.txt: Added.
              * fast/plugins/netscape-back-forward.html: Added.
              * fast/plugins/resources/go-back.html: Added.
      
      WebKit:
      
              Reviewed by Darin.
      
              - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6361
              Add plugin support to DumpRenderTree
      
              * WebKit.exp: export WebPluginDatabase class, which DumpRenderTree
              needs to add plugins to the runtime.
      
      WebKitTools:
      
              Reviewed by darin.
      
              - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6361
              Add plugin support to DumpRenderTree
      
              Also wrote first test plugin.
      
              * DumpRenderTree/DumpRenderTree.m:
              (main):
              (1) Put the WebView in an invisible window, because PlugIns are
              optimized not to load if there's no parent window.
              (2) Tell WebKit to load any PlugIns in the directory from which we
              loaded. This means we can build nasty PlugIns alongside DumpRenderTree
              and they'll load automagically during layout testing, but they won't be
              added to the user's system, hosing apps like Safari.
      
              * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added new
              test PlugIn to project.
      
              PlugIn added to project:
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/Info.plist: Added.
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c: Added.
              (getPluginClass):
              (initializeIdentifiers):
              (pluginHasProperty):
              (pluginHasMethod):
              (pluginGetProperty):
              (pluginSetProperty):
              (pluginInvoke):
              (pluginInvokeDefault):
              (pluginInvalidate):
              (pluginAllocate):
              (pluginDeallocate):
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: Added.
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c: Added.
              (NP_Initialize):
              (NP_GetEntryPoints):
              (NP_Shutdown):
              (NPP_New):
              (NPP_Destroy):
              (NPP_SetWindow):
              (NPP_NewStream):
              (NPP_DestroyStream):
              (NPP_WriteReady):
              (NPP_Write):
              (NPP_StreamAsFile):
              (NPP_Print):
              (NPP_HandleEvent):
              (NPP_URLNotify):
              (NPP_GetValue):
              (NPP_SetValue):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7dd73f87