haikuwebkit/Source/WTF/wtf/SimpleStats.h

114 lines
3.1 KiB
C
Raw Permalink Normal View History

JIT heuristics should be hyperbolic https://bugs.webkit.org/show_bug.cgi?id=80055 <rdar://problem/10922260> Source/JavaScriptCore: Reviewed by Oliver Hunt. Added tracking of the amount of executable memory typically used for a bytecode instruction. Modified the execution counter scheme to use this, and the amount of free memory, to determine how long to wait before invoking the JIT. The result is that even if we bomb the VM with more code than can fit in our executable memory pool, we still keep running and almost never run out of executable memory - which ensures that if we have to JIT something critical, then we'll likely have enough memory to do so. This also does not regress performance on the three main benchmarks. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::predictedMachineCodeSize): (JSC): (JSC::CodeBlock::usesOpcode): * bytecode/CodeBlock.h: (CodeBlock): (JSC::CodeBlock::checkIfJITThresholdReached): (JSC::CodeBlock::dontJITAnytimeSoon): (JSC::CodeBlock::jitAfterWarmUp): (JSC::CodeBlock::jitSoon): (JSC::CodeBlock::llintExecuteCounter): (JSC::CodeBlock::counterValueForOptimizeAfterWarmUp): (JSC::CodeBlock::counterValueForOptimizeAfterLongWarmUp): (JSC::CodeBlock::addressOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): (JSC::CodeBlock::offsetOfJITExecutionTotalCount): (JSC::CodeBlock::jitExecuteCounter): (JSC::CodeBlock::checkIfOptimizationThresholdReached): (JSC::CodeBlock::optimizeNextInvocation): (JSC::CodeBlock::dontOptimizeAnytimeSoon): (JSC::CodeBlock::optimizeAfterWarmUp): (JSC::CodeBlock::optimizeAfterLongWarmUp): (JSC::CodeBlock::optimizeSoon): * bytecode/ExecutionCounter.cpp: Added. (JSC): (JSC::ExecutionCounter::ExecutionCounter): (JSC::ExecutionCounter::checkIfThresholdCrossedAndSet): (JSC::ExecutionCounter::setNewThreshold): (JSC::ExecutionCounter::deferIndefinitely): (JSC::ExecutionCounter::applyMemoryUsageHeuristics): (JSC::ExecutionCounter::applyMemoryUsageHeuristicsAndConvertToInt): (JSC::ExecutionCounter::hasCrossedThreshold): (JSC::ExecutionCounter::setThreshold): (JSC::ExecutionCounter::reset): * bytecode/ExecutionCounter.h: Added. (JSC): (ExecutionCounter): (JSC::ExecutionCounter::formattedTotalCount): * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * jit/ExecutableAllocator.cpp: (JSC::DemandExecutableAllocator::allocateNewSpace): (JSC::ExecutableAllocator::underMemoryPressure): (JSC): (JSC::ExecutableAllocator::memoryPressureMultiplier): * jit/ExecutableAllocator.h: * jit/ExecutableAllocatorFixedVMPool.cpp: (JSC::ExecutableAllocator::memoryPressureMultiplier): (JSC): * jit/JIT.cpp: (JSC::JIT::privateCompile): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * llint/LLIntSlowPaths.cpp: (JSC::LLInt::jitCompileAndSetHeuristics): * llint/LowLevelInterpreter32_64.asm: * runtime/JSGlobalData.h: (JSGlobalData): * runtime/Options.cpp: (Options): (JSC::Options::initializeOptions): * runtime/Options.h: (Options): * wtf/SimpleStats.h: Added. (WTF): (SimpleStats): (WTF::SimpleStats::SimpleStats): (WTF::SimpleStats::add): (WTF::SimpleStats::operator!): (WTF::SimpleStats::count): (WTF::SimpleStats::sum): (WTF::SimpleStats::sumOfSquares): (WTF::SimpleStats::mean): (WTF::SimpleStats::variance): (WTF::SimpleStats::standardDeviation): Source/WebCore: Reviewed by Oliver Hunt. No new tests, since there's no new functionality. * ForwardingHeaders/wtf/SimpleStats.h: Added. Canonical link: https://commits.webkit.org/97373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-05 06:52:44 +00:00
/*
Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression https://bugs.webkit.org/show_bug.cgi?id=160125 Reviewed by Geoffrey Garen and Keith Miller. JSTests: Most of the things I did properly covered by existing tests, but I found some simple cases of unshifting that had sketchy coverage. * stress/array-storage-array-unshift.js: Added. * stress/contiguous-array-unshift.js: Added. * stress/double-array-unshift.js: Added. * stress/int32-array-unshift.js: Added. Source/bmalloc: I needed to tryMemalign, so I added such a thing. * bmalloc/Allocator.cpp: (bmalloc::Allocator::allocate): (bmalloc::Allocator::tryAllocate): (bmalloc::Allocator::allocateImpl): * bmalloc/Allocator.h: * bmalloc/Cache.h: (bmalloc::Cache::tryAllocate): * bmalloc/bmalloc.h: (bmalloc::api::tryMemalign): Source/JavaScriptCore: In order to make the GC concurrent (bug 149432), we would either need to enable concurrent copying or we would need to not copy. Concurrent copying carries a 1-2% throughput overhead from the barriers alone. Considering that MarkedSpace does a decent job of avoiding fragmentation, it's unlikely that it's worth paying 1-2% throughput for copying. So, we want to get rid of copied space. This change moves copied space's biggest client over to marked space. Moving butterflies to marked space means having them use the new Auxiliary HeapCell allocation path. This is a fairly mechanical change, but it caused performance regressions everywhere, so this change also fixes MarkedSpace's performance issues. At a high level the mechanical changes are: - We use AuxiliaryBarrier instead of CopyBarrier. - We use tryAllocateAuxiliary instead of tryAllocateStorage. I got rid of the silly CheckedBoolean stuff, since it's so much more trouble than it's worth. - The JITs have to emit inlined marked space allocations instead of inline copy space allocations. - Everyone has to get used to zeroing their butterflies after allocation instead of relying on them being pre-zeroed by the GC. Copied space would zero things for you, while marked space doesn't. That's about 1/3 of this change. But this led to performance problems, which I fixed with optimizations that amounted to a major MarkedSpace rewrite: - MarkedSpace always causes internal fragmentation for array allocations because the vector length we choose when we resize usually leads to a cell size that doesn't correspond to any size class. I got around this by making array allocations usually round up vectorLength to the maximum allowed by the size class that we would have allocated in. Also, ensureLengthSlow() and friends first make sure that the requested length can't just be fulfilled with the current allocation size. This safeguard means that not every array allocation has to do size class queries. For example, the fast path of new Array(length) never does any size class queries, under the assumption that (1) the speed gained from avoiding an ensureLengthSlow() call, which then just changes the vectorLength by doing the size class query, is too small to offset the speed lost by doing the query on every allocation and (2) new Array(length) is a pretty good hint that resizing is not very likely. - Size classes in MarkedSpace were way too precise, which led to external fragmentation. This changes MarkedSpace size classes to use a linear progression for very small sizes followed by a geometric progression that naturally transitions to a hyperbolic progression. We want hyperbolic sizes when we get close to blockSize: for example the largest size we want is payloadSize / 2 rounded down, to ensure we get exactly two cells with minimal slop. The next size down should be payloadSize / 3 rounded down, and so on. After the last precise size (80 bytes), we proceed using a geometric progression, but round up each size to minimize slop at the end of the block. This naturally causes the geometric progression to turn hyperbolic for large sizes. The size class configuration happens at VM start-up, so it can be controlled with runtime options. I found that a base of 1.4 works pretty well. - Large allocations caused massive internal fragmentation, since the smallest large allocation had to use exactly blockSize, and the largest small allocation used blockSize / 2. The next size up - the first large allocation size to require two blocks - also had 50% internal fragmentation. This is because we required large allocations to be blockSize aligned, so that MarkedBlock::blockFor() would work. I decided to rewrite all of that. Cells no longer have to be owned by a MarkedBlock. They can now alternatively be owned by a LargeAllocation. These two things are abstracted as CellContainer. You know that a cell is owned by a LargeAllocation if the MarkedBlock::atomSize / 2 bit is set. Basically, large allocations are deliberately misaligned by 8 bytes. This actually works out great since (1) typed arrays won't use large allocations anyway since they have their own malloc fallback and (2) large array butterflies already have a 8 byte header, which means that the 8 byte base misalignment aligns the large array payload on a 16 byte boundary. I took extreme care to make sure that the isLargeAllocation bit checks are as rare as possible; for example, ExecState::vm() skips the check because we know that callees must be small allocations. It's also possible to use template tricks to do one check for cell container kind, and then invoke a function specialized for MarkedBlock or a function specialized for LargeAllocation. LargeAllocation includes stubs for all MarkedBlock methods that get used from functions that are template-specialized like this. That's mostly to speed up the GC marking code. Most other code can use CellContainer API or HeapCell API directly. That's another thing: HeapCell, the common base of JSCell and auxiliary allocations, is now smart enough to do a lot of things for you, like HeapCell::vm(), HeapCell::heap(), HeapCell::isLargeAllocation(), and HeapCell::cellContainer(). The size cutoff for large allocations is runtime-configurable, so long as you don't choose something so small that callees end up large. I found that 400 bytes is roughly optimal. This means that the MarkedBlock size classes end up being: 16, 32, 48, 64, 80, 112, 160, 224, 320 The next size class would have been 432, but that's above the 400 byte cutoff. All of this is configurable with --sizeClassProgression and --largeAllocationCutoff. You can see what size classes you end up with by doing --dumpSizeClasses=true. - Copied space uses 64KB blocks, while marked space used to use 16KB blocks. Allocating a lot of stuff in 16KB blocks was slower than allocating it in 64KB blocks because the GC had a lot of per-block overhead. I removed this overhead: It's now 2x faster to scan all MarkedBlocks because the list that contains the interesting meta-data is allocated on the side, for better locality during a sequential walk. It's no longer necessary to scan MarkedBlocks to find WeakSets, since the sets of WeakSets for eden scan and full scan are maintained on-the-fly. It's no longer necessary to scan all MarkedBlocks to clear mark bits because we now use versioned mark bits: to clear then, just increment the 64-bit heap version. It's no longer necessary to scan retired MarkedBlocks while allocating because marking retires them on-the-fly. It's no longer necessary to sort all blocks in the IncrementalSweeper's snapshot because blocks now know if they are in the snapshot. Put together, these optimizations allowed me to reduce block size to 16KB without losing much performance. There is some small perf loss on JetStream/splay, but not enough to hurt JetStream overall. I tried reducing block sizes further, to 4KB, since that is a progression on membuster. That's not possible yet, since there is still enough per-block overhead yet that such a reduction hurts JetStream too much. I filed a bug about improving this further: https://bugs.webkit.org/show_bug.cgi?id=161581. - Even after all of that, copying butterflies was still faster because it allowed us to skip sweeping dead space. A good GC allocates over dead bytes without explicitly freeing them, so the GC pause is O(size of live), not O(size of live + dead). O(dead) is usually much larger than O(live), especially in an eden collection. Copying satisfies this premise while mark+sweep does not. So, I invented a new kind of allocator: bump'n'pop. Previously, our MarkedSpace allocator was a freelist pop. That's simple and easy to inline but requires that we walk the block to build a free list. This means walking dead space. The new allocator allows totally free MarkedBlocks to simply set up a bump-pointer arena instead. The allocator is a hybrid of bump-pointer and freelist pop. It tries bump first. The bump pointer always bumps by cellSize, so the result of filling a block with bumping looks as if we had used freelist popping to fill it. Additionally, each MarkedBlock now has a bit to quickly tell if the block is entirely free. This makes sweeping O(1) whenever a MarkedBlock is completely empty, which is the common case because of the generational hypothesis: the number of objects that survive an eden collection is a tiny fraction of the number of objects that had been allocated, and this fraction is so small that there are typically fewer than one survivors per MarkedBlock. This change was enough to make this change a net win over tip-of-tree. - FTL now shares the same allocation fast paths as everything else, which is great, because bump'n'pop has gnarly control flow. We don't really want B3 to have to think about that control flow, since it won't be able to improve the machine code we write ourselves. GC fast paths are best written in assembly. So, I've empowered B3 to have even better support for Patchpoint terminals. It's now totally fine for a Patchpoint terminal to be non-Void. So, the new FTL allocation fast paths are just Patchpoint terminals that call through to AssemblyHelpers::emitAllocate(). B3 still reasons about things like constant-folding the size class calculation and constant-hoisting the allocator. Also, I gave the FTL the ability to constant-fold some allocator logic (in case we first assume that we're doing a variable-length allocation but then realize that the length is known). I think it makes sense to have constant folding rules in FTL::Output, or whatever the B3 IR builder is, since this makes lowering easier (you can constant fold during lowering more easily) and it reduces the amount of malloc traffic. In the future, we could teach B3 how to better constant-fold this code. That would require allowing loads to be constant-folded, which is doable but hella tricky. - It used to be that if a logical object allocation required two physical allocations (first the butterfly and then the cell), then the JIT would emit the code in such a way that a failure in the second fast path would cause us to forget the successful first physical allocation. This was pointlessly wasteful. It turns out that it's very cheap to devote a register to storing either the butterfly or null, because the butterfly register is anyway going to be free inside the first allocation. The only overhead here is zeroing the butterfly register. With that in place, we can just pass the butterfly-or-null to the slow path, which can then either allocate a butterfly or not. So now we never waste a successful allocation. This patch implements such a solution both in DFG (where it's easy to do this since we control registers already) and in FTL (where it's annoying, because mutable "butterfly-or-null" variables are hard to say in SSA; also I realized that we had code duplicated the JSArray allocation utility, so I deduplicated it). This came up because in one version of this patch, this wastage would resonate with some Kraken benchmark: the benchmark would always allocate N small things followed by one bigger thing. The problem was I accidentally adjusted the various fixed overheads in MarkedBlock in such a way that the JSObject size class, which both the small and big thing shared for their cell, could hold exactly N cells per MarkedBlock. Then the benchmark would always call slow path when it allocated the big thing. So, it would end up having to allocate the big thing's large butterfly twice, every single time! Ouch! - It used to be that we zeroed CopiedBlocks using memset, and so array allocations enjoyed amortization of the cost of zeroing. This doesn't work anymore - it's now up to the client of the allocator to initialize the object to whatever state they need. It used to be that we would just use a dumb loop. I initially changed this so that we would end up in memset for large allocations, but this didn't actually help performance that much. I got a much better result by playing with different memsets written in assembly. First I wrote one using non-temporal stores. That was a small speed-up over memset. Then I tried the classic "rep stos" approach, and holy cow that version was fast. It's a ~20% speed-up on array allocation microbenchmarks. So, this patch adds code paths to do "rep stos" on x86_64, or memset, or use a loop, as appropriate, for both "contiguous" arrays (holes are zero) and double arrays (holes are PNaN). Note that the JIT always emits either a loop or a flat slab of stores (if the size is known), but those paths in the JIT won't trigger for NewArrayWithSize() if the size is large, since that takes us to the operationNewArrayWithSize() slow path, which calls into JSArray::create(). That's why the optimizations here are all in JSArray::create() - that's the hot place for large arrays that need to be filled with holes. All of this put together gives us neutral perf on JetStream, membuster, and PLT3, a ~1% regression on Speedometer, and up to a 4% regression Kraken. The Kraken regression is because Kraken was allocating exactly 1024 element arrays at a rate of 400MB/sec. This is a best-case scenario for bump allocation. I think that we should fix bmalloc to make up the difference, but take the hit for now because it's a crazy corner case. By comparison, the alternative approach of using a copy barrier would have cost us 1-2%. That's the real apples-to-apples comparison if your premise is that we should have a concurrent GC. After we finish removing copied space, we will be barrier-ready for concurrent GC: we already have a marking barrier and we simply won't need a copying barrier. This change gets us there for the purposes of our benchmarks, since the remaining clients of copied space are not very important. On the other hand, if we keep copying, then getting barrier-ready would mean adding back the copy barrier, which costs more perf. We might get bigger speed-ups once we remove CopiedSpace altogether. That requires moving typed arrays and a few other weird things over to Aux MarkedSpace. This also includes some header sanitization. The introduction of AuxiliaryBarrier, HeapCell, and CellContainer meant that I had to include those files from everywhere. Fortunately, just including JSCInlines.h (instead of manually including the files that includes) is usually enough. So, I made most of JSC's cpp files include JSCInlines.h, which is something that we were already basically doing. In places where JSCInlines.h would be too much, I just included HeapInlines.h. This got weird, because we previously included HeapInlines.h from JSObject.h. That's bad because it led to some circular dependencies, so I fixed it - but that meant having to manually include HeapInlines.h from the places that previously got it implicitly via JSObject.h. But that led to more problems for some reason: I started getting build errors because non-JSC files were having trouble including Opcode.h. That's just silly, since Opcode.h is meant to be an internal JSC header. So, I made it an internal header and made it impossible to include it from outside JSC. This was a lot of work, but it was necessary to get the patch to build on all ports. It's also a net win. There were many places in WebCore that were transitively including a *ton* of JSC headers just because of the JSObject.h->HeapInlines.h edge and a bunch of dependency edges that arose from some public (for WebCore) JSC headers needing Interpreter.h or Opcode.h for bad reasons. * API/JSManagedValue.mm: (-[JSManagedValue initWithValue:]): * API/JSTypedArray.cpp: * API/ObjCCallbackFunction.mm: * API/tests/testapi.mm: (testObjectiveCAPI): (testWeakValue): Deleted. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/builtins/builtins_generate_combined_implementation.py: (BuiltinsCombinedImplementationGenerator.generate_secondary_header_includes): * Scripts/builtins/builtins_generate_internals_wrapper_implementation.py: (BuiltinsInternalsWrapperImplementationGenerator.generate_secondary_header_includes): * Scripts/builtins/builtins_generate_separate_implementation.py: (BuiltinsSeparateImplementationGenerator.generate_secondary_header_includes): * assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::JumpList::link): (JSC::AbstractMacroAssembler::JumpList::linkTo): * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::add32): * assembler/MacroAssemblerCodeRef.cpp: Added. (JSC::MacroAssemblerCodePtr::createLLIntCodePtr): (JSC::MacroAssemblerCodePtr::dumpWithName): (JSC::MacroAssemblerCodePtr::dump): (JSC::MacroAssemblerCodeRef::createLLIntCodeRef): (JSC::MacroAssemblerCodeRef::dump): * assembler/MacroAssemblerCodeRef.h: (JSC::MacroAssemblerCodePtr::createLLIntCodePtr): Deleted. (JSC::MacroAssemblerCodePtr::dumpWithName): Deleted. (JSC::MacroAssemblerCodePtr::dump): Deleted. (JSC::MacroAssemblerCodeRef::createLLIntCodeRef): Deleted. (JSC::MacroAssemblerCodeRef::dump): Deleted. * b3/B3BasicBlock.cpp: (JSC::B3::BasicBlock::appendBoolConstant): * b3/B3BasicBlock.h: * b3/B3DuplicateTails.cpp: * b3/B3StackmapGenerationParams.h: * b3/testb3.cpp: (JSC::B3::testPatchpointTerminalReturnValue): (JSC::B3::run): * bindings/ScriptValue.cpp: * bytecode/AdaptiveInferredPropertyValueWatchpointBase.cpp: * bytecode/BytecodeBasicBlock.cpp: * bytecode/BytecodeLivenessAnalysis.cpp: * bytecode/BytecodeUseDef.h: * bytecode/CallLinkInfo.cpp: (JSC::CallLinkInfo::callTypeFor): * bytecode/CallLinkInfo.h: (JSC::CallLinkInfo::callTypeFor): Deleted. * bytecode/CallLinkStatus.cpp: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::finishCreation): (JSC::CodeBlock::clearLLIntGetByIdCache): (JSC::CodeBlock::predictedMachineCodeSize): * bytecode/CodeBlock.h: (JSC::CodeBlock::jitCodeMap): Deleted. (JSC::clearLLIntGetByIdCache): Deleted. * bytecode/ExecutionCounter.h: * bytecode/Instruction.h: * bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp: (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::fireInternal): * bytecode/ObjectAllocationProfile.h: (JSC::ObjectAllocationProfile::isNull): (JSC::ObjectAllocationProfile::initialize): * bytecode/Opcode.h: (JSC::padOpcodeName): * bytecode/PolymorphicAccess.cpp: (JSC::AccessCase::generateImpl): (JSC::PolymorphicAccess::regenerate): * bytecode/PolymorphicAccess.h: * bytecode/PreciseJumpTargets.cpp: * bytecode/StructureStubInfo.cpp: * bytecode/StructureStubInfo.h: * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedCodeBlock::vm): Deleted. * bytecode/UnlinkedCodeBlock.h: * bytecode/UnlinkedInstructionStream.cpp: * bytecode/UnlinkedInstructionStream.h: * dfg/DFGOperations.cpp: * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::compileMakeRope): (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage): (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage): * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::emitAllocateJSCell): (JSC::DFG::SpeculativeJIT::emitAllocateJSObject): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): (JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): (JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): * dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::handleNode): * ftl/FTLAbstractHeapRepository.h: * ftl/FTLCompile.cpp: * ftl/FTLJITFinalizer.cpp: * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments): (JSC::FTL::DFG::LowerDFGToB3::compileCreateRest): (JSC::FTL::DFG::LowerDFGToB3::allocateArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileMakeRope): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): (JSC::FTL::DFG::LowerDFGToB3::initializeArrayElements): (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorageWithSizeImpl): (JSC::FTL::DFG::LowerDFGToB3::allocateHeapCell): (JSC::FTL::DFG::LowerDFGToB3::allocateCell): (JSC::FTL::DFG::LowerDFGToB3::allocateObject): (JSC::FTL::DFG::LowerDFGToB3::allocatorForSize): (JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject): (JSC::FTL::DFG::LowerDFGToB3::allocateJSArray): (JSC::FTL::DFG::LowerDFGToB3::compileAllocateArrayWithSize): Deleted. * ftl/FTLOutput.cpp: (JSC::FTL::Output::constBool): (JSC::FTL::Output::add): (JSC::FTL::Output::shl): (JSC::FTL::Output::aShr): (JSC::FTL::Output::lShr): (JSC::FTL::Output::zeroExt): (JSC::FTL::Output::equal): (JSC::FTL::Output::notEqual): (JSC::FTL::Output::above): (JSC::FTL::Output::aboveOrEqual): (JSC::FTL::Output::below): (JSC::FTL::Output::belowOrEqual): (JSC::FTL::Output::greaterThan): (JSC::FTL::Output::greaterThanOrEqual): (JSC::FTL::Output::lessThan): (JSC::FTL::Output::lessThanOrEqual): (JSC::FTL::Output::select): (JSC::FTL::Output::appendSuccessor): (JSC::FTL::Output::addIncomingToPhi): * ftl/FTLOutput.h: * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::operator bool): (JSC::FTL::ValueFromBlock::ValueFromBlock): Deleted. * ftl/FTLWeightedTarget.h: (JSC::FTL::WeightedTarget::frequentedBlock): * heap/CellContainer.h: Added. (JSC::CellContainer::CellContainer): (JSC::CellContainer::operator bool): (JSC::CellContainer::isMarkedBlock): (JSC::CellContainer::isLargeAllocation): (JSC::CellContainer::markedBlock): (JSC::CellContainer::largeAllocation): * heap/CellContainerInlines.h: Added. (JSC::CellContainer::isMarked): (JSC::CellContainer::isMarkedOrNewlyAllocated): (JSC::CellContainer::noteMarked): (JSC::CellContainer::cellSize): (JSC::CellContainer::weakSet): (JSC::CellContainer::flipIfNecessary): * heap/ConservativeRoots.cpp: (JSC::ConservativeRoots::ConservativeRoots): (JSC::ConservativeRoots::~ConservativeRoots): (JSC::ConservativeRoots::grow): (JSC::ConservativeRoots::genericAddPointer): (JSC::ConservativeRoots::genericAddSpan): * heap/ConservativeRoots.h: (JSC::ConservativeRoots::roots): * heap/CopyToken.h: * heap/FreeList.cpp: Added. (JSC::FreeList::dump): * heap/FreeList.h: Added. (JSC::FreeList::FreeList): (JSC::FreeList::list): (JSC::FreeList::bump): (JSC::FreeList::operator==): (JSC::FreeList::operator!=): (JSC::FreeList::operator bool): (JSC::FreeList::allocationWillFail): (JSC::FreeList::allocationWillSucceed): * heap/GCTypeMap.h: Added. (JSC::GCTypeMap::operator[]): * heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::lastChanceToFinalize): (JSC::Heap::finalizeUnconditionalFinalizers): (JSC::Heap::markRoots): (JSC::Heap::copyBackingStores): (JSC::Heap::gatherStackRoots): (JSC::Heap::gatherJSStackRoots): (JSC::Heap::gatherScratchBufferRoots): (JSC::Heap::clearLivenessData): (JSC::Heap::visitSmallStrings): (JSC::Heap::visitConservativeRoots): (JSC::Heap::removeDeadCompilerWorklistEntries): (JSC::Heap::gatherExtraHeapSnapshotData): (JSC::Heap::removeDeadHeapSnapshotNodes): (JSC::Heap::visitProtectedObjects): (JSC::Heap::visitArgumentBuffers): (JSC::Heap::visitException): (JSC::Heap::visitStrongHandles): (JSC::Heap::visitHandleStack): (JSC::Heap::visitSamplingProfiler): (JSC::Heap::traceCodeBlocksAndJITStubRoutines): (JSC::Heap::converge): (JSC::Heap::visitWeakHandles): (JSC::Heap::updateObjectCounts): (JSC::Heap::clearUnmarkedExecutables): (JSC::Heap::deleteUnmarkedCompiledCode): (JSC::Heap::collectAllGarbage): (JSC::Heap::collect): (JSC::Heap::collectWithoutAnySweep): (JSC::Heap::collectImpl): (JSC::Heap::suspendCompilerThreads): (JSC::Heap::willStartCollection): (JSC::Heap::flushOldStructureIDTables): (JSC::Heap::flushWriteBarrierBuffer): (JSC::Heap::stopAllocation): (JSC::Heap::prepareForMarking): (JSC::Heap::reapWeakHandles): (JSC::Heap::pruneStaleEntriesFromWeakGCMaps): (JSC::Heap::sweepArrayBuffers): (JSC::MarkedBlockSnapshotFunctor::MarkedBlockSnapshotFunctor): (JSC::MarkedBlockSnapshotFunctor::operator()): (JSC::Heap::snapshotMarkedSpace): (JSC::Heap::deleteSourceProviderCaches): (JSC::Heap::notifyIncrementalSweeper): (JSC::Heap::writeBarrierCurrentlyExecutingCodeBlocks): (JSC::Heap::resetAllocators): (JSC::Heap::updateAllocationLimits): (JSC::Heap::didFinishCollection): (JSC::Heap::resumeCompilerThreads): (JSC::Zombify::visit): (JSC::Heap::forEachCodeBlockImpl): * heap/Heap.h: (JSC::Heap::allocatorForObjectWithoutDestructor): (JSC::Heap::allocatorForObjectWithDestructor): (JSC::Heap::allocatorForAuxiliaryData): (JSC::Heap::jitStubRoutines): (JSC::Heap::codeBlockSet): (JSC::Heap::storageAllocator): Deleted. * heap/HeapCell.h: (JSC::HeapCell::isZapped): Deleted. * heap/HeapCellInlines.h: Added. (JSC::HeapCell::isLargeAllocation): (JSC::HeapCell::cellContainer): (JSC::HeapCell::markedBlock): (JSC::HeapCell::largeAllocation): (JSC::HeapCell::heap): (JSC::HeapCell::vm): (JSC::HeapCell::cellSize): (JSC::HeapCell::allocatorAttributes): (JSC::HeapCell::destructionMode): (JSC::HeapCell::cellKind): * heap/HeapInlines.h: (JSC::Heap::heap): (JSC::Heap::isLive): (JSC::Heap::isMarked): (JSC::Heap::testAndSetMarked): (JSC::Heap::setMarked): (JSC::Heap::cellSize): (JSC::Heap::forEachCodeBlock): (JSC::Heap::allocateObjectOfType): (JSC::Heap::subspaceForObjectOfType): (JSC::Heap::allocatorForObjectOfType): (JSC::Heap::allocateAuxiliary): (JSC::Heap::tryAllocateAuxiliary): (JSC::Heap::tryReallocateAuxiliary): (JSC::Heap::isPointerGCObject): Deleted. (JSC::Heap::isValueGCObject): Deleted. * heap/HeapOperation.cpp: Added. (WTF::printInternal): * heap/HeapOperation.h: * heap/HeapUtil.h: Added. (JSC::HeapUtil::findGCObjectPointersForMarking): (JSC::HeapUtil::isPointerGCObjectJSCell): (JSC::HeapUtil::isValueGCObject): * heap/IncrementalSweeper.cpp: (JSC::IncrementalSweeper::sweepNextBlock): * heap/IncrementalSweeper.h: * heap/LargeAllocation.cpp: Added. (JSC::LargeAllocation::tryCreate): (JSC::LargeAllocation::LargeAllocation): (JSC::LargeAllocation::lastChanceToFinalize): (JSC::LargeAllocation::shrink): (JSC::LargeAllocation::visitWeakSet): (JSC::LargeAllocation::reapWeakSet): (JSC::LargeAllocation::flip): (JSC::LargeAllocation::isEmpty): (JSC::LargeAllocation::sweep): (JSC::LargeAllocation::destroy): (JSC::LargeAllocation::dump): * heap/LargeAllocation.h: Added. (JSC::LargeAllocation::fromCell): (JSC::LargeAllocation::cell): (JSC::LargeAllocation::isLargeAllocation): (JSC::LargeAllocation::heap): (JSC::LargeAllocation::vm): (JSC::LargeAllocation::weakSet): (JSC::LargeAllocation::clearNewlyAllocated): (JSC::LargeAllocation::isNewlyAllocated): (JSC::LargeAllocation::isMarked): (JSC::LargeAllocation::isMarkedOrNewlyAllocated): (JSC::LargeAllocation::isLive): (JSC::LargeAllocation::hasValidCell): (JSC::LargeAllocation::cellSize): (JSC::LargeAllocation::aboveLowerBound): (JSC::LargeAllocation::belowUpperBound): (JSC::LargeAllocation::contains): (JSC::LargeAllocation::attributes): (JSC::LargeAllocation::flipIfNecessary): (JSC::LargeAllocation::flipIfNecessaryConcurrently): (JSC::LargeAllocation::testAndSetMarked): (JSC::LargeAllocation::setMarked): (JSC::LargeAllocation::clearMarked): (JSC::LargeAllocation::noteMarked): (JSC::LargeAllocation::headerSize): * heap/MarkedAllocator.cpp: (JSC::MarkedAllocator::MarkedAllocator): (JSC::MarkedAllocator::isPagedOut): (JSC::MarkedAllocator::retire): (JSC::MarkedAllocator::filterNextBlock): (JSC::MarkedAllocator::setNextBlockToSweep): (JSC::MarkedAllocator::tryAllocateWithoutCollectingImpl): (JSC::MarkedAllocator::tryAllocateWithoutCollecting): (JSC::MarkedAllocator::allocateSlowCase): (JSC::MarkedAllocator::tryAllocateSlowCase): (JSC::MarkedAllocator::allocateSlowCaseImpl): (JSC::blockHeaderSize): (JSC::MarkedAllocator::blockSizeForBytes): (JSC::MarkedAllocator::tryAllocateBlock): (JSC::MarkedAllocator::addBlock): (JSC::MarkedAllocator::removeBlock): (JSC::MarkedAllocator::stopAllocating): (JSC::MarkedAllocator::reset): (JSC::MarkedAllocator::lastChanceToFinalize): (JSC::MarkedAllocator::setFreeList): (JSC::isListPagedOut): Deleted. (JSC::MarkedAllocator::tryAllocateHelper): Deleted. (JSC::MarkedAllocator::tryPopFreeList): Deleted. (JSC::MarkedAllocator::tryAllocate): Deleted. (JSC::MarkedAllocator::allocateBlock): Deleted. * heap/MarkedAllocator.h: (JSC::MarkedAllocator::takeLastActiveBlock): (JSC::MarkedAllocator::offsetOfFreeList): (JSC::MarkedAllocator::offsetOfCellSize): (JSC::MarkedAllocator::tryAllocate): (JSC::MarkedAllocator::allocate): (JSC::MarkedAllocator::forEachBlock): (JSC::MarkedAllocator::offsetOfFreeListHead): Deleted. (JSC::MarkedAllocator::MarkedAllocator): Deleted. (JSC::MarkedAllocator::init): Deleted. (JSC::MarkedAllocator::stopAllocating): Deleted. * heap/MarkedBlock.cpp: (JSC::MarkedBlock::tryCreate): (JSC::MarkedBlock::Handle::Handle): (JSC::MarkedBlock::Handle::~Handle): (JSC::MarkedBlock::MarkedBlock): (JSC::MarkedBlock::Handle::specializedSweep): (JSC::MarkedBlock::Handle::sweep): (JSC::MarkedBlock::Handle::sweepHelperSelectScribbleMode): (JSC::MarkedBlock::Handle::sweepHelperSelectStateAndSweepMode): (JSC::MarkedBlock::Handle::unsweepWithNoNewlyAllocated): (JSC::SetNewlyAllocatedFunctor::SetNewlyAllocatedFunctor): (JSC::SetNewlyAllocatedFunctor::operator()): (JSC::MarkedBlock::Handle::stopAllocating): (JSC::MarkedBlock::Handle::lastChanceToFinalize): (JSC::MarkedBlock::Handle::resumeAllocating): (JSC::MarkedBlock::Handle::zap): (JSC::MarkedBlock::Handle::forEachFreeCell): (JSC::MarkedBlock::flipIfNecessary): (JSC::MarkedBlock::Handle::flipIfNecessary): (JSC::MarkedBlock::flipIfNecessarySlow): (JSC::MarkedBlock::flipIfNecessaryConcurrentlySlow): (JSC::MarkedBlock::clearMarks): (JSC::MarkedBlock::assertFlipped): (JSC::MarkedBlock::needsFlip): (JSC::MarkedBlock::Handle::needsFlip): (JSC::MarkedBlock::Handle::willRemoveBlock): (JSC::MarkedBlock::Handle::didConsumeFreeList): (JSC::MarkedBlock::markCount): (JSC::MarkedBlock::Handle::isEmpty): (JSC::MarkedBlock::clearHasAnyMarked): (JSC::MarkedBlock::noteMarkedSlow): (WTF::printInternal): (JSC::MarkedBlock::create): Deleted. (JSC::MarkedBlock::destroy): Deleted. (JSC::MarkedBlock::callDestructor): Deleted. (JSC::MarkedBlock::specializedSweep): Deleted. (JSC::MarkedBlock::sweep): Deleted. (JSC::MarkedBlock::sweepHelper): Deleted. (JSC::MarkedBlock::stopAllocating): Deleted. (JSC::MarkedBlock::clearMarksWithCollectionType): Deleted. (JSC::MarkedBlock::lastChanceToFinalize): Deleted. (JSC::MarkedBlock::resumeAllocating): Deleted. (JSC::MarkedBlock::didRetireBlock): Deleted. * heap/MarkedBlock.h: (JSC::MarkedBlock::VoidFunctor::returnValue): (JSC::MarkedBlock::CountFunctor::CountFunctor): (JSC::MarkedBlock::CountFunctor::count): (JSC::MarkedBlock::CountFunctor::returnValue): (JSC::MarkedBlock::Handle::hasAnyNewlyAllocated): (JSC::MarkedBlock::Handle::isOnBlocksToSweep): (JSC::MarkedBlock::Handle::setIsOnBlocksToSweep): (JSC::MarkedBlock::Handle::state): (JSC::MarkedBlock::needsDestruction): (JSC::MarkedBlock::handle): (JSC::MarkedBlock::Handle::block): (JSC::MarkedBlock::firstAtom): (JSC::MarkedBlock::atoms): (JSC::MarkedBlock::isAtomAligned): (JSC::MarkedBlock::Handle::cellAlign): (JSC::MarkedBlock::blockFor): (JSC::MarkedBlock::Handle::allocator): (JSC::MarkedBlock::Handle::heap): (JSC::MarkedBlock::Handle::vm): (JSC::MarkedBlock::vm): (JSC::MarkedBlock::Handle::weakSet): (JSC::MarkedBlock::weakSet): (JSC::MarkedBlock::Handle::shrink): (JSC::MarkedBlock::Handle::visitWeakSet): (JSC::MarkedBlock::Handle::reapWeakSet): (JSC::MarkedBlock::Handle::cellSize): (JSC::MarkedBlock::cellSize): (JSC::MarkedBlock::Handle::attributes): (JSC::MarkedBlock::attributes): (JSC::MarkedBlock::Handle::needsDestruction): (JSC::MarkedBlock::Handle::destruction): (JSC::MarkedBlock::Handle::cellKind): (JSC::MarkedBlock::Handle::markCount): (JSC::MarkedBlock::Handle::size): (JSC::MarkedBlock::atomNumber): (JSC::MarkedBlock::flipIfNecessary): (JSC::MarkedBlock::flipIfNecessaryConcurrently): (JSC::MarkedBlock::Handle::flipIfNecessary): (JSC::MarkedBlock::Handle::flipIfNecessaryConcurrently): (JSC::MarkedBlock::Handle::flipForEdenCollection): (JSC::MarkedBlock::assertFlipped): (JSC::MarkedBlock::Handle::assertFlipped): (JSC::MarkedBlock::isMarked): (JSC::MarkedBlock::testAndSetMarked): (JSC::MarkedBlock::Handle::isNewlyAllocated): (JSC::MarkedBlock::Handle::setNewlyAllocated): (JSC::MarkedBlock::Handle::clearNewlyAllocated): (JSC::MarkedBlock::Handle::isMarkedOrNewlyAllocated): (JSC::MarkedBlock::isMarkedOrNewlyAllocated): (JSC::MarkedBlock::Handle::isLive): (JSC::MarkedBlock::isAtom): (JSC::MarkedBlock::Handle::isLiveCell): (JSC::MarkedBlock::Handle::forEachCell): (JSC::MarkedBlock::Handle::forEachLiveCell): (JSC::MarkedBlock::Handle::forEachDeadCell): (JSC::MarkedBlock::Handle::needsSweeping): (JSC::MarkedBlock::Handle::isAllocated): (JSC::MarkedBlock::Handle::isMarked): (JSC::MarkedBlock::Handle::isFreeListed): (JSC::MarkedBlock::hasAnyMarked): (JSC::MarkedBlock::noteMarked): (WTF::MarkedBlockHash::hash): (JSC::MarkedBlock::FreeList::FreeList): Deleted. (JSC::MarkedBlock::allocator): Deleted. (JSC::MarkedBlock::heap): Deleted. (JSC::MarkedBlock::shrink): Deleted. (JSC::MarkedBlock::visitWeakSet): Deleted. (JSC::MarkedBlock::reapWeakSet): Deleted. (JSC::MarkedBlock::willRemoveBlock): Deleted. (JSC::MarkedBlock::didConsumeFreeList): Deleted. (JSC::MarkedBlock::markCount): Deleted. (JSC::MarkedBlock::isEmpty): Deleted. (JSC::MarkedBlock::destruction): Deleted. (JSC::MarkedBlock::cellKind): Deleted. (JSC::MarkedBlock::size): Deleted. (JSC::MarkedBlock::capacity): Deleted. (JSC::MarkedBlock::setMarked): Deleted. (JSC::MarkedBlock::clearMarked): Deleted. (JSC::MarkedBlock::isNewlyAllocated): Deleted. (JSC::MarkedBlock::setNewlyAllocated): Deleted. (JSC::MarkedBlock::clearNewlyAllocated): Deleted. (JSC::MarkedBlock::isLive): Deleted. (JSC::MarkedBlock::isLiveCell): Deleted. (JSC::MarkedBlock::forEachCell): Deleted. (JSC::MarkedBlock::forEachLiveCell): Deleted. (JSC::MarkedBlock::forEachDeadCell): Deleted. (JSC::MarkedBlock::needsSweeping): Deleted. (JSC::MarkedBlock::isAllocated): Deleted. (JSC::MarkedBlock::isMarkedOrRetired): Deleted. * heap/MarkedSpace.cpp: (JSC::MarkedSpace::initializeSizeClassForStepSize): (JSC::MarkedSpace::MarkedSpace): (JSC::MarkedSpace::~MarkedSpace): (JSC::MarkedSpace::lastChanceToFinalize): (JSC::MarkedSpace::allocate): (JSC::MarkedSpace::tryAllocate): (JSC::MarkedSpace::allocateLarge): (JSC::MarkedSpace::tryAllocateLarge): (JSC::MarkedSpace::sweep): (JSC::MarkedSpace::sweepLargeAllocations): (JSC::MarkedSpace::zombifySweep): (JSC::MarkedSpace::resetAllocators): (JSC::MarkedSpace::visitWeakSets): (JSC::MarkedSpace::reapWeakSets): (JSC::MarkedSpace::stopAllocating): (JSC::MarkedSpace::prepareForMarking): (JSC::MarkedSpace::resumeAllocating): (JSC::MarkedSpace::isPagedOut): (JSC::MarkedSpace::freeBlock): (JSC::MarkedSpace::freeOrShrinkBlock): (JSC::MarkedSpace::shrink): (JSC::MarkedSpace::clearNewlyAllocated): (JSC::VerifyMarked::operator()): (JSC::MarkedSpace::flip): (JSC::MarkedSpace::objectCount): (JSC::MarkedSpace::size): (JSC::MarkedSpace::capacity): (JSC::MarkedSpace::addActiveWeakSet): (JSC::MarkedSpace::didAddBlock): (JSC::MarkedSpace::didAllocateInBlock): (JSC::MarkedSpace::forEachAllocator): Deleted. (JSC::VerifyMarkedOrRetired::operator()): Deleted. (JSC::MarkedSpace::clearMarks): Deleted. * heap/MarkedSpace.h: (JSC::MarkedSpace::sizeClassToIndex): (JSC::MarkedSpace::indexToSizeClass): (JSC::MarkedSpace::version): (JSC::MarkedSpace::blocksWithNewObjects): (JSC::MarkedSpace::largeAllocations): (JSC::MarkedSpace::largeAllocationsNurseryOffset): (JSC::MarkedSpace::largeAllocationsOffsetForThisCollection): (JSC::MarkedSpace::largeAllocationsForThisCollectionBegin): (JSC::MarkedSpace::largeAllocationsForThisCollectionEnd): (JSC::MarkedSpace::largeAllocationsForThisCollectionSize): (JSC::MarkedSpace::forEachLiveCell): (JSC::MarkedSpace::forEachDeadCell): (JSC::MarkedSpace::allocatorFor): (JSC::MarkedSpace::destructorAllocatorFor): (JSC::MarkedSpace::auxiliaryAllocatorFor): (JSC::MarkedSpace::allocateWithoutDestructor): (JSC::MarkedSpace::allocateWithDestructor): (JSC::MarkedSpace::allocateAuxiliary): (JSC::MarkedSpace::tryAllocateAuxiliary): (JSC::MarkedSpace::forEachBlock): (JSC::MarkedSpace::forEachAllocator): (JSC::MarkedSpace::optimalSizeFor): (JSC::MarkedSpace::didAddBlock): Deleted. (JSC::MarkedSpace::didAllocateInBlock): Deleted. (JSC::MarkedSpace::objectCount): Deleted. (JSC::MarkedSpace::size): Deleted. (JSC::MarkedSpace::capacity): Deleted. * heap/SlotVisitor.cpp: (JSC::SlotVisitor::SlotVisitor): (JSC::SlotVisitor::didStartMarking): (JSC::SlotVisitor::reset): (JSC::SlotVisitor::append): (JSC::SlotVisitor::appendJSCellOrAuxiliary): (JSC::SlotVisitor::setMarkedAndAppendToMarkStack): (JSC::SlotVisitor::appendToMarkStack): (JSC::SlotVisitor::markAuxiliary): (JSC::SlotVisitor::noteLiveAuxiliaryCell): (JSC::SlotVisitor::visitChildren): * heap/SlotVisitor.h: * heap/WeakBlock.cpp: (JSC::WeakBlock::create): (JSC::WeakBlock::WeakBlock): (JSC::WeakBlock::visit): (JSC::WeakBlock::reap): * heap/WeakBlock.h: (JSC::WeakBlock::disconnectContainer): (JSC::WeakBlock::disconnectMarkedBlock): Deleted. * heap/WeakSet.cpp: (JSC::WeakSet::~WeakSet): (JSC::WeakSet::sweep): (JSC::WeakSet::shrink): (JSC::WeakSet::addAllocator): * heap/WeakSet.h: (JSC::WeakSet::container): (JSC::WeakSet::setContainer): (JSC::WeakSet::WeakSet): (JSC::WeakSet::visit): (JSC::WeakSet::shrink): Deleted. * heap/WeakSetInlines.h: (JSC::WeakSet::allocate): * inspector/InjectedScriptManager.cpp: * inspector/JSGlobalObjectInspectorController.cpp: * inspector/JSJavaScriptCallFrame.cpp: * inspector/ScriptDebugServer.cpp: * inspector/agents/InspectorDebuggerAgent.cpp: * interpreter/CachedCall.h: (JSC::CachedCall::CachedCall): * interpreter/Interpreter.cpp: (JSC::loadVarargs): (JSC::StackFrame::sourceID): Deleted. (JSC::StackFrame::sourceURL): Deleted. (JSC::StackFrame::functionName): Deleted. (JSC::StackFrame::computeLineAndColumn): Deleted. (JSC::StackFrame::toString): Deleted. * interpreter/Interpreter.h: (JSC::StackFrame::isNative): Deleted. * jit/AssemblyHelpers.h: (JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator): (JSC::AssemblyHelpers::emitAllocate): (JSC::AssemblyHelpers::emitAllocateJSCell): (JSC::AssemblyHelpers::emitAllocateJSObject): (JSC::AssemblyHelpers::emitAllocateJSObjectWithKnownSize): (JSC::AssemblyHelpers::emitAllocateVariableSized): * jit/GCAwareJITStubRoutine.cpp: (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine): * jit/JIT.cpp: (JSC::JIT::compileCTINativeCall): (JSC::JIT::link): * jit/JIT.h: (JSC::JIT::compileCTINativeCall): Deleted. * jit/JITExceptions.cpp: (JSC::genericUnwind): * jit/JITExceptions.h: * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_new_object): (JSC::JIT::emitSlow_op_new_object): (JSC::JIT::emit_op_create_this): (JSC::JIT::emitSlow_op_create_this): * jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_new_object): (JSC::JIT::emitSlow_op_new_object): (JSC::JIT::emit_op_create_this): (JSC::JIT::emitSlow_op_create_this): * jit/JITOperations.cpp: * jit/JITOperations.h: * jit/JITPropertyAccess.cpp: (JSC::JIT::emitWriteBarrier): * jit/JITThunks.cpp: * jit/JITThunks.h: * jsc.cpp: (functionDescribeArray): (main): * llint/LLIntData.cpp: (JSC::LLInt::Data::performAssertions): * llint/LLIntExceptions.cpp: * llint/LLIntThunks.cpp: * llint/LLIntThunks.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter.cpp: * llint/LowLevelInterpreter32_64.asm: * llint/LowLevelInterpreter64.asm: * parser/ModuleAnalyzer.cpp: * parser/NodeConstructors.h: * parser/Nodes.h: * profiler/ProfilerBytecode.cpp: * profiler/ProfilerBytecode.h: * profiler/ProfilerBytecodeSequence.cpp: * runtime/ArrayConventions.h: (JSC::indexingHeaderForArrayStorage): (JSC::baseIndexingHeaderForArrayStorage): (JSC::indexingHeaderForArray): Deleted. (JSC::baseIndexingHeaderForArray): Deleted. * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): (JSC::concatAppendOne): (JSC::arrayProtoPrivateFuncConcatMemcpy): * runtime/ArrayStorage.h: (JSC::ArrayStorage::vectorLength): (JSC::ArrayStorage::totalSizeFor): (JSC::ArrayStorage::totalSize): (JSC::ArrayStorage::availableVectorLength): (JSC::ArrayStorage::optimalVectorLength): (JSC::ArrayStorage::sizeFor): Deleted. * runtime/AuxiliaryBarrier.h: Added. (JSC::AuxiliaryBarrier::AuxiliaryBarrier): (JSC::AuxiliaryBarrier::clear): (JSC::AuxiliaryBarrier::get): (JSC::AuxiliaryBarrier::slot): (JSC::AuxiliaryBarrier::operator bool): (JSC::AuxiliaryBarrier::setWithoutBarrier): * runtime/AuxiliaryBarrierInlines.h: Added. (JSC::AuxiliaryBarrier<T>::AuxiliaryBarrier): (JSC::AuxiliaryBarrier<T>::set): * runtime/Butterfly.h: * runtime/ButterflyInlines.h: (JSC::Butterfly::availableContiguousVectorLength): (JSC::Butterfly::optimalContiguousVectorLength): (JSC::Butterfly::createUninitialized): (JSC::Butterfly::growArrayRight): * runtime/ClonedArguments.cpp: (JSC::ClonedArguments::createEmpty): * runtime/CommonSlowPathsExceptions.cpp: * runtime/CommonSlowPathsExceptions.h: * runtime/DataView.cpp: * runtime/DirectArguments.h: * runtime/ECMAScriptSpecInternalFunctions.cpp: * runtime/Error.cpp: * runtime/Error.h: * runtime/ErrorInstance.cpp: * runtime/ErrorInstance.h: * runtime/Exception.cpp: * runtime/Exception.h: * runtime/GeneratorFrame.cpp: * runtime/GeneratorPrototype.cpp: * runtime/InternalFunction.cpp: (JSC::InternalFunction::InternalFunction): * runtime/IntlCollator.cpp: * runtime/IntlCollatorConstructor.cpp: * runtime/IntlCollatorPrototype.cpp: * runtime/IntlDateTimeFormat.cpp: * runtime/IntlDateTimeFormatConstructor.cpp: * runtime/IntlDateTimeFormatPrototype.cpp: * runtime/IntlNumberFormat.cpp: * runtime/IntlNumberFormatConstructor.cpp: * runtime/IntlNumberFormatPrototype.cpp: * runtime/IntlObject.cpp: * runtime/IteratorPrototype.cpp: * runtime/JSArray.cpp: (JSC::JSArray::tryCreateUninitialized): (JSC::JSArray::setLengthWritable): (JSC::JSArray::unshiftCountSlowCase): (JSC::JSArray::setLengthWithArrayStorage): (JSC::JSArray::appendMemcpy): (JSC::JSArray::setLength): (JSC::JSArray::pop): (JSC::JSArray::push): (JSC::JSArray::fastSlice): (JSC::JSArray::shiftCountWithArrayStorage): (JSC::JSArray::shiftCountWithAnyIndexingType): (JSC::JSArray::unshiftCountWithArrayStorage): (JSC::JSArray::fillArgList): (JSC::JSArray::copyToArguments): * runtime/JSArray.h: (JSC::createContiguousArrayButterfly): (JSC::createArrayButterfly): (JSC::JSArray::create): (JSC::JSArray::tryCreateUninitialized): Deleted. * runtime/JSArrayBufferView.h: * runtime/JSCInlines.h: * runtime/JSCJSValue.cpp: (JSC::JSValue::dumpInContextAssumingStructure): * runtime/JSCallee.cpp: (JSC::JSCallee::JSCallee): * runtime/JSCell.cpp: (JSC::JSCell::estimatedSize): * runtime/JSCell.h: (JSC::JSCell::cellStateOffset): Deleted. * runtime/JSCellInlines.h: (JSC::ExecState::vm): (JSC::JSCell::classInfo): (JSC::JSCell::callDestructor): (JSC::JSCell::vm): Deleted. * runtime/JSFunction.cpp: (JSC::JSFunction::create): (JSC::JSFunction::allocateAndInitializeRareData): (JSC::JSFunction::initializeRareData): (JSC::JSFunction::getOwnPropertySlot): (JSC::JSFunction::put): (JSC::JSFunction::deleteProperty): (JSC::JSFunction::defineOwnProperty): (JSC::JSFunction::setFunctionName): (JSC::JSFunction::reifyLength): (JSC::JSFunction::reifyName): (JSC::JSFunction::reifyLazyPropertyIfNeeded): (JSC::JSFunction::reifyBoundNameIfNeeded): * runtime/JSFunction.h: * runtime/JSFunctionInlines.h: (JSC::JSFunction::createWithInvalidatedReallocationWatchpoint): (JSC::JSFunction::JSFunction): * runtime/JSGenericTypedArrayViewInlines.h: (JSC::JSGenericTypedArrayView<Adaptor>::slowDownAndWasteMemory): * runtime/JSInternalPromise.cpp: * runtime/JSInternalPromiseConstructor.cpp: * runtime/JSInternalPromiseDeferred.cpp: * runtime/JSInternalPromisePrototype.cpp: * runtime/JSJob.cpp: * runtime/JSMapIterator.cpp: * runtime/JSModuleNamespaceObject.cpp: * runtime/JSModuleRecord.cpp: * runtime/JSObject.cpp: (JSC::JSObject::visitButterfly): (JSC::JSObject::notifyPresenceOfIndexedAccessors): (JSC::JSObject::createInitialIndexedStorage): (JSC::JSObject::createInitialUndecided): (JSC::JSObject::createInitialInt32): (JSC::JSObject::createInitialDouble): (JSC::JSObject::createInitialContiguous): (JSC::JSObject::createArrayStorage): (JSC::JSObject::createInitialArrayStorage): (JSC::JSObject::convertUndecidedToInt32): (JSC::JSObject::convertUndecidedToContiguous): (JSC::JSObject::convertUndecidedToArrayStorage): (JSC::JSObject::convertInt32ToDouble): (JSC::JSObject::convertInt32ToArrayStorage): (JSC::JSObject::convertDoubleToArrayStorage): (JSC::JSObject::convertContiguousToArrayStorage): (JSC::JSObject::putByIndexBeyondVectorLength): (JSC::JSObject::putDirectIndexBeyondVectorLength): (JSC::JSObject::getNewVectorLength): (JSC::JSObject::increaseVectorLength): (JSC::JSObject::ensureLengthSlow): (JSC::JSObject::growOutOfLineStorage): (JSC::JSObject::copyButterfly): Deleted. (JSC::JSObject::copyBackingStore): Deleted. * runtime/JSObject.h: (JSC::JSObject::globalObject): (JSC::JSObject::putDirectInternal): (JSC::JSObject::setStructureAndReallocateStorageIfNecessary): Deleted. * runtime/JSObjectInlines.h: * runtime/JSPromise.cpp: * runtime/JSPromiseConstructor.cpp: * runtime/JSPromiseDeferred.cpp: * runtime/JSPromisePrototype.cpp: * runtime/JSPropertyNameIterator.cpp: * runtime/JSScope.cpp: (JSC::JSScope::resolve): * runtime/JSScope.h: (JSC::JSScope::globalObject): (JSC::JSScope::vm): Deleted. * runtime/JSSetIterator.cpp: * runtime/JSStringIterator.cpp: * runtime/JSTemplateRegistryKey.cpp: * runtime/JSTypedArrayViewConstructor.cpp: * runtime/JSTypedArrayViewPrototype.cpp: * runtime/JSWeakMap.cpp: * runtime/JSWeakSet.cpp: * runtime/MapConstructor.cpp: * runtime/MapIteratorPrototype.cpp: * runtime/MapPrototype.cpp: * runtime/NativeErrorConstructor.cpp: * runtime/NativeStdFunctionCell.cpp: * runtime/Operations.h: (JSC::scribbleFreeCells): (JSC::scribble): * runtime/Options.h: * runtime/PropertyTable.cpp: * runtime/ProxyConstructor.cpp: * runtime/ProxyObject.cpp: * runtime/ProxyRevoke.cpp: * runtime/RegExp.cpp: (JSC::RegExp::match): (JSC::RegExp::matchConcurrently): (JSC::RegExp::matchCompareWithInterpreter): * runtime/RegExp.h: * runtime/RegExpConstructor.h: * runtime/RegExpInlines.h: (JSC::RegExp::matchInline): * runtime/RegExpMatchesArray.h: (JSC::tryCreateUninitializedRegExpMatchesArray): (JSC::createRegExpMatchesArray): * runtime/RegExpPrototype.cpp: (JSC::genericSplit): * runtime/RuntimeType.cpp: * runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::processUnverifiedStackTraces): * runtime/SetConstructor.cpp: * runtime/SetIteratorPrototype.cpp: * runtime/SetPrototype.cpp: * runtime/StackFrame.cpp: Added. (JSC::StackFrame::sourceID): (JSC::StackFrame::sourceURL): (JSC::StackFrame::functionName): (JSC::StackFrame::computeLineAndColumn): (JSC::StackFrame::toString): * runtime/StackFrame.h: Added. (JSC::StackFrame::isNative): * runtime/StringConstructor.cpp: * runtime/StringIteratorPrototype.cpp: * runtime/StructureInlines.h: (JSC::Structure::propertyTable): * runtime/TemplateRegistry.cpp: * runtime/TestRunnerUtils.cpp: (JSC::finalizeStatsAtEndOfTesting): * runtime/TestRunnerUtils.h: * runtime/TypeProfilerLog.cpp: * runtime/TypeSet.cpp: * runtime/VM.cpp: (JSC::VM::VM): (JSC::VM::ensureStackCapacityForCLoop): (JSC::VM::isSafeToRecurseSoftCLoop): * runtime/VM.h: * runtime/VMEntryScope.h: * runtime/VMInlines.h: (JSC::VM::ensureStackCapacityFor): (JSC::VM::isSafeToRecurseSoft): * runtime/WeakMapConstructor.cpp: * runtime/WeakMapData.cpp: * runtime/WeakMapPrototype.cpp: * runtime/WeakSetConstructor.cpp: * runtime/WeakSetPrototype.cpp: * testRegExp.cpp: (testOneRegExp): * tools/JSDollarVM.cpp: * tools/JSDollarVMPrototype.cpp: (JSC::JSDollarVMPrototype::isInObjectSpace): Source/WebCore: No new tests because no new WebCore behavior. Just rewiring #includes. * ForwardingHeaders/heap/HeapInlines.h: Added. * ForwardingHeaders/interpreter/Interpreter.h: Removed. * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Added. * Modules/indexeddb/IDBCursorWithValue.cpp: * Modules/indexeddb/client/TransactionOperation.cpp: * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: * Modules/indexeddb/server/UniqueIDBDatabase.cpp: * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp: * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp: * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp: * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp: * bindings/js/JSClientRectCustom.cpp: * bindings/js/JSDOMBinding.cpp: * bindings/js/JSDOMBinding.h: * bindings/js/JSDeviceMotionEventCustom.cpp: * bindings/js/JSDeviceOrientationEventCustom.cpp: * bindings/js/JSErrorEventCustom.cpp: * bindings/js/JSIDBCursorWithValueCustom.cpp: * bindings/js/JSIDBIndexCustom.cpp: * bindings/js/JSPopStateEventCustom.cpp: * bindings/js/JSWebGL2RenderingContextCustom.cpp: * bindings/js/JSWorkerGlobalScopeCustom.cpp: * bindings/js/WorkerScriptController.cpp: * contentextensions/ContentExtensionParser.cpp: * dom/ErrorEvent.cpp: * html/HTMLCanvasElement.cpp: * html/MediaDocument.cpp: * inspector/CommandLineAPIModule.cpp: * loader/EmptyClients.cpp: * page/CaptionUserPreferences.cpp: * page/Frame.cpp: * page/PageGroup.cpp: * page/UserContentController.cpp: * platform/mock/mediasource/MockBox.cpp: * testing/GCObservation.cpp: Source/WebKit2: Just rewiring some #includes. * UIProcess/ViewGestureController.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: * WebProcess/Plugins/Netscape/JSNPObject.cpp: Source/WTF: I needed tryFastAlignedMalloc() so I added it. * wtf/FastMalloc.cpp: (WTF::tryFastAlignedMalloc): * wtf/FastMalloc.h: * wtf/ParkingLot.cpp: (WTF::ParkingLot::forEachImpl): (WTF::ParkingLot::forEach): Deleted. * wtf/ParkingLot.h: (WTF::ParkingLot::parkConditionally): (WTF::ParkingLot::unparkOne): (WTF::ParkingLot::forEach): * wtf/ScopedLambda.h: (WTF::scopedLambdaRef): * wtf/SentinelLinkedList.h: (WTF::SentinelLinkedList::forEach): (WTF::RawNode>::takeFrom): * wtf/SimpleStats.h: (WTF::SimpleStats::operator bool): (WTF::SimpleStats::operator!): Deleted. Tools: * DumpRenderTree/TestRunner.cpp: * DumpRenderTree/mac/DumpRenderTree.mm: (DumpRenderTreeMain): * Scripts/run-jsc-stress-tests: * TestWebKitAPI/Tests/WTF/Vector.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/179778@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-06 01:02:22 +00:00
* Copyright (C) 2012, 2016 Apple Inc. All rights reserved.
JIT heuristics should be hyperbolic https://bugs.webkit.org/show_bug.cgi?id=80055 <rdar://problem/10922260> Source/JavaScriptCore: Reviewed by Oliver Hunt. Added tracking of the amount of executable memory typically used for a bytecode instruction. Modified the execution counter scheme to use this, and the amount of free memory, to determine how long to wait before invoking the JIT. The result is that even if we bomb the VM with more code than can fit in our executable memory pool, we still keep running and almost never run out of executable memory - which ensures that if we have to JIT something critical, then we'll likely have enough memory to do so. This also does not regress performance on the three main benchmarks. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::predictedMachineCodeSize): (JSC): (JSC::CodeBlock::usesOpcode): * bytecode/CodeBlock.h: (CodeBlock): (JSC::CodeBlock::checkIfJITThresholdReached): (JSC::CodeBlock::dontJITAnytimeSoon): (JSC::CodeBlock::jitAfterWarmUp): (JSC::CodeBlock::jitSoon): (JSC::CodeBlock::llintExecuteCounter): (JSC::CodeBlock::counterValueForOptimizeAfterWarmUp): (JSC::CodeBlock::counterValueForOptimizeAfterLongWarmUp): (JSC::CodeBlock::addressOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): (JSC::CodeBlock::offsetOfJITExecutionTotalCount): (JSC::CodeBlock::jitExecuteCounter): (JSC::CodeBlock::checkIfOptimizationThresholdReached): (JSC::CodeBlock::optimizeNextInvocation): (JSC::CodeBlock::dontOptimizeAnytimeSoon): (JSC::CodeBlock::optimizeAfterWarmUp): (JSC::CodeBlock::optimizeAfterLongWarmUp): (JSC::CodeBlock::optimizeSoon): * bytecode/ExecutionCounter.cpp: Added. (JSC): (JSC::ExecutionCounter::ExecutionCounter): (JSC::ExecutionCounter::checkIfThresholdCrossedAndSet): (JSC::ExecutionCounter::setNewThreshold): (JSC::ExecutionCounter::deferIndefinitely): (JSC::ExecutionCounter::applyMemoryUsageHeuristics): (JSC::ExecutionCounter::applyMemoryUsageHeuristicsAndConvertToInt): (JSC::ExecutionCounter::hasCrossedThreshold): (JSC::ExecutionCounter::setThreshold): (JSC::ExecutionCounter::reset): * bytecode/ExecutionCounter.h: Added. (JSC): (ExecutionCounter): (JSC::ExecutionCounter::formattedTotalCount): * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * jit/ExecutableAllocator.cpp: (JSC::DemandExecutableAllocator::allocateNewSpace): (JSC::ExecutableAllocator::underMemoryPressure): (JSC): (JSC::ExecutableAllocator::memoryPressureMultiplier): * jit/ExecutableAllocator.h: * jit/ExecutableAllocatorFixedVMPool.cpp: (JSC::ExecutableAllocator::memoryPressureMultiplier): (JSC): * jit/JIT.cpp: (JSC::JIT::privateCompile): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * llint/LLIntSlowPaths.cpp: (JSC::LLInt::jitCompileAndSetHeuristics): * llint/LowLevelInterpreter32_64.asm: * runtime/JSGlobalData.h: (JSGlobalData): * runtime/Options.cpp: (Options): (JSC::Options::initializeOptions): * runtime/Options.h: (Options): * wtf/SimpleStats.h: Added. (WTF): (SimpleStats): (WTF::SimpleStats::SimpleStats): (WTF::SimpleStats::add): (WTF::SimpleStats::operator!): (WTF::SimpleStats::count): (WTF::SimpleStats::sum): (WTF::SimpleStats::sumOfSquares): (WTF::SimpleStats::mean): (WTF::SimpleStats::variance): (WTF::SimpleStats::standardDeviation): Source/WebCore: Reviewed by Oliver Hunt. No new tests, since there's no new functionality. * ForwardingHeaders/wtf/SimpleStats.h: Added. Canonical link: https://commits.webkit.org/97373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-05 06:52:44 +00:00
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
Use pragma once in WTF https://bugs.webkit.org/show_bug.cgi?id=190527 Reviewed by Chris Dumez. Source/WTF: We also need to consistently include wtf headers from within wtf so we can build wtf without symbol redefinition errors from including the copy in Source and the copy in the build directory. * wtf/ASCIICType.h: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Atomics.h: * wtf/AutomaticThread.cpp: * wtf/AutomaticThread.h: * wtf/BackwardsGraph.h: * wtf/Bag.h: * wtf/BagToHashMap.h: * wtf/BitVector.cpp: * wtf/BitVector.h: * wtf/Bitmap.h: * wtf/BloomFilter.h: * wtf/Box.h: * wtf/BubbleSort.h: * wtf/BumpPointerAllocator.h: * wtf/ByteOrder.h: * wtf/CPUTime.cpp: * wtf/CallbackAggregator.h: * wtf/CheckedArithmetic.h: * wtf/CheckedBoolean.h: * wtf/ClockType.cpp: * wtf/ClockType.h: * wtf/CommaPrinter.h: * wtf/CompilationThread.cpp: * wtf/CompilationThread.h: * wtf/Compiler.h: * wtf/ConcurrentPtrHashSet.cpp: * wtf/ConcurrentVector.h: * wtf/Condition.h: * wtf/CountingLock.cpp: * wtf/CrossThreadTaskHandler.cpp: * wtf/CryptographicUtilities.cpp: * wtf/CryptographicUtilities.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/CryptographicallyRandomNumber.h: * wtf/CurrentTime.cpp: * wtf/DataLog.cpp: * wtf/DataLog.h: * wtf/DateMath.cpp: * wtf/DateMath.h: * wtf/DecimalNumber.cpp: * wtf/DecimalNumber.h: * wtf/Deque.h: * wtf/DisallowCType.h: * wtf/Dominators.h: * wtf/DoublyLinkedList.h: * wtf/FastBitVector.cpp: * wtf/FastMalloc.cpp: * wtf/FastMalloc.h: * wtf/FeatureDefines.h: * wtf/FilePrintStream.cpp: * wtf/FilePrintStream.h: * wtf/FlipBytes.h: * wtf/FunctionDispatcher.cpp: * wtf/FunctionDispatcher.h: * wtf/GetPtr.h: * wtf/Gigacage.cpp: * wtf/GlobalVersion.cpp: * wtf/GraphNodeWorklist.h: * wtf/GregorianDateTime.cpp: * wtf/GregorianDateTime.h: * wtf/HashFunctions.h: * wtf/HashMap.h: * wtf/HashMethod.h: * wtf/HashSet.h: * wtf/HashTable.cpp: * wtf/HashTraits.h: * wtf/Indenter.h: * wtf/IndexSparseSet.h: * wtf/InlineASM.h: * wtf/Insertion.h: * wtf/IteratorAdaptors.h: * wtf/IteratorRange.h: * wtf/JSONValues.cpp: * wtf/JSValueMalloc.cpp: * wtf/LEBDecoder.h: * wtf/Language.cpp: * wtf/ListDump.h: * wtf/Lock.cpp: * wtf/Lock.h: * wtf/LockAlgorithm.h: * wtf/LockedPrintStream.cpp: * wtf/Locker.h: * wtf/MD5.cpp: * wtf/MD5.h: * wtf/MainThread.cpp: * wtf/MainThread.h: * wtf/MallocPtr.h: * wtf/MathExtras.h: * wtf/MediaTime.cpp: * wtf/MediaTime.h: * wtf/MemoryPressureHandler.cpp: * wtf/MessageQueue.h: * wtf/MetaAllocator.cpp: * wtf/MetaAllocator.h: * wtf/MetaAllocatorHandle.h: * wtf/MonotonicTime.cpp: * wtf/MonotonicTime.h: * wtf/NakedPtr.h: * wtf/NoLock.h: * wtf/NoTailCalls.h: * wtf/Noncopyable.h: * wtf/NumberOfCores.cpp: * wtf/NumberOfCores.h: * wtf/OSAllocator.h: * wtf/OSAllocatorPosix.cpp: * wtf/OSRandomSource.cpp: * wtf/OSRandomSource.h: * wtf/ObjcRuntimeExtras.h: * wtf/OrderMaker.h: * wtf/PackedIntVector.h: * wtf/PageAllocation.h: * wtf/PageBlock.cpp: * wtf/PageBlock.h: * wtf/PageReservation.h: * wtf/ParallelHelperPool.cpp: * wtf/ParallelHelperPool.h: * wtf/ParallelJobs.h: * wtf/ParallelJobsLibdispatch.h: * wtf/ParallelVectorIterator.h: * wtf/ParkingLot.cpp: * wtf/ParkingLot.h: * wtf/Platform.h: * wtf/PointerComparison.h: * wtf/Poisoned.cpp: * wtf/PrintStream.cpp: * wtf/PrintStream.h: * wtf/ProcessID.h: * wtf/ProcessPrivilege.cpp: * wtf/RAMSize.cpp: * wtf/RAMSize.h: * wtf/RandomDevice.cpp: * wtf/RandomNumber.cpp: * wtf/RandomNumber.h: * wtf/RandomNumberSeed.h: * wtf/RangeSet.h: * wtf/RawPointer.h: * wtf/ReadWriteLock.cpp: * wtf/RedBlackTree.h: * wtf/Ref.h: * wtf/RefCountedArray.h: * wtf/RefCountedLeakCounter.cpp: * wtf/RefCountedLeakCounter.h: * wtf/RefCounter.h: * wtf/RefPtr.h: * wtf/RetainPtr.h: * wtf/RunLoop.cpp: * wtf/RunLoop.h: * wtf/RunLoopTimer.h: * wtf/RunLoopTimerCF.cpp: * wtf/SHA1.cpp: * wtf/SHA1.h: * wtf/SaturatedArithmetic.h: (saturatedSubtraction): * wtf/SchedulePair.h: * wtf/SchedulePairCF.cpp: * wtf/SchedulePairMac.mm: * wtf/ScopedLambda.h: * wtf/Seconds.cpp: * wtf/Seconds.h: * wtf/SegmentedVector.h: * wtf/SentinelLinkedList.h: * wtf/SharedTask.h: * wtf/SimpleStats.h: * wtf/SingleRootGraph.h: * wtf/SinglyLinkedList.h: * wtf/SixCharacterHash.cpp: * wtf/SixCharacterHash.h: * wtf/SmallPtrSet.h: * wtf/Spectrum.h: * wtf/StackBounds.cpp: * wtf/StackBounds.h: * wtf/StackStats.cpp: * wtf/StackStats.h: * wtf/StackTrace.cpp: * wtf/StdLibExtras.h: * wtf/StreamBuffer.h: * wtf/StringHashDumpContext.h: * wtf/StringPrintStream.cpp: * wtf/StringPrintStream.h: * wtf/ThreadGroup.cpp: * wtf/ThreadMessage.cpp: * wtf/ThreadSpecific.h: * wtf/Threading.cpp: * wtf/Threading.h: * wtf/ThreadingPrimitives.h: * wtf/ThreadingPthreads.cpp: * wtf/TimeWithDynamicClockType.cpp: * wtf/TimeWithDynamicClockType.h: * wtf/TimingScope.cpp: * wtf/TinyLRUCache.h: * wtf/TinyPtrSet.h: * wtf/TriState.h: * wtf/TypeCasts.h: * wtf/UUID.cpp: * wtf/UnionFind.h: * wtf/VMTags.h: * wtf/ValueCheck.h: * wtf/Vector.h: * wtf/VectorTraits.h: * wtf/WallTime.cpp: * wtf/WallTime.h: * wtf/WeakPtr.h: * wtf/WeakRandom.h: * wtf/WordLock.cpp: * wtf/WordLock.h: * wtf/WorkQueue.cpp: * wtf/WorkQueue.h: * wtf/WorkerPool.cpp: * wtf/cf/LanguageCF.cpp: * wtf/cf/RunLoopCF.cpp: * wtf/cocoa/Entitlements.mm: * wtf/cocoa/MachSendRight.cpp: * wtf/cocoa/MainThreadCocoa.mm: * wtf/cocoa/MemoryFootprintCocoa.cpp: * wtf/cocoa/WorkQueueCocoa.cpp: * wtf/dtoa.cpp: * wtf/dtoa.h: * wtf/ios/WebCoreThread.cpp: * wtf/ios/WebCoreThread.h: * wtf/mac/AppKitCompatibilityDeclarations.h: * wtf/mac/DeprecatedSymbolsUsedBySafari.mm: * wtf/mbmalloc.cpp: * wtf/persistence/PersistentCoders.cpp: * wtf/persistence/PersistentDecoder.cpp: * wtf/persistence/PersistentEncoder.cpp: * wtf/spi/cf/CFBundleSPI.h: * wtf/spi/darwin/CommonCryptoSPI.h: * wtf/text/ASCIIFastPath.h: * wtf/text/ASCIILiteral.cpp: * wtf/text/AtomicString.cpp: * wtf/text/AtomicString.h: * wtf/text/AtomicStringHash.h: * wtf/text/AtomicStringImpl.cpp: * wtf/text/AtomicStringImpl.h: * wtf/text/AtomicStringTable.cpp: * wtf/text/AtomicStringTable.h: * wtf/text/Base64.cpp: * wtf/text/CString.cpp: * wtf/text/CString.h: * wtf/text/ConversionMode.h: * wtf/text/ExternalStringImpl.cpp: * wtf/text/IntegerToStringConversion.h: * wtf/text/LChar.h: * wtf/text/LineEnding.cpp: * wtf/text/StringBuffer.h: * wtf/text/StringBuilder.cpp: * wtf/text/StringBuilder.h: * wtf/text/StringBuilderJSON.cpp: * wtf/text/StringCommon.h: * wtf/text/StringConcatenate.h: * wtf/text/StringHash.h: * wtf/text/StringImpl.cpp: * wtf/text/StringImpl.h: * wtf/text/StringOperators.h: * wtf/text/StringView.cpp: * wtf/text/StringView.h: * wtf/text/SymbolImpl.cpp: * wtf/text/SymbolRegistry.cpp: * wtf/text/SymbolRegistry.h: * wtf/text/TextBreakIterator.cpp: * wtf/text/TextBreakIterator.h: * wtf/text/TextBreakIteratorInternalICU.h: * wtf/text/TextPosition.h: * wtf/text/TextStream.cpp: * wtf/text/UniquedStringImpl.h: * wtf/text/WTFString.cpp: * wtf/text/WTFString.h: * wtf/text/cocoa/StringCocoa.mm: * wtf/text/cocoa/StringViewCocoa.mm: * wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp: * wtf/text/icu/UTextProvider.cpp: * wtf/text/icu/UTextProvider.h: * wtf/text/icu/UTextProviderLatin1.cpp: * wtf/text/icu/UTextProviderLatin1.h: * wtf/text/icu/UTextProviderUTF16.cpp: * wtf/text/icu/UTextProviderUTF16.h: * wtf/threads/BinarySemaphore.cpp: * wtf/threads/BinarySemaphore.h: * wtf/threads/Signals.cpp: * wtf/unicode/CharacterNames.h: * wtf/unicode/Collator.h: * wtf/unicode/CollatorDefault.cpp: * wtf/unicode/UTF8.cpp: * wtf/unicode/UTF8.h: Tools: Put WorkQueue in namespace DRT so it does not conflict with WTF::WorkQueue. * DumpRenderTree/TestRunner.cpp: (TestRunner::queueLoadHTMLString): (TestRunner::queueLoadAlternateHTMLString): (TestRunner::queueBackNavigation): (TestRunner::queueForwardNavigation): (TestRunner::queueLoadingScript): (TestRunner::queueNonLoadingScript): (TestRunner::queueReload): * DumpRenderTree/WorkQueue.cpp: (WorkQueue::singleton): Deleted. (WorkQueue::WorkQueue): Deleted. (WorkQueue::queue): Deleted. (WorkQueue::dequeue): Deleted. (WorkQueue::count): Deleted. (WorkQueue::clear): Deleted. (WorkQueue::processWork): Deleted. * DumpRenderTree/WorkQueue.h: (WorkQueue::setFrozen): Deleted. * DumpRenderTree/WorkQueueItem.h: * DumpRenderTree/mac/DumpRenderTree.mm: (runTest): * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate processWork:]): (-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]): * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::notifyDone): (TestRunner::forceImmediateCompletion): (TestRunner::queueLoad): * DumpRenderTree/win/DumpRenderTree.cpp: (runTest): * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::processWork): (FrameLoadDelegate::locationChangeDone): * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::notifyDone): (TestRunner::forceImmediateCompletion): (TestRunner::queueLoad): Canonical link: https://commits.webkit.org/205473@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-15 14:24:49 +00:00
#pragma once
JIT heuristics should be hyperbolic https://bugs.webkit.org/show_bug.cgi?id=80055 <rdar://problem/10922260> Source/JavaScriptCore: Reviewed by Oliver Hunt. Added tracking of the amount of executable memory typically used for a bytecode instruction. Modified the execution counter scheme to use this, and the amount of free memory, to determine how long to wait before invoking the JIT. The result is that even if we bomb the VM with more code than can fit in our executable memory pool, we still keep running and almost never run out of executable memory - which ensures that if we have to JIT something critical, then we'll likely have enough memory to do so. This also does not regress performance on the three main benchmarks. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::predictedMachineCodeSize): (JSC): (JSC::CodeBlock::usesOpcode): * bytecode/CodeBlock.h: (CodeBlock): (JSC::CodeBlock::checkIfJITThresholdReached): (JSC::CodeBlock::dontJITAnytimeSoon): (JSC::CodeBlock::jitAfterWarmUp): (JSC::CodeBlock::jitSoon): (JSC::CodeBlock::llintExecuteCounter): (JSC::CodeBlock::counterValueForOptimizeAfterWarmUp): (JSC::CodeBlock::counterValueForOptimizeAfterLongWarmUp): (JSC::CodeBlock::addressOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): (JSC::CodeBlock::offsetOfJITExecutionTotalCount): (JSC::CodeBlock::jitExecuteCounter): (JSC::CodeBlock::checkIfOptimizationThresholdReached): (JSC::CodeBlock::optimizeNextInvocation): (JSC::CodeBlock::dontOptimizeAnytimeSoon): (JSC::CodeBlock::optimizeAfterWarmUp): (JSC::CodeBlock::optimizeAfterLongWarmUp): (JSC::CodeBlock::optimizeSoon): * bytecode/ExecutionCounter.cpp: Added. (JSC): (JSC::ExecutionCounter::ExecutionCounter): (JSC::ExecutionCounter::checkIfThresholdCrossedAndSet): (JSC::ExecutionCounter::setNewThreshold): (JSC::ExecutionCounter::deferIndefinitely): (JSC::ExecutionCounter::applyMemoryUsageHeuristics): (JSC::ExecutionCounter::applyMemoryUsageHeuristicsAndConvertToInt): (JSC::ExecutionCounter::hasCrossedThreshold): (JSC::ExecutionCounter::setThreshold): (JSC::ExecutionCounter::reset): * bytecode/ExecutionCounter.h: Added. (JSC): (ExecutionCounter): (JSC::ExecutionCounter::formattedTotalCount): * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * jit/ExecutableAllocator.cpp: (JSC::DemandExecutableAllocator::allocateNewSpace): (JSC::ExecutableAllocator::underMemoryPressure): (JSC): (JSC::ExecutableAllocator::memoryPressureMultiplier): * jit/ExecutableAllocator.h: * jit/ExecutableAllocatorFixedVMPool.cpp: (JSC::ExecutableAllocator::memoryPressureMultiplier): (JSC): * jit/JIT.cpp: (JSC::JIT::privateCompile): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * llint/LLIntSlowPaths.cpp: (JSC::LLInt::jitCompileAndSetHeuristics): * llint/LowLevelInterpreter32_64.asm: * runtime/JSGlobalData.h: (JSGlobalData): * runtime/Options.cpp: (Options): (JSC::Options::initializeOptions): * runtime/Options.h: (Options): * wtf/SimpleStats.h: Added. (WTF): (SimpleStats): (WTF::SimpleStats::SimpleStats): (WTF::SimpleStats::add): (WTF::SimpleStats::operator!): (WTF::SimpleStats::count): (WTF::SimpleStats::sum): (WTF::SimpleStats::sumOfSquares): (WTF::SimpleStats::mean): (WTF::SimpleStats::variance): (WTF::SimpleStats::standardDeviation): Source/WebCore: Reviewed by Oliver Hunt. No new tests, since there's no new functionality. * ForwardingHeaders/wtf/SimpleStats.h: Added. Canonical link: https://commits.webkit.org/97373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-05 06:52:44 +00:00
Make WTF public headers use fully-qualified include paths and remove ForwardingHeaders/wtf https://bugs.webkit.org/show_bug.cgi?id=80363 Reviewed by Mark Rowe. Source/JavaScriptCore: Historically WTF has been part of JavaScriptCore, and on Mac and Windows its headers have appeared as part of the "private" headers exported by JavaScriptCore. All of the WTF headers there are "flattened" into a single private headers directory, and WebCore, WebKit and WebKit2 have used "ForwardingHeaders" to re-map fully-qualified <wtf/text/Foo.h> includes to simple <JavaScriptCore/Foo.h> includes. However, very soon, we are moving the WTF source code out of JavaScriptCore into its own directory and project. As part of such, the WTF headers will no longer be part of the JavaScriptCore private interfaces. In preparation for that, this change makes both the Mac and Win builds export WTF headers in a non-flattened manner. On Mac, that means into usr/local/include/wtf (and subdirectories), on Windows for now that means JavaScriptCore/wtf (and subdirectories). There are 5 parts to this change. 1. Updates the JavaScriptCore XCode and VCProj files to actually install these headers (and header directories) into the appropriate places in the build directory. 2. Updates JavaScriptCore.xcodeproj to look for these WTF headers in this install location (WebCore, WebKit, etc. had already been taught to look in previous patches). 3. Fixes all JavaScriptCore source files, and WTF headers to include WTF headers using fully qualified paths. 4. Stops the Mac and Win builds from installing these WTF headers in their old "flattened" location. 5. Removes WebCore and WebKit ForwardingHeaders/wtf directories now that the flattened headers no longer exist. Unfortunately we see no way to do this change in smaller parts, since all of these steps are interdependant. It is possible there are internal Apple projects which depend on JavaScriptCore/Foo.h working for WTF headers, those will have to be updated to use <wtf/Foo.h> after this change. I've discussed this proposed change at length with Mark Rowe, and my understanding is they are ready for (and interested in) this change happening. * API/tests/JSNode.c: * API/tests/JSNodeList.c: * Configurations/Base.xcconfig: * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: * JavaScriptCore.xcodeproj/project.pbxproj: * assembler/MacroAssemblerCodeRef.h: * bytecompiler/BytecodeGenerator.h: * dfg/DFGOperations.cpp: * heap/GCAssertions.h: * heap/HandleHeap.h: * heap/HandleStack.h: * heap/MarkedSpace.h: * heap/PassWeak.h: * heap/Strong.h: * heap/Weak.h: * jit/HostCallReturnValue.cpp: * jit/JIT.cpp: * jit/JITStubs.cpp: * jit/ThunkGenerators.cpp: * parser/Lexer.cpp: * runtime/Completion.cpp: * runtime/Executable.cpp: * runtime/Identifier.h: * runtime/InitializeThreading.cpp: * runtime/JSDateMath.cpp: * runtime/JSGlobalObjectFunctions.cpp: * runtime/JSStringBuilder.h: * runtime/JSVariableObject.h: * runtime/NumberPrototype.cpp: * runtime/WriteBarrier.h: * tools/CodeProfile.cpp: * tools/TieredMMapArray.h: * wtf/AVLTree.h: * wtf/Alignment.h: * wtf/AlwaysInline.h: * wtf/ArrayBufferView.h: * wtf/Assertions.h: * wtf/Atomics.h: * wtf/Bitmap.h: * wtf/BoundsCheckedPointer.h: * wtf/CheckedArithmetic.h: * wtf/Deque.h: * wtf/ExportMacros.h: * wtf/FastAllocBase.h: * wtf/FastMalloc.h: * wtf/Float32Array.h: * wtf/Float64Array.h: * wtf/Functional.h: * wtf/HashCountedSet.h: * wtf/HashFunctions.h: * wtf/HashMap.h: * wtf/HashSet.h: * wtf/HashTable.h: * wtf/HashTraits.h: * wtf/Int16Array.h: * wtf/Int32Array.h: * wtf/Int8Array.h: * wtf/IntegralTypedArrayBase.h: * wtf/ListHashSet.h: * wtf/MainThread.h: * wtf/MetaAllocator.h: * wtf/Noncopyable.h: * wtf/OwnArrayPtr.h: * wtf/OwnPtr.h: * wtf/PackedIntVector.h: * wtf/ParallelJobs.h: * wtf/PassOwnArrayPtr.h: * wtf/PassOwnPtr.h: * wtf/PassRefPtr.h: * wtf/PassTraits.h: * wtf/Platform.h: * wtf/PossiblyNull.h: * wtf/RefCounted.h: * wtf/RefCountedLeakCounter.h: * wtf/RefPtr.h: * wtf/RetainPtr.h: * wtf/SimpleStats.h: * wtf/Spectrum.h: * wtf/StdLibExtras.h: * wtf/TCPageMap.h: * wtf/TemporaryChange.h: * wtf/ThreadSafeRefCounted.h: * wtf/Threading.h: * wtf/ThreadingPrimitives.h: * wtf/TypeTraits.h: * wtf/TypedArrayBase.h: * wtf/Uint16Array.h: * wtf/Uint32Array.h: * wtf/Uint8Array.h: * wtf/Uint8ClampedArray.h: * wtf/UnusedParam.h: * wtf/Vector.h: * wtf/VectorTraits.h: * wtf/dtoa/double-conversion.h: * wtf/dtoa/utils.h: * wtf/gobject/GRefPtr.h: * wtf/gobject/GlibUtilities.h: * wtf/text/AtomicString.h: * wtf/text/AtomicStringImpl.h: * wtf/text/CString.h: * wtf/text/StringConcatenate.h: * wtf/text/StringHash.h: * wtf/text/WTFString.h: * wtf/unicode/CharacterNames.h: * wtf/unicode/UTF8.h: * wtf/unicode/glib/UnicodeGLib.h: * wtf/unicode/qt4/UnicodeQt4.h: * wtf/unicode/wince/UnicodeWinCE.h: * wtf/url/api/ParsedURL.h: * wtf/url/api/URLString.h: * wtf/wince/FastMallocWinCE.h: * yarr/YarrJIT.cpp: Source/WebCore: ForwardingHeaders/wtf is no longer needed (or functional) now that JavaScriptCore no longer includes the WTF headers as private headers. * DerivedSources.make: * ForwardingHeaders/wtf/ASCIICType.h: Removed. * ForwardingHeaders/wtf/AVLTree.h: Removed. * ForwardingHeaders/wtf/Alignment.h: Removed. * ForwardingHeaders/wtf/AlwaysInline.h: Removed. * ForwardingHeaders/wtf/ArrayBuffer.h: Removed. * ForwardingHeaders/wtf/ArrayBufferView.h: Removed. * ForwardingHeaders/wtf/Assertions.h: Removed. * ForwardingHeaders/wtf/Atomics.h: Removed. * ForwardingHeaders/wtf/Bitmap.h: Removed. * ForwardingHeaders/wtf/BloomFilter.h: Removed. * ForwardingHeaders/wtf/BumpPointerAllocator.h: Removed. * ForwardingHeaders/wtf/ByteArray.h: Removed. * ForwardingHeaders/wtf/CheckedArithmetic.h: Removed. * ForwardingHeaders/wtf/CheckedBoolean.h: Removed. * ForwardingHeaders/wtf/Compiler.h: Removed. * ForwardingHeaders/wtf/Complex.h: Removed. * ForwardingHeaders/wtf/CryptographicallyRandomNumber.h: Removed. * ForwardingHeaders/wtf/CurrentTime.h: Removed. * ForwardingHeaders/wtf/DataLog.h: Removed. * ForwardingHeaders/wtf/DateInstanceCache.h: Removed. * ForwardingHeaders/wtf/DateMath.h: Removed. * ForwardingHeaders/wtf/DecimalNumber.h: Removed. * ForwardingHeaders/wtf/Decoder.h: Removed. * ForwardingHeaders/wtf/Deque.h: Removed. * ForwardingHeaders/wtf/DisallowCType.h: Removed. * ForwardingHeaders/wtf/DoublyLinkedList.h: Removed. * ForwardingHeaders/wtf/DynamicAnnotations.h: Removed. * ForwardingHeaders/wtf/Encoder.h: Removed. * ForwardingHeaders/wtf/ExportMacros.h: Removed. * ForwardingHeaders/wtf/FastAllocBase.h: Removed. * ForwardingHeaders/wtf/FastMalloc.h: Removed. * ForwardingHeaders/wtf/FixedArray.h: Removed. * ForwardingHeaders/wtf/Float32Array.h: Removed. * ForwardingHeaders/wtf/Float64Array.h: Removed. * ForwardingHeaders/wtf/Forward.h: Removed. * ForwardingHeaders/wtf/Functional.h: Removed. * ForwardingHeaders/wtf/GetPtr.h: Removed. * ForwardingHeaders/wtf/HashCountedSet.h: Removed. * ForwardingHeaders/wtf/HashFunctions.h: Removed. * ForwardingHeaders/wtf/HashMap.h: Removed. * ForwardingHeaders/wtf/HashSet.h: Removed. * ForwardingHeaders/wtf/HashTable.h: Removed. * ForwardingHeaders/wtf/HashTraits.h: Removed. * ForwardingHeaders/wtf/HexNumber.h: Removed. * ForwardingHeaders/wtf/Int16Array.h: Removed. * ForwardingHeaders/wtf/Int32Array.h: Removed. * ForwardingHeaders/wtf/Int8Array.h: Removed. * ForwardingHeaders/wtf/ListHashSet.h: Removed. * ForwardingHeaders/wtf/ListRefPtr.h: Removed. * ForwardingHeaders/wtf/Locker.h: Removed. * ForwardingHeaders/wtf/MD5.h: Removed. * ForwardingHeaders/wtf/MainThread.h: Removed. * ForwardingHeaders/wtf/MathExtras.h: Removed. * ForwardingHeaders/wtf/MessageQueue.h: Removed. * ForwardingHeaders/wtf/MetaAllocator.h: Removed. * ForwardingHeaders/wtf/MetaAllocatorHandle.h: Removed. * ForwardingHeaders/wtf/NonCopyingSort.h: Removed. * ForwardingHeaders/wtf/Noncopyable.h: Removed. * ForwardingHeaders/wtf/NotFound.h: Removed. * ForwardingHeaders/wtf/OSAllocator.h: Removed. * ForwardingHeaders/wtf/OwnArrayPtr.h: Removed. * ForwardingHeaders/wtf/OwnPtr.h: Removed. * ForwardingHeaders/wtf/OwnPtrCommon.h: Removed. * ForwardingHeaders/wtf/PageAllocation.h: Removed. * ForwardingHeaders/wtf/PageAllocationAligned.h: Removed. * ForwardingHeaders/wtf/PageBlock.h: Removed. * ForwardingHeaders/wtf/PageReservation.h: Removed. * ForwardingHeaders/wtf/ParallelJobs.h: Removed. * ForwardingHeaders/wtf/PassOwnArrayPtr.h: Removed. * ForwardingHeaders/wtf/PassOwnPtr.h: Removed. * ForwardingHeaders/wtf/PassRefPtr.h: Removed. * ForwardingHeaders/wtf/Platform.h: Removed. * ForwardingHeaders/wtf/PossiblyNull.h: Removed. * ForwardingHeaders/wtf/RandomNumber.h: Removed. * ForwardingHeaders/wtf/RedBlackTree.h: Removed. * ForwardingHeaders/wtf/RefCounted.h: Removed. * ForwardingHeaders/wtf/RefCountedLeakCounter.h: Removed. * ForwardingHeaders/wtf/RefPtr.h: Removed. * ForwardingHeaders/wtf/RetainPtr.h: Removed. * ForwardingHeaders/wtf/SHA1.h: Removed. * ForwardingHeaders/wtf/SegmentedVector.h: Removed. * ForwardingHeaders/wtf/SimpleStats.h: Removed. * ForwardingHeaders/wtf/Spectrum.h: Removed. * ForwardingHeaders/wtf/StackBounds.h: Removed. * ForwardingHeaders/wtf/StaticConstructors.h: Removed. * ForwardingHeaders/wtf/StdLibExtras.h: Removed. * ForwardingHeaders/wtf/StringExtras.h: Removed. * ForwardingHeaders/wtf/StringHasher.h: Removed. * ForwardingHeaders/wtf/TemporaryChange.h: Removed. * ForwardingHeaders/wtf/ThreadRestrictionVerifier.h: Removed. * ForwardingHeaders/wtf/ThreadSafeRefCounted.h: Removed. * ForwardingHeaders/wtf/ThreadSpecific.h: Removed. * ForwardingHeaders/wtf/Threading.h: Removed. * ForwardingHeaders/wtf/ThreadingPrimitives.h: Removed. * ForwardingHeaders/wtf/TypeTraits.h: Removed. * ForwardingHeaders/wtf/Uint16Array.h: Removed. * ForwardingHeaders/wtf/Uint32Array.h: Removed. * ForwardingHeaders/wtf/Uint8Array.h: Removed. * ForwardingHeaders/wtf/Uint8ClampedArray.h: Removed. * ForwardingHeaders/wtf/UnusedParam.h: Removed. * ForwardingHeaders/wtf/VMTags.h: Removed. * ForwardingHeaders/wtf/ValueCheck.h: Removed. * ForwardingHeaders/wtf/Vector.h: Removed. * ForwardingHeaders/wtf/VectorTraits.h: Removed. * ForwardingHeaders/wtf/WTFThreadData.h: Removed. * ForwardingHeaders/wtf/dtoa.h: Removed. * ForwardingHeaders/wtf/dtoa/double-conversion.h: Removed. * ForwardingHeaders/wtf/text/ASCIIFastPath.h: Removed. * ForwardingHeaders/wtf/text/AtomicString.h: Removed. * ForwardingHeaders/wtf/text/AtomicStringHash.h: Removed. * ForwardingHeaders/wtf/text/AtomicStringImpl.h: Removed. * ForwardingHeaders/wtf/text/CString.h: Removed. * ForwardingHeaders/wtf/text/StringBuffer.h: Removed. * ForwardingHeaders/wtf/text/StringBuilder.h: Removed. * ForwardingHeaders/wtf/text/StringConcatenate.h: Removed. * ForwardingHeaders/wtf/text/StringHash.h: Removed. * ForwardingHeaders/wtf/text/StringImpl.h: Removed. * ForwardingHeaders/wtf/text/TextPosition.h: Removed. * ForwardingHeaders/wtf/text/WTFString.h: Removed. * ForwardingHeaders/wtf/unicode/CharacterNames.h: Removed. * ForwardingHeaders/wtf/unicode/Collator.h: Removed. * ForwardingHeaders/wtf/unicode/UTF8.h: Removed. * ForwardingHeaders/wtf/unicode/Unicode.h: Removed. * ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h: Removed. * ForwardingHeaders/wtf/unicode/wince/UnicodeWince.h: Removed. * ForwardingHeaders/wtf/url/ParsedURL.h: Removed. Source/WebKit/mac: ForwardingHeaders/wtf is no longer necessary (or functional) now that JavaScriptCore no longer includes the WTF headers as private headers. * ForwardingHeaders/wtf/ASCIICType.h: Removed. * ForwardingHeaders/wtf/AlwaysInline.h: Removed. * ForwardingHeaders/wtf/Assertions.h: Removed. * ForwardingHeaders/wtf/Deque.h: Removed. * ForwardingHeaders/wtf/DisallowCType.h: Removed. * ForwardingHeaders/wtf/FastMalloc.h: Removed. * ForwardingHeaders/wtf/Forward.h: Removed. * ForwardingHeaders/wtf/GetPtr.h: Removed. * ForwardingHeaders/wtf/HashCountedSet.h: Removed. * ForwardingHeaders/wtf/HashMap.h: Removed. * ForwardingHeaders/wtf/HashSet.h: Removed. * ForwardingHeaders/wtf/HashTraits.h: Removed. * ForwardingHeaders/wtf/ListHashSet.h: Removed. * ForwardingHeaders/wtf/ListRefPtr.h: Removed. * ForwardingHeaders/wtf/Locker.h: Removed. * ForwardingHeaders/wtf/MathExtras.h: Removed. * ForwardingHeaders/wtf/Noncopyable.h: Removed. * ForwardingHeaders/wtf/OwnArrayPtr.h: Removed. * ForwardingHeaders/wtf/OwnPtr.h: Removed. * ForwardingHeaders/wtf/OwnPtrCommon.h: Removed. * ForwardingHeaders/wtf/PassOwnPtr.h: Removed. * ForwardingHeaders/wtf/PassRefPtr.h: Removed. * ForwardingHeaders/wtf/Platform.h: Removed. * ForwardingHeaders/wtf/RefCounted.h: Removed. * ForwardingHeaders/wtf/RefCountedLeakCounter.h: Removed. * ForwardingHeaders/wtf/RefPtr.h: Removed. * ForwardingHeaders/wtf/RetainPtr.h: Removed. * ForwardingHeaders/wtf/StdLibExtras.h: Removed. * ForwardingHeaders/wtf/TemporaryChange.h: Removed. * ForwardingHeaders/wtf/Threading.h: Removed. * ForwardingHeaders/wtf/UnusedParam.h: Removed. * ForwardingHeaders/wtf/VMTags.h: Removed. * ForwardingHeaders/wtf/ValueCheck.h: Removed. * ForwardingHeaders/wtf/Vector.h: Removed. * ForwardingHeaders/wtf/VectorTraits.h: Removed. * ForwardingHeaders/wtf/unicode/Unicode.h: Removed. * ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h: Removed. Canonical link: https://commits.webkit.org/97650@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-07 08:50:54 +00:00
#include <wtf/MathExtras.h>
#include <wtf/StdLibExtras.h>
JIT heuristics should be hyperbolic https://bugs.webkit.org/show_bug.cgi?id=80055 <rdar://problem/10922260> Source/JavaScriptCore: Reviewed by Oliver Hunt. Added tracking of the amount of executable memory typically used for a bytecode instruction. Modified the execution counter scheme to use this, and the amount of free memory, to determine how long to wait before invoking the JIT. The result is that even if we bomb the VM with more code than can fit in our executable memory pool, we still keep running and almost never run out of executable memory - which ensures that if we have to JIT something critical, then we'll likely have enough memory to do so. This also does not regress performance on the three main benchmarks. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::predictedMachineCodeSize): (JSC): (JSC::CodeBlock::usesOpcode): * bytecode/CodeBlock.h: (CodeBlock): (JSC::CodeBlock::checkIfJITThresholdReached): (JSC::CodeBlock::dontJITAnytimeSoon): (JSC::CodeBlock::jitAfterWarmUp): (JSC::CodeBlock::jitSoon): (JSC::CodeBlock::llintExecuteCounter): (JSC::CodeBlock::counterValueForOptimizeAfterWarmUp): (JSC::CodeBlock::counterValueForOptimizeAfterLongWarmUp): (JSC::CodeBlock::addressOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): (JSC::CodeBlock::offsetOfJITExecutionTotalCount): (JSC::CodeBlock::jitExecuteCounter): (JSC::CodeBlock::checkIfOptimizationThresholdReached): (JSC::CodeBlock::optimizeNextInvocation): (JSC::CodeBlock::dontOptimizeAnytimeSoon): (JSC::CodeBlock::optimizeAfterWarmUp): (JSC::CodeBlock::optimizeAfterLongWarmUp): (JSC::CodeBlock::optimizeSoon): * bytecode/ExecutionCounter.cpp: Added. (JSC): (JSC::ExecutionCounter::ExecutionCounter): (JSC::ExecutionCounter::checkIfThresholdCrossedAndSet): (JSC::ExecutionCounter::setNewThreshold): (JSC::ExecutionCounter::deferIndefinitely): (JSC::ExecutionCounter::applyMemoryUsageHeuristics): (JSC::ExecutionCounter::applyMemoryUsageHeuristicsAndConvertToInt): (JSC::ExecutionCounter::hasCrossedThreshold): (JSC::ExecutionCounter::setThreshold): (JSC::ExecutionCounter::reset): * bytecode/ExecutionCounter.h: Added. (JSC): (ExecutionCounter): (JSC::ExecutionCounter::formattedTotalCount): * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * jit/ExecutableAllocator.cpp: (JSC::DemandExecutableAllocator::allocateNewSpace): (JSC::ExecutableAllocator::underMemoryPressure): (JSC): (JSC::ExecutableAllocator::memoryPressureMultiplier): * jit/ExecutableAllocator.h: * jit/ExecutableAllocatorFixedVMPool.cpp: (JSC::ExecutableAllocator::memoryPressureMultiplier): (JSC): * jit/JIT.cpp: (JSC::JIT::privateCompile): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * llint/LLIntSlowPaths.cpp: (JSC::LLInt::jitCompileAndSetHeuristics): * llint/LowLevelInterpreter32_64.asm: * runtime/JSGlobalData.h: (JSGlobalData): * runtime/Options.cpp: (Options): (JSC::Options::initializeOptions): * runtime/Options.h: (Options): * wtf/SimpleStats.h: Added. (WTF): (SimpleStats): (WTF::SimpleStats::SimpleStats): (WTF::SimpleStats::add): (WTF::SimpleStats::operator!): (WTF::SimpleStats::count): (WTF::SimpleStats::sum): (WTF::SimpleStats::sumOfSquares): (WTF::SimpleStats::mean): (WTF::SimpleStats::variance): (WTF::SimpleStats::standardDeviation): Source/WebCore: Reviewed by Oliver Hunt. No new tests, since there's no new functionality. * ForwardingHeaders/wtf/SimpleStats.h: Added. Canonical link: https://commits.webkit.org/97373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-05 06:52:44 +00:00
namespace WTF {
// Simple and cheap way of tracking statistics if you're not worried about chopping on
// the sum of squares (i.e. the sum of squares is unlikely to exceed 2^52).
class SimpleStats {
WTF_MAKE_FAST_ALLOCATED;
JIT heuristics should be hyperbolic https://bugs.webkit.org/show_bug.cgi?id=80055 <rdar://problem/10922260> Source/JavaScriptCore: Reviewed by Oliver Hunt. Added tracking of the amount of executable memory typically used for a bytecode instruction. Modified the execution counter scheme to use this, and the amount of free memory, to determine how long to wait before invoking the JIT. The result is that even if we bomb the VM with more code than can fit in our executable memory pool, we still keep running and almost never run out of executable memory - which ensures that if we have to JIT something critical, then we'll likely have enough memory to do so. This also does not regress performance on the three main benchmarks. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::predictedMachineCodeSize): (JSC): (JSC::CodeBlock::usesOpcode): * bytecode/CodeBlock.h: (CodeBlock): (JSC::CodeBlock::checkIfJITThresholdReached): (JSC::CodeBlock::dontJITAnytimeSoon): (JSC::CodeBlock::jitAfterWarmUp): (JSC::CodeBlock::jitSoon): (JSC::CodeBlock::llintExecuteCounter): (JSC::CodeBlock::counterValueForOptimizeAfterWarmUp): (JSC::CodeBlock::counterValueForOptimizeAfterLongWarmUp): (JSC::CodeBlock::addressOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): (JSC::CodeBlock::offsetOfJITExecutionTotalCount): (JSC::CodeBlock::jitExecuteCounter): (JSC::CodeBlock::checkIfOptimizationThresholdReached): (JSC::CodeBlock::optimizeNextInvocation): (JSC::CodeBlock::dontOptimizeAnytimeSoon): (JSC::CodeBlock::optimizeAfterWarmUp): (JSC::CodeBlock::optimizeAfterLongWarmUp): (JSC::CodeBlock::optimizeSoon): * bytecode/ExecutionCounter.cpp: Added. (JSC): (JSC::ExecutionCounter::ExecutionCounter): (JSC::ExecutionCounter::checkIfThresholdCrossedAndSet): (JSC::ExecutionCounter::setNewThreshold): (JSC::ExecutionCounter::deferIndefinitely): (JSC::ExecutionCounter::applyMemoryUsageHeuristics): (JSC::ExecutionCounter::applyMemoryUsageHeuristicsAndConvertToInt): (JSC::ExecutionCounter::hasCrossedThreshold): (JSC::ExecutionCounter::setThreshold): (JSC::ExecutionCounter::reset): * bytecode/ExecutionCounter.h: Added. (JSC): (ExecutionCounter): (JSC::ExecutionCounter::formattedTotalCount): * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * jit/ExecutableAllocator.cpp: (JSC::DemandExecutableAllocator::allocateNewSpace): (JSC::ExecutableAllocator::underMemoryPressure): (JSC): (JSC::ExecutableAllocator::memoryPressureMultiplier): * jit/ExecutableAllocator.h: * jit/ExecutableAllocatorFixedVMPool.cpp: (JSC::ExecutableAllocator::memoryPressureMultiplier): (JSC): * jit/JIT.cpp: (JSC::JIT::privateCompile): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * llint/LLIntSlowPaths.cpp: (JSC::LLInt::jitCompileAndSetHeuristics): * llint/LowLevelInterpreter32_64.asm: * runtime/JSGlobalData.h: (JSGlobalData): * runtime/Options.cpp: (Options): (JSC::Options::initializeOptions): * runtime/Options.h: (Options): * wtf/SimpleStats.h: Added. (WTF): (SimpleStats): (WTF::SimpleStats::SimpleStats): (WTF::SimpleStats::add): (WTF::SimpleStats::operator!): (WTF::SimpleStats::count): (WTF::SimpleStats::sum): (WTF::SimpleStats::sumOfSquares): (WTF::SimpleStats::mean): (WTF::SimpleStats::variance): (WTF::SimpleStats::standardDeviation): Source/WebCore: Reviewed by Oliver Hunt. No new tests, since there's no new functionality. * ForwardingHeaders/wtf/SimpleStats.h: Added. Canonical link: https://commits.webkit.org/97373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-05 06:52:44 +00:00
public:
SimpleStats()
: m_count(0)
, m_sum(0)
, m_sumOfSquares(0)
{
}
void add(double value)
{
m_count++;
m_sum += value;
m_sumOfSquares += value * value;
}
Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression https://bugs.webkit.org/show_bug.cgi?id=160125 Reviewed by Geoffrey Garen and Keith Miller. JSTests: Most of the things I did properly covered by existing tests, but I found some simple cases of unshifting that had sketchy coverage. * stress/array-storage-array-unshift.js: Added. * stress/contiguous-array-unshift.js: Added. * stress/double-array-unshift.js: Added. * stress/int32-array-unshift.js: Added. Source/bmalloc: I needed to tryMemalign, so I added such a thing. * bmalloc/Allocator.cpp: (bmalloc::Allocator::allocate): (bmalloc::Allocator::tryAllocate): (bmalloc::Allocator::allocateImpl): * bmalloc/Allocator.h: * bmalloc/Cache.h: (bmalloc::Cache::tryAllocate): * bmalloc/bmalloc.h: (bmalloc::api::tryMemalign): Source/JavaScriptCore: In order to make the GC concurrent (bug 149432), we would either need to enable concurrent copying or we would need to not copy. Concurrent copying carries a 1-2% throughput overhead from the barriers alone. Considering that MarkedSpace does a decent job of avoiding fragmentation, it's unlikely that it's worth paying 1-2% throughput for copying. So, we want to get rid of copied space. This change moves copied space's biggest client over to marked space. Moving butterflies to marked space means having them use the new Auxiliary HeapCell allocation path. This is a fairly mechanical change, but it caused performance regressions everywhere, so this change also fixes MarkedSpace's performance issues. At a high level the mechanical changes are: - We use AuxiliaryBarrier instead of CopyBarrier. - We use tryAllocateAuxiliary instead of tryAllocateStorage. I got rid of the silly CheckedBoolean stuff, since it's so much more trouble than it's worth. - The JITs have to emit inlined marked space allocations instead of inline copy space allocations. - Everyone has to get used to zeroing their butterflies after allocation instead of relying on them being pre-zeroed by the GC. Copied space would zero things for you, while marked space doesn't. That's about 1/3 of this change. But this led to performance problems, which I fixed with optimizations that amounted to a major MarkedSpace rewrite: - MarkedSpace always causes internal fragmentation for array allocations because the vector length we choose when we resize usually leads to a cell size that doesn't correspond to any size class. I got around this by making array allocations usually round up vectorLength to the maximum allowed by the size class that we would have allocated in. Also, ensureLengthSlow() and friends first make sure that the requested length can't just be fulfilled with the current allocation size. This safeguard means that not every array allocation has to do size class queries. For example, the fast path of new Array(length) never does any size class queries, under the assumption that (1) the speed gained from avoiding an ensureLengthSlow() call, which then just changes the vectorLength by doing the size class query, is too small to offset the speed lost by doing the query on every allocation and (2) new Array(length) is a pretty good hint that resizing is not very likely. - Size classes in MarkedSpace were way too precise, which led to external fragmentation. This changes MarkedSpace size classes to use a linear progression for very small sizes followed by a geometric progression that naturally transitions to a hyperbolic progression. We want hyperbolic sizes when we get close to blockSize: for example the largest size we want is payloadSize / 2 rounded down, to ensure we get exactly two cells with minimal slop. The next size down should be payloadSize / 3 rounded down, and so on. After the last precise size (80 bytes), we proceed using a geometric progression, but round up each size to minimize slop at the end of the block. This naturally causes the geometric progression to turn hyperbolic for large sizes. The size class configuration happens at VM start-up, so it can be controlled with runtime options. I found that a base of 1.4 works pretty well. - Large allocations caused massive internal fragmentation, since the smallest large allocation had to use exactly blockSize, and the largest small allocation used blockSize / 2. The next size up - the first large allocation size to require two blocks - also had 50% internal fragmentation. This is because we required large allocations to be blockSize aligned, so that MarkedBlock::blockFor() would work. I decided to rewrite all of that. Cells no longer have to be owned by a MarkedBlock. They can now alternatively be owned by a LargeAllocation. These two things are abstracted as CellContainer. You know that a cell is owned by a LargeAllocation if the MarkedBlock::atomSize / 2 bit is set. Basically, large allocations are deliberately misaligned by 8 bytes. This actually works out great since (1) typed arrays won't use large allocations anyway since they have their own malloc fallback and (2) large array butterflies already have a 8 byte header, which means that the 8 byte base misalignment aligns the large array payload on a 16 byte boundary. I took extreme care to make sure that the isLargeAllocation bit checks are as rare as possible; for example, ExecState::vm() skips the check because we know that callees must be small allocations. It's also possible to use template tricks to do one check for cell container kind, and then invoke a function specialized for MarkedBlock or a function specialized for LargeAllocation. LargeAllocation includes stubs for all MarkedBlock methods that get used from functions that are template-specialized like this. That's mostly to speed up the GC marking code. Most other code can use CellContainer API or HeapCell API directly. That's another thing: HeapCell, the common base of JSCell and auxiliary allocations, is now smart enough to do a lot of things for you, like HeapCell::vm(), HeapCell::heap(), HeapCell::isLargeAllocation(), and HeapCell::cellContainer(). The size cutoff for large allocations is runtime-configurable, so long as you don't choose something so small that callees end up large. I found that 400 bytes is roughly optimal. This means that the MarkedBlock size classes end up being: 16, 32, 48, 64, 80, 112, 160, 224, 320 The next size class would have been 432, but that's above the 400 byte cutoff. All of this is configurable with --sizeClassProgression and --largeAllocationCutoff. You can see what size classes you end up with by doing --dumpSizeClasses=true. - Copied space uses 64KB blocks, while marked space used to use 16KB blocks. Allocating a lot of stuff in 16KB blocks was slower than allocating it in 64KB blocks because the GC had a lot of per-block overhead. I removed this overhead: It's now 2x faster to scan all MarkedBlocks because the list that contains the interesting meta-data is allocated on the side, for better locality during a sequential walk. It's no longer necessary to scan MarkedBlocks to find WeakSets, since the sets of WeakSets for eden scan and full scan are maintained on-the-fly. It's no longer necessary to scan all MarkedBlocks to clear mark bits because we now use versioned mark bits: to clear then, just increment the 64-bit heap version. It's no longer necessary to scan retired MarkedBlocks while allocating because marking retires them on-the-fly. It's no longer necessary to sort all blocks in the IncrementalSweeper's snapshot because blocks now know if they are in the snapshot. Put together, these optimizations allowed me to reduce block size to 16KB without losing much performance. There is some small perf loss on JetStream/splay, but not enough to hurt JetStream overall. I tried reducing block sizes further, to 4KB, since that is a progression on membuster. That's not possible yet, since there is still enough per-block overhead yet that such a reduction hurts JetStream too much. I filed a bug about improving this further: https://bugs.webkit.org/show_bug.cgi?id=161581. - Even after all of that, copying butterflies was still faster because it allowed us to skip sweeping dead space. A good GC allocates over dead bytes without explicitly freeing them, so the GC pause is O(size of live), not O(size of live + dead). O(dead) is usually much larger than O(live), especially in an eden collection. Copying satisfies this premise while mark+sweep does not. So, I invented a new kind of allocator: bump'n'pop. Previously, our MarkedSpace allocator was a freelist pop. That's simple and easy to inline but requires that we walk the block to build a free list. This means walking dead space. The new allocator allows totally free MarkedBlocks to simply set up a bump-pointer arena instead. The allocator is a hybrid of bump-pointer and freelist pop. It tries bump first. The bump pointer always bumps by cellSize, so the result of filling a block with bumping looks as if we had used freelist popping to fill it. Additionally, each MarkedBlock now has a bit to quickly tell if the block is entirely free. This makes sweeping O(1) whenever a MarkedBlock is completely empty, which is the common case because of the generational hypothesis: the number of objects that survive an eden collection is a tiny fraction of the number of objects that had been allocated, and this fraction is so small that there are typically fewer than one survivors per MarkedBlock. This change was enough to make this change a net win over tip-of-tree. - FTL now shares the same allocation fast paths as everything else, which is great, because bump'n'pop has gnarly control flow. We don't really want B3 to have to think about that control flow, since it won't be able to improve the machine code we write ourselves. GC fast paths are best written in assembly. So, I've empowered B3 to have even better support for Patchpoint terminals. It's now totally fine for a Patchpoint terminal to be non-Void. So, the new FTL allocation fast paths are just Patchpoint terminals that call through to AssemblyHelpers::emitAllocate(). B3 still reasons about things like constant-folding the size class calculation and constant-hoisting the allocator. Also, I gave the FTL the ability to constant-fold some allocator logic (in case we first assume that we're doing a variable-length allocation but then realize that the length is known). I think it makes sense to have constant folding rules in FTL::Output, or whatever the B3 IR builder is, since this makes lowering easier (you can constant fold during lowering more easily) and it reduces the amount of malloc traffic. In the future, we could teach B3 how to better constant-fold this code. That would require allowing loads to be constant-folded, which is doable but hella tricky. - It used to be that if a logical object allocation required two physical allocations (first the butterfly and then the cell), then the JIT would emit the code in such a way that a failure in the second fast path would cause us to forget the successful first physical allocation. This was pointlessly wasteful. It turns out that it's very cheap to devote a register to storing either the butterfly or null, because the butterfly register is anyway going to be free inside the first allocation. The only overhead here is zeroing the butterfly register. With that in place, we can just pass the butterfly-or-null to the slow path, which can then either allocate a butterfly or not. So now we never waste a successful allocation. This patch implements such a solution both in DFG (where it's easy to do this since we control registers already) and in FTL (where it's annoying, because mutable "butterfly-or-null" variables are hard to say in SSA; also I realized that we had code duplicated the JSArray allocation utility, so I deduplicated it). This came up because in one version of this patch, this wastage would resonate with some Kraken benchmark: the benchmark would always allocate N small things followed by one bigger thing. The problem was I accidentally adjusted the various fixed overheads in MarkedBlock in such a way that the JSObject size class, which both the small and big thing shared for their cell, could hold exactly N cells per MarkedBlock. Then the benchmark would always call slow path when it allocated the big thing. So, it would end up having to allocate the big thing's large butterfly twice, every single time! Ouch! - It used to be that we zeroed CopiedBlocks using memset, and so array allocations enjoyed amortization of the cost of zeroing. This doesn't work anymore - it's now up to the client of the allocator to initialize the object to whatever state they need. It used to be that we would just use a dumb loop. I initially changed this so that we would end up in memset for large allocations, but this didn't actually help performance that much. I got a much better result by playing with different memsets written in assembly. First I wrote one using non-temporal stores. That was a small speed-up over memset. Then I tried the classic "rep stos" approach, and holy cow that version was fast. It's a ~20% speed-up on array allocation microbenchmarks. So, this patch adds code paths to do "rep stos" on x86_64, or memset, or use a loop, as appropriate, for both "contiguous" arrays (holes are zero) and double arrays (holes are PNaN). Note that the JIT always emits either a loop or a flat slab of stores (if the size is known), but those paths in the JIT won't trigger for NewArrayWithSize() if the size is large, since that takes us to the operationNewArrayWithSize() slow path, which calls into JSArray::create(). That's why the optimizations here are all in JSArray::create() - that's the hot place for large arrays that need to be filled with holes. All of this put together gives us neutral perf on JetStream, membuster, and PLT3, a ~1% regression on Speedometer, and up to a 4% regression Kraken. The Kraken regression is because Kraken was allocating exactly 1024 element arrays at a rate of 400MB/sec. This is a best-case scenario for bump allocation. I think that we should fix bmalloc to make up the difference, but take the hit for now because it's a crazy corner case. By comparison, the alternative approach of using a copy barrier would have cost us 1-2%. That's the real apples-to-apples comparison if your premise is that we should have a concurrent GC. After we finish removing copied space, we will be barrier-ready for concurrent GC: we already have a marking barrier and we simply won't need a copying barrier. This change gets us there for the purposes of our benchmarks, since the remaining clients of copied space are not very important. On the other hand, if we keep copying, then getting barrier-ready would mean adding back the copy barrier, which costs more perf. We might get bigger speed-ups once we remove CopiedSpace altogether. That requires moving typed arrays and a few other weird things over to Aux MarkedSpace. This also includes some header sanitization. The introduction of AuxiliaryBarrier, HeapCell, and CellContainer meant that I had to include those files from everywhere. Fortunately, just including JSCInlines.h (instead of manually including the files that includes) is usually enough. So, I made most of JSC's cpp files include JSCInlines.h, which is something that we were already basically doing. In places where JSCInlines.h would be too much, I just included HeapInlines.h. This got weird, because we previously included HeapInlines.h from JSObject.h. That's bad because it led to some circular dependencies, so I fixed it - but that meant having to manually include HeapInlines.h from the places that previously got it implicitly via JSObject.h. But that led to more problems for some reason: I started getting build errors because non-JSC files were having trouble including Opcode.h. That's just silly, since Opcode.h is meant to be an internal JSC header. So, I made it an internal header and made it impossible to include it from outside JSC. This was a lot of work, but it was necessary to get the patch to build on all ports. It's also a net win. There were many places in WebCore that were transitively including a *ton* of JSC headers just because of the JSObject.h->HeapInlines.h edge and a bunch of dependency edges that arose from some public (for WebCore) JSC headers needing Interpreter.h or Opcode.h for bad reasons. * API/JSManagedValue.mm: (-[JSManagedValue initWithValue:]): * API/JSTypedArray.cpp: * API/ObjCCallbackFunction.mm: * API/tests/testapi.mm: (testObjectiveCAPI): (testWeakValue): Deleted. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/builtins/builtins_generate_combined_implementation.py: (BuiltinsCombinedImplementationGenerator.generate_secondary_header_includes): * Scripts/builtins/builtins_generate_internals_wrapper_implementation.py: (BuiltinsInternalsWrapperImplementationGenerator.generate_secondary_header_includes): * Scripts/builtins/builtins_generate_separate_implementation.py: (BuiltinsSeparateImplementationGenerator.generate_secondary_header_includes): * assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::JumpList::link): (JSC::AbstractMacroAssembler::JumpList::linkTo): * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::add32): * assembler/MacroAssemblerCodeRef.cpp: Added. (JSC::MacroAssemblerCodePtr::createLLIntCodePtr): (JSC::MacroAssemblerCodePtr::dumpWithName): (JSC::MacroAssemblerCodePtr::dump): (JSC::MacroAssemblerCodeRef::createLLIntCodeRef): (JSC::MacroAssemblerCodeRef::dump): * assembler/MacroAssemblerCodeRef.h: (JSC::MacroAssemblerCodePtr::createLLIntCodePtr): Deleted. (JSC::MacroAssemblerCodePtr::dumpWithName): Deleted. (JSC::MacroAssemblerCodePtr::dump): Deleted. (JSC::MacroAssemblerCodeRef::createLLIntCodeRef): Deleted. (JSC::MacroAssemblerCodeRef::dump): Deleted. * b3/B3BasicBlock.cpp: (JSC::B3::BasicBlock::appendBoolConstant): * b3/B3BasicBlock.h: * b3/B3DuplicateTails.cpp: * b3/B3StackmapGenerationParams.h: * b3/testb3.cpp: (JSC::B3::testPatchpointTerminalReturnValue): (JSC::B3::run): * bindings/ScriptValue.cpp: * bytecode/AdaptiveInferredPropertyValueWatchpointBase.cpp: * bytecode/BytecodeBasicBlock.cpp: * bytecode/BytecodeLivenessAnalysis.cpp: * bytecode/BytecodeUseDef.h: * bytecode/CallLinkInfo.cpp: (JSC::CallLinkInfo::callTypeFor): * bytecode/CallLinkInfo.h: (JSC::CallLinkInfo::callTypeFor): Deleted. * bytecode/CallLinkStatus.cpp: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::finishCreation): (JSC::CodeBlock::clearLLIntGetByIdCache): (JSC::CodeBlock::predictedMachineCodeSize): * bytecode/CodeBlock.h: (JSC::CodeBlock::jitCodeMap): Deleted. (JSC::clearLLIntGetByIdCache): Deleted. * bytecode/ExecutionCounter.h: * bytecode/Instruction.h: * bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp: (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::fireInternal): * bytecode/ObjectAllocationProfile.h: (JSC::ObjectAllocationProfile::isNull): (JSC::ObjectAllocationProfile::initialize): * bytecode/Opcode.h: (JSC::padOpcodeName): * bytecode/PolymorphicAccess.cpp: (JSC::AccessCase::generateImpl): (JSC::PolymorphicAccess::regenerate): * bytecode/PolymorphicAccess.h: * bytecode/PreciseJumpTargets.cpp: * bytecode/StructureStubInfo.cpp: * bytecode/StructureStubInfo.h: * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedCodeBlock::vm): Deleted. * bytecode/UnlinkedCodeBlock.h: * bytecode/UnlinkedInstructionStream.cpp: * bytecode/UnlinkedInstructionStream.h: * dfg/DFGOperations.cpp: * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::compileMakeRope): (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage): (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage): * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::emitAllocateJSCell): (JSC::DFG::SpeculativeJIT::emitAllocateJSObject): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): (JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): (JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): * dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::handleNode): * ftl/FTLAbstractHeapRepository.h: * ftl/FTLCompile.cpp: * ftl/FTLJITFinalizer.cpp: * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments): (JSC::FTL::DFG::LowerDFGToB3::compileCreateRest): (JSC::FTL::DFG::LowerDFGToB3::allocateArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileMakeRope): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): (JSC::FTL::DFG::LowerDFGToB3::initializeArrayElements): (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorageWithSizeImpl): (JSC::FTL::DFG::LowerDFGToB3::allocateHeapCell): (JSC::FTL::DFG::LowerDFGToB3::allocateCell): (JSC::FTL::DFG::LowerDFGToB3::allocateObject): (JSC::FTL::DFG::LowerDFGToB3::allocatorForSize): (JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject): (JSC::FTL::DFG::LowerDFGToB3::allocateJSArray): (JSC::FTL::DFG::LowerDFGToB3::compileAllocateArrayWithSize): Deleted. * ftl/FTLOutput.cpp: (JSC::FTL::Output::constBool): (JSC::FTL::Output::add): (JSC::FTL::Output::shl): (JSC::FTL::Output::aShr): (JSC::FTL::Output::lShr): (JSC::FTL::Output::zeroExt): (JSC::FTL::Output::equal): (JSC::FTL::Output::notEqual): (JSC::FTL::Output::above): (JSC::FTL::Output::aboveOrEqual): (JSC::FTL::Output::below): (JSC::FTL::Output::belowOrEqual): (JSC::FTL::Output::greaterThan): (JSC::FTL::Output::greaterThanOrEqual): (JSC::FTL::Output::lessThan): (JSC::FTL::Output::lessThanOrEqual): (JSC::FTL::Output::select): (JSC::FTL::Output::appendSuccessor): (JSC::FTL::Output::addIncomingToPhi): * ftl/FTLOutput.h: * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::operator bool): (JSC::FTL::ValueFromBlock::ValueFromBlock): Deleted. * ftl/FTLWeightedTarget.h: (JSC::FTL::WeightedTarget::frequentedBlock): * heap/CellContainer.h: Added. (JSC::CellContainer::CellContainer): (JSC::CellContainer::operator bool): (JSC::CellContainer::isMarkedBlock): (JSC::CellContainer::isLargeAllocation): (JSC::CellContainer::markedBlock): (JSC::CellContainer::largeAllocation): * heap/CellContainerInlines.h: Added. (JSC::CellContainer::isMarked): (JSC::CellContainer::isMarkedOrNewlyAllocated): (JSC::CellContainer::noteMarked): (JSC::CellContainer::cellSize): (JSC::CellContainer::weakSet): (JSC::CellContainer::flipIfNecessary): * heap/ConservativeRoots.cpp: (JSC::ConservativeRoots::ConservativeRoots): (JSC::ConservativeRoots::~ConservativeRoots): (JSC::ConservativeRoots::grow): (JSC::ConservativeRoots::genericAddPointer): (JSC::ConservativeRoots::genericAddSpan): * heap/ConservativeRoots.h: (JSC::ConservativeRoots::roots): * heap/CopyToken.h: * heap/FreeList.cpp: Added. (JSC::FreeList::dump): * heap/FreeList.h: Added. (JSC::FreeList::FreeList): (JSC::FreeList::list): (JSC::FreeList::bump): (JSC::FreeList::operator==): (JSC::FreeList::operator!=): (JSC::FreeList::operator bool): (JSC::FreeList::allocationWillFail): (JSC::FreeList::allocationWillSucceed): * heap/GCTypeMap.h: Added. (JSC::GCTypeMap::operator[]): * heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::lastChanceToFinalize): (JSC::Heap::finalizeUnconditionalFinalizers): (JSC::Heap::markRoots): (JSC::Heap::copyBackingStores): (JSC::Heap::gatherStackRoots): (JSC::Heap::gatherJSStackRoots): (JSC::Heap::gatherScratchBufferRoots): (JSC::Heap::clearLivenessData): (JSC::Heap::visitSmallStrings): (JSC::Heap::visitConservativeRoots): (JSC::Heap::removeDeadCompilerWorklistEntries): (JSC::Heap::gatherExtraHeapSnapshotData): (JSC::Heap::removeDeadHeapSnapshotNodes): (JSC::Heap::visitProtectedObjects): (JSC::Heap::visitArgumentBuffers): (JSC::Heap::visitException): (JSC::Heap::visitStrongHandles): (JSC::Heap::visitHandleStack): (JSC::Heap::visitSamplingProfiler): (JSC::Heap::traceCodeBlocksAndJITStubRoutines): (JSC::Heap::converge): (JSC::Heap::visitWeakHandles): (JSC::Heap::updateObjectCounts): (JSC::Heap::clearUnmarkedExecutables): (JSC::Heap::deleteUnmarkedCompiledCode): (JSC::Heap::collectAllGarbage): (JSC::Heap::collect): (JSC::Heap::collectWithoutAnySweep): (JSC::Heap::collectImpl): (JSC::Heap::suspendCompilerThreads): (JSC::Heap::willStartCollection): (JSC::Heap::flushOldStructureIDTables): (JSC::Heap::flushWriteBarrierBuffer): (JSC::Heap::stopAllocation): (JSC::Heap::prepareForMarking): (JSC::Heap::reapWeakHandles): (JSC::Heap::pruneStaleEntriesFromWeakGCMaps): (JSC::Heap::sweepArrayBuffers): (JSC::MarkedBlockSnapshotFunctor::MarkedBlockSnapshotFunctor): (JSC::MarkedBlockSnapshotFunctor::operator()): (JSC::Heap::snapshotMarkedSpace): (JSC::Heap::deleteSourceProviderCaches): (JSC::Heap::notifyIncrementalSweeper): (JSC::Heap::writeBarrierCurrentlyExecutingCodeBlocks): (JSC::Heap::resetAllocators): (JSC::Heap::updateAllocationLimits): (JSC::Heap::didFinishCollection): (JSC::Heap::resumeCompilerThreads): (JSC::Zombify::visit): (JSC::Heap::forEachCodeBlockImpl): * heap/Heap.h: (JSC::Heap::allocatorForObjectWithoutDestructor): (JSC::Heap::allocatorForObjectWithDestructor): (JSC::Heap::allocatorForAuxiliaryData): (JSC::Heap::jitStubRoutines): (JSC::Heap::codeBlockSet): (JSC::Heap::storageAllocator): Deleted. * heap/HeapCell.h: (JSC::HeapCell::isZapped): Deleted. * heap/HeapCellInlines.h: Added. (JSC::HeapCell::isLargeAllocation): (JSC::HeapCell::cellContainer): (JSC::HeapCell::markedBlock): (JSC::HeapCell::largeAllocation): (JSC::HeapCell::heap): (JSC::HeapCell::vm): (JSC::HeapCell::cellSize): (JSC::HeapCell::allocatorAttributes): (JSC::HeapCell::destructionMode): (JSC::HeapCell::cellKind): * heap/HeapInlines.h: (JSC::Heap::heap): (JSC::Heap::isLive): (JSC::Heap::isMarked): (JSC::Heap::testAndSetMarked): (JSC::Heap::setMarked): (JSC::Heap::cellSize): (JSC::Heap::forEachCodeBlock): (JSC::Heap::allocateObjectOfType): (JSC::Heap::subspaceForObjectOfType): (JSC::Heap::allocatorForObjectOfType): (JSC::Heap::allocateAuxiliary): (JSC::Heap::tryAllocateAuxiliary): (JSC::Heap::tryReallocateAuxiliary): (JSC::Heap::isPointerGCObject): Deleted. (JSC::Heap::isValueGCObject): Deleted. * heap/HeapOperation.cpp: Added. (WTF::printInternal): * heap/HeapOperation.h: * heap/HeapUtil.h: Added. (JSC::HeapUtil::findGCObjectPointersForMarking): (JSC::HeapUtil::isPointerGCObjectJSCell): (JSC::HeapUtil::isValueGCObject): * heap/IncrementalSweeper.cpp: (JSC::IncrementalSweeper::sweepNextBlock): * heap/IncrementalSweeper.h: * heap/LargeAllocation.cpp: Added. (JSC::LargeAllocation::tryCreate): (JSC::LargeAllocation::LargeAllocation): (JSC::LargeAllocation::lastChanceToFinalize): (JSC::LargeAllocation::shrink): (JSC::LargeAllocation::visitWeakSet): (JSC::LargeAllocation::reapWeakSet): (JSC::LargeAllocation::flip): (JSC::LargeAllocation::isEmpty): (JSC::LargeAllocation::sweep): (JSC::LargeAllocation::destroy): (JSC::LargeAllocation::dump): * heap/LargeAllocation.h: Added. (JSC::LargeAllocation::fromCell): (JSC::LargeAllocation::cell): (JSC::LargeAllocation::isLargeAllocation): (JSC::LargeAllocation::heap): (JSC::LargeAllocation::vm): (JSC::LargeAllocation::weakSet): (JSC::LargeAllocation::clearNewlyAllocated): (JSC::LargeAllocation::isNewlyAllocated): (JSC::LargeAllocation::isMarked): (JSC::LargeAllocation::isMarkedOrNewlyAllocated): (JSC::LargeAllocation::isLive): (JSC::LargeAllocation::hasValidCell): (JSC::LargeAllocation::cellSize): (JSC::LargeAllocation::aboveLowerBound): (JSC::LargeAllocation::belowUpperBound): (JSC::LargeAllocation::contains): (JSC::LargeAllocation::attributes): (JSC::LargeAllocation::flipIfNecessary): (JSC::LargeAllocation::flipIfNecessaryConcurrently): (JSC::LargeAllocation::testAndSetMarked): (JSC::LargeAllocation::setMarked): (JSC::LargeAllocation::clearMarked): (JSC::LargeAllocation::noteMarked): (JSC::LargeAllocation::headerSize): * heap/MarkedAllocator.cpp: (JSC::MarkedAllocator::MarkedAllocator): (JSC::MarkedAllocator::isPagedOut): (JSC::MarkedAllocator::retire): (JSC::MarkedAllocator::filterNextBlock): (JSC::MarkedAllocator::setNextBlockToSweep): (JSC::MarkedAllocator::tryAllocateWithoutCollectingImpl): (JSC::MarkedAllocator::tryAllocateWithoutCollecting): (JSC::MarkedAllocator::allocateSlowCase): (JSC::MarkedAllocator::tryAllocateSlowCase): (JSC::MarkedAllocator::allocateSlowCaseImpl): (JSC::blockHeaderSize): (JSC::MarkedAllocator::blockSizeForBytes): (JSC::MarkedAllocator::tryAllocateBlock): (JSC::MarkedAllocator::addBlock): (JSC::MarkedAllocator::removeBlock): (JSC::MarkedAllocator::stopAllocating): (JSC::MarkedAllocator::reset): (JSC::MarkedAllocator::lastChanceToFinalize): (JSC::MarkedAllocator::setFreeList): (JSC::isListPagedOut): Deleted. (JSC::MarkedAllocator::tryAllocateHelper): Deleted. (JSC::MarkedAllocator::tryPopFreeList): Deleted. (JSC::MarkedAllocator::tryAllocate): Deleted. (JSC::MarkedAllocator::allocateBlock): Deleted. * heap/MarkedAllocator.h: (JSC::MarkedAllocator::takeLastActiveBlock): (JSC::MarkedAllocator::offsetOfFreeList): (JSC::MarkedAllocator::offsetOfCellSize): (JSC::MarkedAllocator::tryAllocate): (JSC::MarkedAllocator::allocate): (JSC::MarkedAllocator::forEachBlock): (JSC::MarkedAllocator::offsetOfFreeListHead): Deleted. (JSC::MarkedAllocator::MarkedAllocator): Deleted. (JSC::MarkedAllocator::init): Deleted. (JSC::MarkedAllocator::stopAllocating): Deleted. * heap/MarkedBlock.cpp: (JSC::MarkedBlock::tryCreate): (JSC::MarkedBlock::Handle::Handle): (JSC::MarkedBlock::Handle::~Handle): (JSC::MarkedBlock::MarkedBlock): (JSC::MarkedBlock::Handle::specializedSweep): (JSC::MarkedBlock::Handle::sweep): (JSC::MarkedBlock::Handle::sweepHelperSelectScribbleMode): (JSC::MarkedBlock::Handle::sweepHelperSelectStateAndSweepMode): (JSC::MarkedBlock::Handle::unsweepWithNoNewlyAllocated): (JSC::SetNewlyAllocatedFunctor::SetNewlyAllocatedFunctor): (JSC::SetNewlyAllocatedFunctor::operator()): (JSC::MarkedBlock::Handle::stopAllocating): (JSC::MarkedBlock::Handle::lastChanceToFinalize): (JSC::MarkedBlock::Handle::resumeAllocating): (JSC::MarkedBlock::Handle::zap): (JSC::MarkedBlock::Handle::forEachFreeCell): (JSC::MarkedBlock::flipIfNecessary): (JSC::MarkedBlock::Handle::flipIfNecessary): (JSC::MarkedBlock::flipIfNecessarySlow): (JSC::MarkedBlock::flipIfNecessaryConcurrentlySlow): (JSC::MarkedBlock::clearMarks): (JSC::MarkedBlock::assertFlipped): (JSC::MarkedBlock::needsFlip): (JSC::MarkedBlock::Handle::needsFlip): (JSC::MarkedBlock::Handle::willRemoveBlock): (JSC::MarkedBlock::Handle::didConsumeFreeList): (JSC::MarkedBlock::markCount): (JSC::MarkedBlock::Handle::isEmpty): (JSC::MarkedBlock::clearHasAnyMarked): (JSC::MarkedBlock::noteMarkedSlow): (WTF::printInternal): (JSC::MarkedBlock::create): Deleted. (JSC::MarkedBlock::destroy): Deleted. (JSC::MarkedBlock::callDestructor): Deleted. (JSC::MarkedBlock::specializedSweep): Deleted. (JSC::MarkedBlock::sweep): Deleted. (JSC::MarkedBlock::sweepHelper): Deleted. (JSC::MarkedBlock::stopAllocating): Deleted. (JSC::MarkedBlock::clearMarksWithCollectionType): Deleted. (JSC::MarkedBlock::lastChanceToFinalize): Deleted. (JSC::MarkedBlock::resumeAllocating): Deleted. (JSC::MarkedBlock::didRetireBlock): Deleted. * heap/MarkedBlock.h: (JSC::MarkedBlock::VoidFunctor::returnValue): (JSC::MarkedBlock::CountFunctor::CountFunctor): (JSC::MarkedBlock::CountFunctor::count): (JSC::MarkedBlock::CountFunctor::returnValue): (JSC::MarkedBlock::Handle::hasAnyNewlyAllocated): (JSC::MarkedBlock::Handle::isOnBlocksToSweep): (JSC::MarkedBlock::Handle::setIsOnBlocksToSweep): (JSC::MarkedBlock::Handle::state): (JSC::MarkedBlock::needsDestruction): (JSC::MarkedBlock::handle): (JSC::MarkedBlock::Handle::block): (JSC::MarkedBlock::firstAtom): (JSC::MarkedBlock::atoms): (JSC::MarkedBlock::isAtomAligned): (JSC::MarkedBlock::Handle::cellAlign): (JSC::MarkedBlock::blockFor): (JSC::MarkedBlock::Handle::allocator): (JSC::MarkedBlock::Handle::heap): (JSC::MarkedBlock::Handle::vm): (JSC::MarkedBlock::vm): (JSC::MarkedBlock::Handle::weakSet): (JSC::MarkedBlock::weakSet): (JSC::MarkedBlock::Handle::shrink): (JSC::MarkedBlock::Handle::visitWeakSet): (JSC::MarkedBlock::Handle::reapWeakSet): (JSC::MarkedBlock::Handle::cellSize): (JSC::MarkedBlock::cellSize): (JSC::MarkedBlock::Handle::attributes): (JSC::MarkedBlock::attributes): (JSC::MarkedBlock::Handle::needsDestruction): (JSC::MarkedBlock::Handle::destruction): (JSC::MarkedBlock::Handle::cellKind): (JSC::MarkedBlock::Handle::markCount): (JSC::MarkedBlock::Handle::size): (JSC::MarkedBlock::atomNumber): (JSC::MarkedBlock::flipIfNecessary): (JSC::MarkedBlock::flipIfNecessaryConcurrently): (JSC::MarkedBlock::Handle::flipIfNecessary): (JSC::MarkedBlock::Handle::flipIfNecessaryConcurrently): (JSC::MarkedBlock::Handle::flipForEdenCollection): (JSC::MarkedBlock::assertFlipped): (JSC::MarkedBlock::Handle::assertFlipped): (JSC::MarkedBlock::isMarked): (JSC::MarkedBlock::testAndSetMarked): (JSC::MarkedBlock::Handle::isNewlyAllocated): (JSC::MarkedBlock::Handle::setNewlyAllocated): (JSC::MarkedBlock::Handle::clearNewlyAllocated): (JSC::MarkedBlock::Handle::isMarkedOrNewlyAllocated): (JSC::MarkedBlock::isMarkedOrNewlyAllocated): (JSC::MarkedBlock::Handle::isLive): (JSC::MarkedBlock::isAtom): (JSC::MarkedBlock::Handle::isLiveCell): (JSC::MarkedBlock::Handle::forEachCell): (JSC::MarkedBlock::Handle::forEachLiveCell): (JSC::MarkedBlock::Handle::forEachDeadCell): (JSC::MarkedBlock::Handle::needsSweeping): (JSC::MarkedBlock::Handle::isAllocated): (JSC::MarkedBlock::Handle::isMarked): (JSC::MarkedBlock::Handle::isFreeListed): (JSC::MarkedBlock::hasAnyMarked): (JSC::MarkedBlock::noteMarked): (WTF::MarkedBlockHash::hash): (JSC::MarkedBlock::FreeList::FreeList): Deleted. (JSC::MarkedBlock::allocator): Deleted. (JSC::MarkedBlock::heap): Deleted. (JSC::MarkedBlock::shrink): Deleted. (JSC::MarkedBlock::visitWeakSet): Deleted. (JSC::MarkedBlock::reapWeakSet): Deleted. (JSC::MarkedBlock::willRemoveBlock): Deleted. (JSC::MarkedBlock::didConsumeFreeList): Deleted. (JSC::MarkedBlock::markCount): Deleted. (JSC::MarkedBlock::isEmpty): Deleted. (JSC::MarkedBlock::destruction): Deleted. (JSC::MarkedBlock::cellKind): Deleted. (JSC::MarkedBlock::size): Deleted. (JSC::MarkedBlock::capacity): Deleted. (JSC::MarkedBlock::setMarked): Deleted. (JSC::MarkedBlock::clearMarked): Deleted. (JSC::MarkedBlock::isNewlyAllocated): Deleted. (JSC::MarkedBlock::setNewlyAllocated): Deleted. (JSC::MarkedBlock::clearNewlyAllocated): Deleted. (JSC::MarkedBlock::isLive): Deleted. (JSC::MarkedBlock::isLiveCell): Deleted. (JSC::MarkedBlock::forEachCell): Deleted. (JSC::MarkedBlock::forEachLiveCell): Deleted. (JSC::MarkedBlock::forEachDeadCell): Deleted. (JSC::MarkedBlock::needsSweeping): Deleted. (JSC::MarkedBlock::isAllocated): Deleted. (JSC::MarkedBlock::isMarkedOrRetired): Deleted. * heap/MarkedSpace.cpp: (JSC::MarkedSpace::initializeSizeClassForStepSize): (JSC::MarkedSpace::MarkedSpace): (JSC::MarkedSpace::~MarkedSpace): (JSC::MarkedSpace::lastChanceToFinalize): (JSC::MarkedSpace::allocate): (JSC::MarkedSpace::tryAllocate): (JSC::MarkedSpace::allocateLarge): (JSC::MarkedSpace::tryAllocateLarge): (JSC::MarkedSpace::sweep): (JSC::MarkedSpace::sweepLargeAllocations): (JSC::MarkedSpace::zombifySweep): (JSC::MarkedSpace::resetAllocators): (JSC::MarkedSpace::visitWeakSets): (JSC::MarkedSpace::reapWeakSets): (JSC::MarkedSpace::stopAllocating): (JSC::MarkedSpace::prepareForMarking): (JSC::MarkedSpace::resumeAllocating): (JSC::MarkedSpace::isPagedOut): (JSC::MarkedSpace::freeBlock): (JSC::MarkedSpace::freeOrShrinkBlock): (JSC::MarkedSpace::shrink): (JSC::MarkedSpace::clearNewlyAllocated): (JSC::VerifyMarked::operator()): (JSC::MarkedSpace::flip): (JSC::MarkedSpace::objectCount): (JSC::MarkedSpace::size): (JSC::MarkedSpace::capacity): (JSC::MarkedSpace::addActiveWeakSet): (JSC::MarkedSpace::didAddBlock): (JSC::MarkedSpace::didAllocateInBlock): (JSC::MarkedSpace::forEachAllocator): Deleted. (JSC::VerifyMarkedOrRetired::operator()): Deleted. (JSC::MarkedSpace::clearMarks): Deleted. * heap/MarkedSpace.h: (JSC::MarkedSpace::sizeClassToIndex): (JSC::MarkedSpace::indexToSizeClass): (JSC::MarkedSpace::version): (JSC::MarkedSpace::blocksWithNewObjects): (JSC::MarkedSpace::largeAllocations): (JSC::MarkedSpace::largeAllocationsNurseryOffset): (JSC::MarkedSpace::largeAllocationsOffsetForThisCollection): (JSC::MarkedSpace::largeAllocationsForThisCollectionBegin): (JSC::MarkedSpace::largeAllocationsForThisCollectionEnd): (JSC::MarkedSpace::largeAllocationsForThisCollectionSize): (JSC::MarkedSpace::forEachLiveCell): (JSC::MarkedSpace::forEachDeadCell): (JSC::MarkedSpace::allocatorFor): (JSC::MarkedSpace::destructorAllocatorFor): (JSC::MarkedSpace::auxiliaryAllocatorFor): (JSC::MarkedSpace::allocateWithoutDestructor): (JSC::MarkedSpace::allocateWithDestructor): (JSC::MarkedSpace::allocateAuxiliary): (JSC::MarkedSpace::tryAllocateAuxiliary): (JSC::MarkedSpace::forEachBlock): (JSC::MarkedSpace::forEachAllocator): (JSC::MarkedSpace::optimalSizeFor): (JSC::MarkedSpace::didAddBlock): Deleted. (JSC::MarkedSpace::didAllocateInBlock): Deleted. (JSC::MarkedSpace::objectCount): Deleted. (JSC::MarkedSpace::size): Deleted. (JSC::MarkedSpace::capacity): Deleted. * heap/SlotVisitor.cpp: (JSC::SlotVisitor::SlotVisitor): (JSC::SlotVisitor::didStartMarking): (JSC::SlotVisitor::reset): (JSC::SlotVisitor::append): (JSC::SlotVisitor::appendJSCellOrAuxiliary): (JSC::SlotVisitor::setMarkedAndAppendToMarkStack): (JSC::SlotVisitor::appendToMarkStack): (JSC::SlotVisitor::markAuxiliary): (JSC::SlotVisitor::noteLiveAuxiliaryCell): (JSC::SlotVisitor::visitChildren): * heap/SlotVisitor.h: * heap/WeakBlock.cpp: (JSC::WeakBlock::create): (JSC::WeakBlock::WeakBlock): (JSC::WeakBlock::visit): (JSC::WeakBlock::reap): * heap/WeakBlock.h: (JSC::WeakBlock::disconnectContainer): (JSC::WeakBlock::disconnectMarkedBlock): Deleted. * heap/WeakSet.cpp: (JSC::WeakSet::~WeakSet): (JSC::WeakSet::sweep): (JSC::WeakSet::shrink): (JSC::WeakSet::addAllocator): * heap/WeakSet.h: (JSC::WeakSet::container): (JSC::WeakSet::setContainer): (JSC::WeakSet::WeakSet): (JSC::WeakSet::visit): (JSC::WeakSet::shrink): Deleted. * heap/WeakSetInlines.h: (JSC::WeakSet::allocate): * inspector/InjectedScriptManager.cpp: * inspector/JSGlobalObjectInspectorController.cpp: * inspector/JSJavaScriptCallFrame.cpp: * inspector/ScriptDebugServer.cpp: * inspector/agents/InspectorDebuggerAgent.cpp: * interpreter/CachedCall.h: (JSC::CachedCall::CachedCall): * interpreter/Interpreter.cpp: (JSC::loadVarargs): (JSC::StackFrame::sourceID): Deleted. (JSC::StackFrame::sourceURL): Deleted. (JSC::StackFrame::functionName): Deleted. (JSC::StackFrame::computeLineAndColumn): Deleted. (JSC::StackFrame::toString): Deleted. * interpreter/Interpreter.h: (JSC::StackFrame::isNative): Deleted. * jit/AssemblyHelpers.h: (JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator): (JSC::AssemblyHelpers::emitAllocate): (JSC::AssemblyHelpers::emitAllocateJSCell): (JSC::AssemblyHelpers::emitAllocateJSObject): (JSC::AssemblyHelpers::emitAllocateJSObjectWithKnownSize): (JSC::AssemblyHelpers::emitAllocateVariableSized): * jit/GCAwareJITStubRoutine.cpp: (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine): * jit/JIT.cpp: (JSC::JIT::compileCTINativeCall): (JSC::JIT::link): * jit/JIT.h: (JSC::JIT::compileCTINativeCall): Deleted. * jit/JITExceptions.cpp: (JSC::genericUnwind): * jit/JITExceptions.h: * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_new_object): (JSC::JIT::emitSlow_op_new_object): (JSC::JIT::emit_op_create_this): (JSC::JIT::emitSlow_op_create_this): * jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_new_object): (JSC::JIT::emitSlow_op_new_object): (JSC::JIT::emit_op_create_this): (JSC::JIT::emitSlow_op_create_this): * jit/JITOperations.cpp: * jit/JITOperations.h: * jit/JITPropertyAccess.cpp: (JSC::JIT::emitWriteBarrier): * jit/JITThunks.cpp: * jit/JITThunks.h: * jsc.cpp: (functionDescribeArray): (main): * llint/LLIntData.cpp: (JSC::LLInt::Data::performAssertions): * llint/LLIntExceptions.cpp: * llint/LLIntThunks.cpp: * llint/LLIntThunks.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter.cpp: * llint/LowLevelInterpreter32_64.asm: * llint/LowLevelInterpreter64.asm: * parser/ModuleAnalyzer.cpp: * parser/NodeConstructors.h: * parser/Nodes.h: * profiler/ProfilerBytecode.cpp: * profiler/ProfilerBytecode.h: * profiler/ProfilerBytecodeSequence.cpp: * runtime/ArrayConventions.h: (JSC::indexingHeaderForArrayStorage): (JSC::baseIndexingHeaderForArrayStorage): (JSC::indexingHeaderForArray): Deleted. (JSC::baseIndexingHeaderForArray): Deleted. * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): (JSC::concatAppendOne): (JSC::arrayProtoPrivateFuncConcatMemcpy): * runtime/ArrayStorage.h: (JSC::ArrayStorage::vectorLength): (JSC::ArrayStorage::totalSizeFor): (JSC::ArrayStorage::totalSize): (JSC::ArrayStorage::availableVectorLength): (JSC::ArrayStorage::optimalVectorLength): (JSC::ArrayStorage::sizeFor): Deleted. * runtime/AuxiliaryBarrier.h: Added. (JSC::AuxiliaryBarrier::AuxiliaryBarrier): (JSC::AuxiliaryBarrier::clear): (JSC::AuxiliaryBarrier::get): (JSC::AuxiliaryBarrier::slot): (JSC::AuxiliaryBarrier::operator bool): (JSC::AuxiliaryBarrier::setWithoutBarrier): * runtime/AuxiliaryBarrierInlines.h: Added. (JSC::AuxiliaryBarrier<T>::AuxiliaryBarrier): (JSC::AuxiliaryBarrier<T>::set): * runtime/Butterfly.h: * runtime/ButterflyInlines.h: (JSC::Butterfly::availableContiguousVectorLength): (JSC::Butterfly::optimalContiguousVectorLength): (JSC::Butterfly::createUninitialized): (JSC::Butterfly::growArrayRight): * runtime/ClonedArguments.cpp: (JSC::ClonedArguments::createEmpty): * runtime/CommonSlowPathsExceptions.cpp: * runtime/CommonSlowPathsExceptions.h: * runtime/DataView.cpp: * runtime/DirectArguments.h: * runtime/ECMAScriptSpecInternalFunctions.cpp: * runtime/Error.cpp: * runtime/Error.h: * runtime/ErrorInstance.cpp: * runtime/ErrorInstance.h: * runtime/Exception.cpp: * runtime/Exception.h: * runtime/GeneratorFrame.cpp: * runtime/GeneratorPrototype.cpp: * runtime/InternalFunction.cpp: (JSC::InternalFunction::InternalFunction): * runtime/IntlCollator.cpp: * runtime/IntlCollatorConstructor.cpp: * runtime/IntlCollatorPrototype.cpp: * runtime/IntlDateTimeFormat.cpp: * runtime/IntlDateTimeFormatConstructor.cpp: * runtime/IntlDateTimeFormatPrototype.cpp: * runtime/IntlNumberFormat.cpp: * runtime/IntlNumberFormatConstructor.cpp: * runtime/IntlNumberFormatPrototype.cpp: * runtime/IntlObject.cpp: * runtime/IteratorPrototype.cpp: * runtime/JSArray.cpp: (JSC::JSArray::tryCreateUninitialized): (JSC::JSArray::setLengthWritable): (JSC::JSArray::unshiftCountSlowCase): (JSC::JSArray::setLengthWithArrayStorage): (JSC::JSArray::appendMemcpy): (JSC::JSArray::setLength): (JSC::JSArray::pop): (JSC::JSArray::push): (JSC::JSArray::fastSlice): (JSC::JSArray::shiftCountWithArrayStorage): (JSC::JSArray::shiftCountWithAnyIndexingType): (JSC::JSArray::unshiftCountWithArrayStorage): (JSC::JSArray::fillArgList): (JSC::JSArray::copyToArguments): * runtime/JSArray.h: (JSC::createContiguousArrayButterfly): (JSC::createArrayButterfly): (JSC::JSArray::create): (JSC::JSArray::tryCreateUninitialized): Deleted. * runtime/JSArrayBufferView.h: * runtime/JSCInlines.h: * runtime/JSCJSValue.cpp: (JSC::JSValue::dumpInContextAssumingStructure): * runtime/JSCallee.cpp: (JSC::JSCallee::JSCallee): * runtime/JSCell.cpp: (JSC::JSCell::estimatedSize): * runtime/JSCell.h: (JSC::JSCell::cellStateOffset): Deleted. * runtime/JSCellInlines.h: (JSC::ExecState::vm): (JSC::JSCell::classInfo): (JSC::JSCell::callDestructor): (JSC::JSCell::vm): Deleted. * runtime/JSFunction.cpp: (JSC::JSFunction::create): (JSC::JSFunction::allocateAndInitializeRareData): (JSC::JSFunction::initializeRareData): (JSC::JSFunction::getOwnPropertySlot): (JSC::JSFunction::put): (JSC::JSFunction::deleteProperty): (JSC::JSFunction::defineOwnProperty): (JSC::JSFunction::setFunctionName): (JSC::JSFunction::reifyLength): (JSC::JSFunction::reifyName): (JSC::JSFunction::reifyLazyPropertyIfNeeded): (JSC::JSFunction::reifyBoundNameIfNeeded): * runtime/JSFunction.h: * runtime/JSFunctionInlines.h: (JSC::JSFunction::createWithInvalidatedReallocationWatchpoint): (JSC::JSFunction::JSFunction): * runtime/JSGenericTypedArrayViewInlines.h: (JSC::JSGenericTypedArrayView<Adaptor>::slowDownAndWasteMemory): * runtime/JSInternalPromise.cpp: * runtime/JSInternalPromiseConstructor.cpp: * runtime/JSInternalPromiseDeferred.cpp: * runtime/JSInternalPromisePrototype.cpp: * runtime/JSJob.cpp: * runtime/JSMapIterator.cpp: * runtime/JSModuleNamespaceObject.cpp: * runtime/JSModuleRecord.cpp: * runtime/JSObject.cpp: (JSC::JSObject::visitButterfly): (JSC::JSObject::notifyPresenceOfIndexedAccessors): (JSC::JSObject::createInitialIndexedStorage): (JSC::JSObject::createInitialUndecided): (JSC::JSObject::createInitialInt32): (JSC::JSObject::createInitialDouble): (JSC::JSObject::createInitialContiguous): (JSC::JSObject::createArrayStorage): (JSC::JSObject::createInitialArrayStorage): (JSC::JSObject::convertUndecidedToInt32): (JSC::JSObject::convertUndecidedToContiguous): (JSC::JSObject::convertUndecidedToArrayStorage): (JSC::JSObject::convertInt32ToDouble): (JSC::JSObject::convertInt32ToArrayStorage): (JSC::JSObject::convertDoubleToArrayStorage): (JSC::JSObject::convertContiguousToArrayStorage): (JSC::JSObject::putByIndexBeyondVectorLength): (JSC::JSObject::putDirectIndexBeyondVectorLength): (JSC::JSObject::getNewVectorLength): (JSC::JSObject::increaseVectorLength): (JSC::JSObject::ensureLengthSlow): (JSC::JSObject::growOutOfLineStorage): (JSC::JSObject::copyButterfly): Deleted. (JSC::JSObject::copyBackingStore): Deleted. * runtime/JSObject.h: (JSC::JSObject::globalObject): (JSC::JSObject::putDirectInternal): (JSC::JSObject::setStructureAndReallocateStorageIfNecessary): Deleted. * runtime/JSObjectInlines.h: * runtime/JSPromise.cpp: * runtime/JSPromiseConstructor.cpp: * runtime/JSPromiseDeferred.cpp: * runtime/JSPromisePrototype.cpp: * runtime/JSPropertyNameIterator.cpp: * runtime/JSScope.cpp: (JSC::JSScope::resolve): * runtime/JSScope.h: (JSC::JSScope::globalObject): (JSC::JSScope::vm): Deleted. * runtime/JSSetIterator.cpp: * runtime/JSStringIterator.cpp: * runtime/JSTemplateRegistryKey.cpp: * runtime/JSTypedArrayViewConstructor.cpp: * runtime/JSTypedArrayViewPrototype.cpp: * runtime/JSWeakMap.cpp: * runtime/JSWeakSet.cpp: * runtime/MapConstructor.cpp: * runtime/MapIteratorPrototype.cpp: * runtime/MapPrototype.cpp: * runtime/NativeErrorConstructor.cpp: * runtime/NativeStdFunctionCell.cpp: * runtime/Operations.h: (JSC::scribbleFreeCells): (JSC::scribble): * runtime/Options.h: * runtime/PropertyTable.cpp: * runtime/ProxyConstructor.cpp: * runtime/ProxyObject.cpp: * runtime/ProxyRevoke.cpp: * runtime/RegExp.cpp: (JSC::RegExp::match): (JSC::RegExp::matchConcurrently): (JSC::RegExp::matchCompareWithInterpreter): * runtime/RegExp.h: * runtime/RegExpConstructor.h: * runtime/RegExpInlines.h: (JSC::RegExp::matchInline): * runtime/RegExpMatchesArray.h: (JSC::tryCreateUninitializedRegExpMatchesArray): (JSC::createRegExpMatchesArray): * runtime/RegExpPrototype.cpp: (JSC::genericSplit): * runtime/RuntimeType.cpp: * runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::processUnverifiedStackTraces): * runtime/SetConstructor.cpp: * runtime/SetIteratorPrototype.cpp: * runtime/SetPrototype.cpp: * runtime/StackFrame.cpp: Added. (JSC::StackFrame::sourceID): (JSC::StackFrame::sourceURL): (JSC::StackFrame::functionName): (JSC::StackFrame::computeLineAndColumn): (JSC::StackFrame::toString): * runtime/StackFrame.h: Added. (JSC::StackFrame::isNative): * runtime/StringConstructor.cpp: * runtime/StringIteratorPrototype.cpp: * runtime/StructureInlines.h: (JSC::Structure::propertyTable): * runtime/TemplateRegistry.cpp: * runtime/TestRunnerUtils.cpp: (JSC::finalizeStatsAtEndOfTesting): * runtime/TestRunnerUtils.h: * runtime/TypeProfilerLog.cpp: * runtime/TypeSet.cpp: * runtime/VM.cpp: (JSC::VM::VM): (JSC::VM::ensureStackCapacityForCLoop): (JSC::VM::isSafeToRecurseSoftCLoop): * runtime/VM.h: * runtime/VMEntryScope.h: * runtime/VMInlines.h: (JSC::VM::ensureStackCapacityFor): (JSC::VM::isSafeToRecurseSoft): * runtime/WeakMapConstructor.cpp: * runtime/WeakMapData.cpp: * runtime/WeakMapPrototype.cpp: * runtime/WeakSetConstructor.cpp: * runtime/WeakSetPrototype.cpp: * testRegExp.cpp: (testOneRegExp): * tools/JSDollarVM.cpp: * tools/JSDollarVMPrototype.cpp: (JSC::JSDollarVMPrototype::isInObjectSpace): Source/WebCore: No new tests because no new WebCore behavior. Just rewiring #includes. * ForwardingHeaders/heap/HeapInlines.h: Added. * ForwardingHeaders/interpreter/Interpreter.h: Removed. * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Added. * Modules/indexeddb/IDBCursorWithValue.cpp: * Modules/indexeddb/client/TransactionOperation.cpp: * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: * Modules/indexeddb/server/UniqueIDBDatabase.cpp: * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp: * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp: * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp: * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp: * bindings/js/JSClientRectCustom.cpp: * bindings/js/JSDOMBinding.cpp: * bindings/js/JSDOMBinding.h: * bindings/js/JSDeviceMotionEventCustom.cpp: * bindings/js/JSDeviceOrientationEventCustom.cpp: * bindings/js/JSErrorEventCustom.cpp: * bindings/js/JSIDBCursorWithValueCustom.cpp: * bindings/js/JSIDBIndexCustom.cpp: * bindings/js/JSPopStateEventCustom.cpp: * bindings/js/JSWebGL2RenderingContextCustom.cpp: * bindings/js/JSWorkerGlobalScopeCustom.cpp: * bindings/js/WorkerScriptController.cpp: * contentextensions/ContentExtensionParser.cpp: * dom/ErrorEvent.cpp: * html/HTMLCanvasElement.cpp: * html/MediaDocument.cpp: * inspector/CommandLineAPIModule.cpp: * loader/EmptyClients.cpp: * page/CaptionUserPreferences.cpp: * page/Frame.cpp: * page/PageGroup.cpp: * page/UserContentController.cpp: * platform/mock/mediasource/MockBox.cpp: * testing/GCObservation.cpp: Source/WebKit2: Just rewiring some #includes. * UIProcess/ViewGestureController.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: * WebProcess/Plugins/Netscape/JSNPObject.cpp: Source/WTF: I needed tryFastAlignedMalloc() so I added it. * wtf/FastMalloc.cpp: (WTF::tryFastAlignedMalloc): * wtf/FastMalloc.h: * wtf/ParkingLot.cpp: (WTF::ParkingLot::forEachImpl): (WTF::ParkingLot::forEach): Deleted. * wtf/ParkingLot.h: (WTF::ParkingLot::parkConditionally): (WTF::ParkingLot::unparkOne): (WTF::ParkingLot::forEach): * wtf/ScopedLambda.h: (WTF::scopedLambdaRef): * wtf/SentinelLinkedList.h: (WTF::SentinelLinkedList::forEach): (WTF::RawNode>::takeFrom): * wtf/SimpleStats.h: (WTF::SimpleStats::operator bool): (WTF::SimpleStats::operator!): Deleted. Tools: * DumpRenderTree/TestRunner.cpp: * DumpRenderTree/mac/DumpRenderTree.mm: (DumpRenderTreeMain): * Scripts/run-jsc-stress-tests: * TestWebKitAPI/Tests/WTF/Vector.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/179778@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-06 01:02:22 +00:00
explicit operator bool() const
JIT heuristics should be hyperbolic https://bugs.webkit.org/show_bug.cgi?id=80055 <rdar://problem/10922260> Source/JavaScriptCore: Reviewed by Oliver Hunt. Added tracking of the amount of executable memory typically used for a bytecode instruction. Modified the execution counter scheme to use this, and the amount of free memory, to determine how long to wait before invoking the JIT. The result is that even if we bomb the VM with more code than can fit in our executable memory pool, we still keep running and almost never run out of executable memory - which ensures that if we have to JIT something critical, then we'll likely have enough memory to do so. This also does not regress performance on the three main benchmarks. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::predictedMachineCodeSize): (JSC): (JSC::CodeBlock::usesOpcode): * bytecode/CodeBlock.h: (CodeBlock): (JSC::CodeBlock::checkIfJITThresholdReached): (JSC::CodeBlock::dontJITAnytimeSoon): (JSC::CodeBlock::jitAfterWarmUp): (JSC::CodeBlock::jitSoon): (JSC::CodeBlock::llintExecuteCounter): (JSC::CodeBlock::counterValueForOptimizeAfterWarmUp): (JSC::CodeBlock::counterValueForOptimizeAfterLongWarmUp): (JSC::CodeBlock::addressOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): (JSC::CodeBlock::offsetOfJITExecutionTotalCount): (JSC::CodeBlock::jitExecuteCounter): (JSC::CodeBlock::checkIfOptimizationThresholdReached): (JSC::CodeBlock::optimizeNextInvocation): (JSC::CodeBlock::dontOptimizeAnytimeSoon): (JSC::CodeBlock::optimizeAfterWarmUp): (JSC::CodeBlock::optimizeAfterLongWarmUp): (JSC::CodeBlock::optimizeSoon): * bytecode/ExecutionCounter.cpp: Added. (JSC): (JSC::ExecutionCounter::ExecutionCounter): (JSC::ExecutionCounter::checkIfThresholdCrossedAndSet): (JSC::ExecutionCounter::setNewThreshold): (JSC::ExecutionCounter::deferIndefinitely): (JSC::ExecutionCounter::applyMemoryUsageHeuristics): (JSC::ExecutionCounter::applyMemoryUsageHeuristicsAndConvertToInt): (JSC::ExecutionCounter::hasCrossedThreshold): (JSC::ExecutionCounter::setThreshold): (JSC::ExecutionCounter::reset): * bytecode/ExecutionCounter.h: Added. (JSC): (ExecutionCounter): (JSC::ExecutionCounter::formattedTotalCount): * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * jit/ExecutableAllocator.cpp: (JSC::DemandExecutableAllocator::allocateNewSpace): (JSC::ExecutableAllocator::underMemoryPressure): (JSC): (JSC::ExecutableAllocator::memoryPressureMultiplier): * jit/ExecutableAllocator.h: * jit/ExecutableAllocatorFixedVMPool.cpp: (JSC::ExecutableAllocator::memoryPressureMultiplier): (JSC): * jit/JIT.cpp: (JSC::JIT::privateCompile): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * llint/LLIntSlowPaths.cpp: (JSC::LLInt::jitCompileAndSetHeuristics): * llint/LowLevelInterpreter32_64.asm: * runtime/JSGlobalData.h: (JSGlobalData): * runtime/Options.cpp: (Options): (JSC::Options::initializeOptions): * runtime/Options.h: (Options): * wtf/SimpleStats.h: Added. (WTF): (SimpleStats): (WTF::SimpleStats::SimpleStats): (WTF::SimpleStats::add): (WTF::SimpleStats::operator!): (WTF::SimpleStats::count): (WTF::SimpleStats::sum): (WTF::SimpleStats::sumOfSquares): (WTF::SimpleStats::mean): (WTF::SimpleStats::variance): (WTF::SimpleStats::standardDeviation): Source/WebCore: Reviewed by Oliver Hunt. No new tests, since there's no new functionality. * ForwardingHeaders/wtf/SimpleStats.h: Added. Canonical link: https://commits.webkit.org/97373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-05 06:52:44 +00:00
{
Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression https://bugs.webkit.org/show_bug.cgi?id=160125 Reviewed by Geoffrey Garen and Keith Miller. JSTests: Most of the things I did properly covered by existing tests, but I found some simple cases of unshifting that had sketchy coverage. * stress/array-storage-array-unshift.js: Added. * stress/contiguous-array-unshift.js: Added. * stress/double-array-unshift.js: Added. * stress/int32-array-unshift.js: Added. Source/bmalloc: I needed to tryMemalign, so I added such a thing. * bmalloc/Allocator.cpp: (bmalloc::Allocator::allocate): (bmalloc::Allocator::tryAllocate): (bmalloc::Allocator::allocateImpl): * bmalloc/Allocator.h: * bmalloc/Cache.h: (bmalloc::Cache::tryAllocate): * bmalloc/bmalloc.h: (bmalloc::api::tryMemalign): Source/JavaScriptCore: In order to make the GC concurrent (bug 149432), we would either need to enable concurrent copying or we would need to not copy. Concurrent copying carries a 1-2% throughput overhead from the barriers alone. Considering that MarkedSpace does a decent job of avoiding fragmentation, it's unlikely that it's worth paying 1-2% throughput for copying. So, we want to get rid of copied space. This change moves copied space's biggest client over to marked space. Moving butterflies to marked space means having them use the new Auxiliary HeapCell allocation path. This is a fairly mechanical change, but it caused performance regressions everywhere, so this change also fixes MarkedSpace's performance issues. At a high level the mechanical changes are: - We use AuxiliaryBarrier instead of CopyBarrier. - We use tryAllocateAuxiliary instead of tryAllocateStorage. I got rid of the silly CheckedBoolean stuff, since it's so much more trouble than it's worth. - The JITs have to emit inlined marked space allocations instead of inline copy space allocations. - Everyone has to get used to zeroing their butterflies after allocation instead of relying on them being pre-zeroed by the GC. Copied space would zero things for you, while marked space doesn't. That's about 1/3 of this change. But this led to performance problems, which I fixed with optimizations that amounted to a major MarkedSpace rewrite: - MarkedSpace always causes internal fragmentation for array allocations because the vector length we choose when we resize usually leads to a cell size that doesn't correspond to any size class. I got around this by making array allocations usually round up vectorLength to the maximum allowed by the size class that we would have allocated in. Also, ensureLengthSlow() and friends first make sure that the requested length can't just be fulfilled with the current allocation size. This safeguard means that not every array allocation has to do size class queries. For example, the fast path of new Array(length) never does any size class queries, under the assumption that (1) the speed gained from avoiding an ensureLengthSlow() call, which then just changes the vectorLength by doing the size class query, is too small to offset the speed lost by doing the query on every allocation and (2) new Array(length) is a pretty good hint that resizing is not very likely. - Size classes in MarkedSpace were way too precise, which led to external fragmentation. This changes MarkedSpace size classes to use a linear progression for very small sizes followed by a geometric progression that naturally transitions to a hyperbolic progression. We want hyperbolic sizes when we get close to blockSize: for example the largest size we want is payloadSize / 2 rounded down, to ensure we get exactly two cells with minimal slop. The next size down should be payloadSize / 3 rounded down, and so on. After the last precise size (80 bytes), we proceed using a geometric progression, but round up each size to minimize slop at the end of the block. This naturally causes the geometric progression to turn hyperbolic for large sizes. The size class configuration happens at VM start-up, so it can be controlled with runtime options. I found that a base of 1.4 works pretty well. - Large allocations caused massive internal fragmentation, since the smallest large allocation had to use exactly blockSize, and the largest small allocation used blockSize / 2. The next size up - the first large allocation size to require two blocks - also had 50% internal fragmentation. This is because we required large allocations to be blockSize aligned, so that MarkedBlock::blockFor() would work. I decided to rewrite all of that. Cells no longer have to be owned by a MarkedBlock. They can now alternatively be owned by a LargeAllocation. These two things are abstracted as CellContainer. You know that a cell is owned by a LargeAllocation if the MarkedBlock::atomSize / 2 bit is set. Basically, large allocations are deliberately misaligned by 8 bytes. This actually works out great since (1) typed arrays won't use large allocations anyway since they have their own malloc fallback and (2) large array butterflies already have a 8 byte header, which means that the 8 byte base misalignment aligns the large array payload on a 16 byte boundary. I took extreme care to make sure that the isLargeAllocation bit checks are as rare as possible; for example, ExecState::vm() skips the check because we know that callees must be small allocations. It's also possible to use template tricks to do one check for cell container kind, and then invoke a function specialized for MarkedBlock or a function specialized for LargeAllocation. LargeAllocation includes stubs for all MarkedBlock methods that get used from functions that are template-specialized like this. That's mostly to speed up the GC marking code. Most other code can use CellContainer API or HeapCell API directly. That's another thing: HeapCell, the common base of JSCell and auxiliary allocations, is now smart enough to do a lot of things for you, like HeapCell::vm(), HeapCell::heap(), HeapCell::isLargeAllocation(), and HeapCell::cellContainer(). The size cutoff for large allocations is runtime-configurable, so long as you don't choose something so small that callees end up large. I found that 400 bytes is roughly optimal. This means that the MarkedBlock size classes end up being: 16, 32, 48, 64, 80, 112, 160, 224, 320 The next size class would have been 432, but that's above the 400 byte cutoff. All of this is configurable with --sizeClassProgression and --largeAllocationCutoff. You can see what size classes you end up with by doing --dumpSizeClasses=true. - Copied space uses 64KB blocks, while marked space used to use 16KB blocks. Allocating a lot of stuff in 16KB blocks was slower than allocating it in 64KB blocks because the GC had a lot of per-block overhead. I removed this overhead: It's now 2x faster to scan all MarkedBlocks because the list that contains the interesting meta-data is allocated on the side, for better locality during a sequential walk. It's no longer necessary to scan MarkedBlocks to find WeakSets, since the sets of WeakSets for eden scan and full scan are maintained on-the-fly. It's no longer necessary to scan all MarkedBlocks to clear mark bits because we now use versioned mark bits: to clear then, just increment the 64-bit heap version. It's no longer necessary to scan retired MarkedBlocks while allocating because marking retires them on-the-fly. It's no longer necessary to sort all blocks in the IncrementalSweeper's snapshot because blocks now know if they are in the snapshot. Put together, these optimizations allowed me to reduce block size to 16KB without losing much performance. There is some small perf loss on JetStream/splay, but not enough to hurt JetStream overall. I tried reducing block sizes further, to 4KB, since that is a progression on membuster. That's not possible yet, since there is still enough per-block overhead yet that such a reduction hurts JetStream too much. I filed a bug about improving this further: https://bugs.webkit.org/show_bug.cgi?id=161581. - Even after all of that, copying butterflies was still faster because it allowed us to skip sweeping dead space. A good GC allocates over dead bytes without explicitly freeing them, so the GC pause is O(size of live), not O(size of live + dead). O(dead) is usually much larger than O(live), especially in an eden collection. Copying satisfies this premise while mark+sweep does not. So, I invented a new kind of allocator: bump'n'pop. Previously, our MarkedSpace allocator was a freelist pop. That's simple and easy to inline but requires that we walk the block to build a free list. This means walking dead space. The new allocator allows totally free MarkedBlocks to simply set up a bump-pointer arena instead. The allocator is a hybrid of bump-pointer and freelist pop. It tries bump first. The bump pointer always bumps by cellSize, so the result of filling a block with bumping looks as if we had used freelist popping to fill it. Additionally, each MarkedBlock now has a bit to quickly tell if the block is entirely free. This makes sweeping O(1) whenever a MarkedBlock is completely empty, which is the common case because of the generational hypothesis: the number of objects that survive an eden collection is a tiny fraction of the number of objects that had been allocated, and this fraction is so small that there are typically fewer than one survivors per MarkedBlock. This change was enough to make this change a net win over tip-of-tree. - FTL now shares the same allocation fast paths as everything else, which is great, because bump'n'pop has gnarly control flow. We don't really want B3 to have to think about that control flow, since it won't be able to improve the machine code we write ourselves. GC fast paths are best written in assembly. So, I've empowered B3 to have even better support for Patchpoint terminals. It's now totally fine for a Patchpoint terminal to be non-Void. So, the new FTL allocation fast paths are just Patchpoint terminals that call through to AssemblyHelpers::emitAllocate(). B3 still reasons about things like constant-folding the size class calculation and constant-hoisting the allocator. Also, I gave the FTL the ability to constant-fold some allocator logic (in case we first assume that we're doing a variable-length allocation but then realize that the length is known). I think it makes sense to have constant folding rules in FTL::Output, or whatever the B3 IR builder is, since this makes lowering easier (you can constant fold during lowering more easily) and it reduces the amount of malloc traffic. In the future, we could teach B3 how to better constant-fold this code. That would require allowing loads to be constant-folded, which is doable but hella tricky. - It used to be that if a logical object allocation required two physical allocations (first the butterfly and then the cell), then the JIT would emit the code in such a way that a failure in the second fast path would cause us to forget the successful first physical allocation. This was pointlessly wasteful. It turns out that it's very cheap to devote a register to storing either the butterfly or null, because the butterfly register is anyway going to be free inside the first allocation. The only overhead here is zeroing the butterfly register. With that in place, we can just pass the butterfly-or-null to the slow path, which can then either allocate a butterfly or not. So now we never waste a successful allocation. This patch implements such a solution both in DFG (where it's easy to do this since we control registers already) and in FTL (where it's annoying, because mutable "butterfly-or-null" variables are hard to say in SSA; also I realized that we had code duplicated the JSArray allocation utility, so I deduplicated it). This came up because in one version of this patch, this wastage would resonate with some Kraken benchmark: the benchmark would always allocate N small things followed by one bigger thing. The problem was I accidentally adjusted the various fixed overheads in MarkedBlock in such a way that the JSObject size class, which both the small and big thing shared for their cell, could hold exactly N cells per MarkedBlock. Then the benchmark would always call slow path when it allocated the big thing. So, it would end up having to allocate the big thing's large butterfly twice, every single time! Ouch! - It used to be that we zeroed CopiedBlocks using memset, and so array allocations enjoyed amortization of the cost of zeroing. This doesn't work anymore - it's now up to the client of the allocator to initialize the object to whatever state they need. It used to be that we would just use a dumb loop. I initially changed this so that we would end up in memset for large allocations, but this didn't actually help performance that much. I got a much better result by playing with different memsets written in assembly. First I wrote one using non-temporal stores. That was a small speed-up over memset. Then I tried the classic "rep stos" approach, and holy cow that version was fast. It's a ~20% speed-up on array allocation microbenchmarks. So, this patch adds code paths to do "rep stos" on x86_64, or memset, or use a loop, as appropriate, for both "contiguous" arrays (holes are zero) and double arrays (holes are PNaN). Note that the JIT always emits either a loop or a flat slab of stores (if the size is known), but those paths in the JIT won't trigger for NewArrayWithSize() if the size is large, since that takes us to the operationNewArrayWithSize() slow path, which calls into JSArray::create(). That's why the optimizations here are all in JSArray::create() - that's the hot place for large arrays that need to be filled with holes. All of this put together gives us neutral perf on JetStream, membuster, and PLT3, a ~1% regression on Speedometer, and up to a 4% regression Kraken. The Kraken regression is because Kraken was allocating exactly 1024 element arrays at a rate of 400MB/sec. This is a best-case scenario for bump allocation. I think that we should fix bmalloc to make up the difference, but take the hit for now because it's a crazy corner case. By comparison, the alternative approach of using a copy barrier would have cost us 1-2%. That's the real apples-to-apples comparison if your premise is that we should have a concurrent GC. After we finish removing copied space, we will be barrier-ready for concurrent GC: we already have a marking barrier and we simply won't need a copying barrier. This change gets us there for the purposes of our benchmarks, since the remaining clients of copied space are not very important. On the other hand, if we keep copying, then getting barrier-ready would mean adding back the copy barrier, which costs more perf. We might get bigger speed-ups once we remove CopiedSpace altogether. That requires moving typed arrays and a few other weird things over to Aux MarkedSpace. This also includes some header sanitization. The introduction of AuxiliaryBarrier, HeapCell, and CellContainer meant that I had to include those files from everywhere. Fortunately, just including JSCInlines.h (instead of manually including the files that includes) is usually enough. So, I made most of JSC's cpp files include JSCInlines.h, which is something that we were already basically doing. In places where JSCInlines.h would be too much, I just included HeapInlines.h. This got weird, because we previously included HeapInlines.h from JSObject.h. That's bad because it led to some circular dependencies, so I fixed it - but that meant having to manually include HeapInlines.h from the places that previously got it implicitly via JSObject.h. But that led to more problems for some reason: I started getting build errors because non-JSC files were having trouble including Opcode.h. That's just silly, since Opcode.h is meant to be an internal JSC header. So, I made it an internal header and made it impossible to include it from outside JSC. This was a lot of work, but it was necessary to get the patch to build on all ports. It's also a net win. There were many places in WebCore that were transitively including a *ton* of JSC headers just because of the JSObject.h->HeapInlines.h edge and a bunch of dependency edges that arose from some public (for WebCore) JSC headers needing Interpreter.h or Opcode.h for bad reasons. * API/JSManagedValue.mm: (-[JSManagedValue initWithValue:]): * API/JSTypedArray.cpp: * API/ObjCCallbackFunction.mm: * API/tests/testapi.mm: (testObjectiveCAPI): (testWeakValue): Deleted. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/builtins/builtins_generate_combined_implementation.py: (BuiltinsCombinedImplementationGenerator.generate_secondary_header_includes): * Scripts/builtins/builtins_generate_internals_wrapper_implementation.py: (BuiltinsInternalsWrapperImplementationGenerator.generate_secondary_header_includes): * Scripts/builtins/builtins_generate_separate_implementation.py: (BuiltinsSeparateImplementationGenerator.generate_secondary_header_includes): * assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::JumpList::link): (JSC::AbstractMacroAssembler::JumpList::linkTo): * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::add32): * assembler/MacroAssemblerCodeRef.cpp: Added. (JSC::MacroAssemblerCodePtr::createLLIntCodePtr): (JSC::MacroAssemblerCodePtr::dumpWithName): (JSC::MacroAssemblerCodePtr::dump): (JSC::MacroAssemblerCodeRef::createLLIntCodeRef): (JSC::MacroAssemblerCodeRef::dump): * assembler/MacroAssemblerCodeRef.h: (JSC::MacroAssemblerCodePtr::createLLIntCodePtr): Deleted. (JSC::MacroAssemblerCodePtr::dumpWithName): Deleted. (JSC::MacroAssemblerCodePtr::dump): Deleted. (JSC::MacroAssemblerCodeRef::createLLIntCodeRef): Deleted. (JSC::MacroAssemblerCodeRef::dump): Deleted. * b3/B3BasicBlock.cpp: (JSC::B3::BasicBlock::appendBoolConstant): * b3/B3BasicBlock.h: * b3/B3DuplicateTails.cpp: * b3/B3StackmapGenerationParams.h: * b3/testb3.cpp: (JSC::B3::testPatchpointTerminalReturnValue): (JSC::B3::run): * bindings/ScriptValue.cpp: * bytecode/AdaptiveInferredPropertyValueWatchpointBase.cpp: * bytecode/BytecodeBasicBlock.cpp: * bytecode/BytecodeLivenessAnalysis.cpp: * bytecode/BytecodeUseDef.h: * bytecode/CallLinkInfo.cpp: (JSC::CallLinkInfo::callTypeFor): * bytecode/CallLinkInfo.h: (JSC::CallLinkInfo::callTypeFor): Deleted. * bytecode/CallLinkStatus.cpp: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::finishCreation): (JSC::CodeBlock::clearLLIntGetByIdCache): (JSC::CodeBlock::predictedMachineCodeSize): * bytecode/CodeBlock.h: (JSC::CodeBlock::jitCodeMap): Deleted. (JSC::clearLLIntGetByIdCache): Deleted. * bytecode/ExecutionCounter.h: * bytecode/Instruction.h: * bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp: (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::fireInternal): * bytecode/ObjectAllocationProfile.h: (JSC::ObjectAllocationProfile::isNull): (JSC::ObjectAllocationProfile::initialize): * bytecode/Opcode.h: (JSC::padOpcodeName): * bytecode/PolymorphicAccess.cpp: (JSC::AccessCase::generateImpl): (JSC::PolymorphicAccess::regenerate): * bytecode/PolymorphicAccess.h: * bytecode/PreciseJumpTargets.cpp: * bytecode/StructureStubInfo.cpp: * bytecode/StructureStubInfo.h: * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedCodeBlock::vm): Deleted. * bytecode/UnlinkedCodeBlock.h: * bytecode/UnlinkedInstructionStream.cpp: * bytecode/UnlinkedInstructionStream.h: * dfg/DFGOperations.cpp: * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::compileMakeRope): (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage): (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage): * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::emitAllocateJSCell): (JSC::DFG::SpeculativeJIT::emitAllocateJSObject): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): (JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): (JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): * dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::handleNode): * ftl/FTLAbstractHeapRepository.h: * ftl/FTLCompile.cpp: * ftl/FTLJITFinalizer.cpp: * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments): (JSC::FTL::DFG::LowerDFGToB3::compileCreateRest): (JSC::FTL::DFG::LowerDFGToB3::allocateArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileMakeRope): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): (JSC::FTL::DFG::LowerDFGToB3::initializeArrayElements): (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorageWithSizeImpl): (JSC::FTL::DFG::LowerDFGToB3::allocateHeapCell): (JSC::FTL::DFG::LowerDFGToB3::allocateCell): (JSC::FTL::DFG::LowerDFGToB3::allocateObject): (JSC::FTL::DFG::LowerDFGToB3::allocatorForSize): (JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject): (JSC::FTL::DFG::LowerDFGToB3::allocateJSArray): (JSC::FTL::DFG::LowerDFGToB3::compileAllocateArrayWithSize): Deleted. * ftl/FTLOutput.cpp: (JSC::FTL::Output::constBool): (JSC::FTL::Output::add): (JSC::FTL::Output::shl): (JSC::FTL::Output::aShr): (JSC::FTL::Output::lShr): (JSC::FTL::Output::zeroExt): (JSC::FTL::Output::equal): (JSC::FTL::Output::notEqual): (JSC::FTL::Output::above): (JSC::FTL::Output::aboveOrEqual): (JSC::FTL::Output::below): (JSC::FTL::Output::belowOrEqual): (JSC::FTL::Output::greaterThan): (JSC::FTL::Output::greaterThanOrEqual): (JSC::FTL::Output::lessThan): (JSC::FTL::Output::lessThanOrEqual): (JSC::FTL::Output::select): (JSC::FTL::Output::appendSuccessor): (JSC::FTL::Output::addIncomingToPhi): * ftl/FTLOutput.h: * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::operator bool): (JSC::FTL::ValueFromBlock::ValueFromBlock): Deleted. * ftl/FTLWeightedTarget.h: (JSC::FTL::WeightedTarget::frequentedBlock): * heap/CellContainer.h: Added. (JSC::CellContainer::CellContainer): (JSC::CellContainer::operator bool): (JSC::CellContainer::isMarkedBlock): (JSC::CellContainer::isLargeAllocation): (JSC::CellContainer::markedBlock): (JSC::CellContainer::largeAllocation): * heap/CellContainerInlines.h: Added. (JSC::CellContainer::isMarked): (JSC::CellContainer::isMarkedOrNewlyAllocated): (JSC::CellContainer::noteMarked): (JSC::CellContainer::cellSize): (JSC::CellContainer::weakSet): (JSC::CellContainer::flipIfNecessary): * heap/ConservativeRoots.cpp: (JSC::ConservativeRoots::ConservativeRoots): (JSC::ConservativeRoots::~ConservativeRoots): (JSC::ConservativeRoots::grow): (JSC::ConservativeRoots::genericAddPointer): (JSC::ConservativeRoots::genericAddSpan): * heap/ConservativeRoots.h: (JSC::ConservativeRoots::roots): * heap/CopyToken.h: * heap/FreeList.cpp: Added. (JSC::FreeList::dump): * heap/FreeList.h: Added. (JSC::FreeList::FreeList): (JSC::FreeList::list): (JSC::FreeList::bump): (JSC::FreeList::operator==): (JSC::FreeList::operator!=): (JSC::FreeList::operator bool): (JSC::FreeList::allocationWillFail): (JSC::FreeList::allocationWillSucceed): * heap/GCTypeMap.h: Added. (JSC::GCTypeMap::operator[]): * heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::lastChanceToFinalize): (JSC::Heap::finalizeUnconditionalFinalizers): (JSC::Heap::markRoots): (JSC::Heap::copyBackingStores): (JSC::Heap::gatherStackRoots): (JSC::Heap::gatherJSStackRoots): (JSC::Heap::gatherScratchBufferRoots): (JSC::Heap::clearLivenessData): (JSC::Heap::visitSmallStrings): (JSC::Heap::visitConservativeRoots): (JSC::Heap::removeDeadCompilerWorklistEntries): (JSC::Heap::gatherExtraHeapSnapshotData): (JSC::Heap::removeDeadHeapSnapshotNodes): (JSC::Heap::visitProtectedObjects): (JSC::Heap::visitArgumentBuffers): (JSC::Heap::visitException): (JSC::Heap::visitStrongHandles): (JSC::Heap::visitHandleStack): (JSC::Heap::visitSamplingProfiler): (JSC::Heap::traceCodeBlocksAndJITStubRoutines): (JSC::Heap::converge): (JSC::Heap::visitWeakHandles): (JSC::Heap::updateObjectCounts): (JSC::Heap::clearUnmarkedExecutables): (JSC::Heap::deleteUnmarkedCompiledCode): (JSC::Heap::collectAllGarbage): (JSC::Heap::collect): (JSC::Heap::collectWithoutAnySweep): (JSC::Heap::collectImpl): (JSC::Heap::suspendCompilerThreads): (JSC::Heap::willStartCollection): (JSC::Heap::flushOldStructureIDTables): (JSC::Heap::flushWriteBarrierBuffer): (JSC::Heap::stopAllocation): (JSC::Heap::prepareForMarking): (JSC::Heap::reapWeakHandles): (JSC::Heap::pruneStaleEntriesFromWeakGCMaps): (JSC::Heap::sweepArrayBuffers): (JSC::MarkedBlockSnapshotFunctor::MarkedBlockSnapshotFunctor): (JSC::MarkedBlockSnapshotFunctor::operator()): (JSC::Heap::snapshotMarkedSpace): (JSC::Heap::deleteSourceProviderCaches): (JSC::Heap::notifyIncrementalSweeper): (JSC::Heap::writeBarrierCurrentlyExecutingCodeBlocks): (JSC::Heap::resetAllocators): (JSC::Heap::updateAllocationLimits): (JSC::Heap::didFinishCollection): (JSC::Heap::resumeCompilerThreads): (JSC::Zombify::visit): (JSC::Heap::forEachCodeBlockImpl): * heap/Heap.h: (JSC::Heap::allocatorForObjectWithoutDestructor): (JSC::Heap::allocatorForObjectWithDestructor): (JSC::Heap::allocatorForAuxiliaryData): (JSC::Heap::jitStubRoutines): (JSC::Heap::codeBlockSet): (JSC::Heap::storageAllocator): Deleted. * heap/HeapCell.h: (JSC::HeapCell::isZapped): Deleted. * heap/HeapCellInlines.h: Added. (JSC::HeapCell::isLargeAllocation): (JSC::HeapCell::cellContainer): (JSC::HeapCell::markedBlock): (JSC::HeapCell::largeAllocation): (JSC::HeapCell::heap): (JSC::HeapCell::vm): (JSC::HeapCell::cellSize): (JSC::HeapCell::allocatorAttributes): (JSC::HeapCell::destructionMode): (JSC::HeapCell::cellKind): * heap/HeapInlines.h: (JSC::Heap::heap): (JSC::Heap::isLive): (JSC::Heap::isMarked): (JSC::Heap::testAndSetMarked): (JSC::Heap::setMarked): (JSC::Heap::cellSize): (JSC::Heap::forEachCodeBlock): (JSC::Heap::allocateObjectOfType): (JSC::Heap::subspaceForObjectOfType): (JSC::Heap::allocatorForObjectOfType): (JSC::Heap::allocateAuxiliary): (JSC::Heap::tryAllocateAuxiliary): (JSC::Heap::tryReallocateAuxiliary): (JSC::Heap::isPointerGCObject): Deleted. (JSC::Heap::isValueGCObject): Deleted. * heap/HeapOperation.cpp: Added. (WTF::printInternal): * heap/HeapOperation.h: * heap/HeapUtil.h: Added. (JSC::HeapUtil::findGCObjectPointersForMarking): (JSC::HeapUtil::isPointerGCObjectJSCell): (JSC::HeapUtil::isValueGCObject): * heap/IncrementalSweeper.cpp: (JSC::IncrementalSweeper::sweepNextBlock): * heap/IncrementalSweeper.h: * heap/LargeAllocation.cpp: Added. (JSC::LargeAllocation::tryCreate): (JSC::LargeAllocation::LargeAllocation): (JSC::LargeAllocation::lastChanceToFinalize): (JSC::LargeAllocation::shrink): (JSC::LargeAllocation::visitWeakSet): (JSC::LargeAllocation::reapWeakSet): (JSC::LargeAllocation::flip): (JSC::LargeAllocation::isEmpty): (JSC::LargeAllocation::sweep): (JSC::LargeAllocation::destroy): (JSC::LargeAllocation::dump): * heap/LargeAllocation.h: Added. (JSC::LargeAllocation::fromCell): (JSC::LargeAllocation::cell): (JSC::LargeAllocation::isLargeAllocation): (JSC::LargeAllocation::heap): (JSC::LargeAllocation::vm): (JSC::LargeAllocation::weakSet): (JSC::LargeAllocation::clearNewlyAllocated): (JSC::LargeAllocation::isNewlyAllocated): (JSC::LargeAllocation::isMarked): (JSC::LargeAllocation::isMarkedOrNewlyAllocated): (JSC::LargeAllocation::isLive): (JSC::LargeAllocation::hasValidCell): (JSC::LargeAllocation::cellSize): (JSC::LargeAllocation::aboveLowerBound): (JSC::LargeAllocation::belowUpperBound): (JSC::LargeAllocation::contains): (JSC::LargeAllocation::attributes): (JSC::LargeAllocation::flipIfNecessary): (JSC::LargeAllocation::flipIfNecessaryConcurrently): (JSC::LargeAllocation::testAndSetMarked): (JSC::LargeAllocation::setMarked): (JSC::LargeAllocation::clearMarked): (JSC::LargeAllocation::noteMarked): (JSC::LargeAllocation::headerSize): * heap/MarkedAllocator.cpp: (JSC::MarkedAllocator::MarkedAllocator): (JSC::MarkedAllocator::isPagedOut): (JSC::MarkedAllocator::retire): (JSC::MarkedAllocator::filterNextBlock): (JSC::MarkedAllocator::setNextBlockToSweep): (JSC::MarkedAllocator::tryAllocateWithoutCollectingImpl): (JSC::MarkedAllocator::tryAllocateWithoutCollecting): (JSC::MarkedAllocator::allocateSlowCase): (JSC::MarkedAllocator::tryAllocateSlowCase): (JSC::MarkedAllocator::allocateSlowCaseImpl): (JSC::blockHeaderSize): (JSC::MarkedAllocator::blockSizeForBytes): (JSC::MarkedAllocator::tryAllocateBlock): (JSC::MarkedAllocator::addBlock): (JSC::MarkedAllocator::removeBlock): (JSC::MarkedAllocator::stopAllocating): (JSC::MarkedAllocator::reset): (JSC::MarkedAllocator::lastChanceToFinalize): (JSC::MarkedAllocator::setFreeList): (JSC::isListPagedOut): Deleted. (JSC::MarkedAllocator::tryAllocateHelper): Deleted. (JSC::MarkedAllocator::tryPopFreeList): Deleted. (JSC::MarkedAllocator::tryAllocate): Deleted. (JSC::MarkedAllocator::allocateBlock): Deleted. * heap/MarkedAllocator.h: (JSC::MarkedAllocator::takeLastActiveBlock): (JSC::MarkedAllocator::offsetOfFreeList): (JSC::MarkedAllocator::offsetOfCellSize): (JSC::MarkedAllocator::tryAllocate): (JSC::MarkedAllocator::allocate): (JSC::MarkedAllocator::forEachBlock): (JSC::MarkedAllocator::offsetOfFreeListHead): Deleted. (JSC::MarkedAllocator::MarkedAllocator): Deleted. (JSC::MarkedAllocator::init): Deleted. (JSC::MarkedAllocator::stopAllocating): Deleted. * heap/MarkedBlock.cpp: (JSC::MarkedBlock::tryCreate): (JSC::MarkedBlock::Handle::Handle): (JSC::MarkedBlock::Handle::~Handle): (JSC::MarkedBlock::MarkedBlock): (JSC::MarkedBlock::Handle::specializedSweep): (JSC::MarkedBlock::Handle::sweep): (JSC::MarkedBlock::Handle::sweepHelperSelectScribbleMode): (JSC::MarkedBlock::Handle::sweepHelperSelectStateAndSweepMode): (JSC::MarkedBlock::Handle::unsweepWithNoNewlyAllocated): (JSC::SetNewlyAllocatedFunctor::SetNewlyAllocatedFunctor): (JSC::SetNewlyAllocatedFunctor::operator()): (JSC::MarkedBlock::Handle::stopAllocating): (JSC::MarkedBlock::Handle::lastChanceToFinalize): (JSC::MarkedBlock::Handle::resumeAllocating): (JSC::MarkedBlock::Handle::zap): (JSC::MarkedBlock::Handle::forEachFreeCell): (JSC::MarkedBlock::flipIfNecessary): (JSC::MarkedBlock::Handle::flipIfNecessary): (JSC::MarkedBlock::flipIfNecessarySlow): (JSC::MarkedBlock::flipIfNecessaryConcurrentlySlow): (JSC::MarkedBlock::clearMarks): (JSC::MarkedBlock::assertFlipped): (JSC::MarkedBlock::needsFlip): (JSC::MarkedBlock::Handle::needsFlip): (JSC::MarkedBlock::Handle::willRemoveBlock): (JSC::MarkedBlock::Handle::didConsumeFreeList): (JSC::MarkedBlock::markCount): (JSC::MarkedBlock::Handle::isEmpty): (JSC::MarkedBlock::clearHasAnyMarked): (JSC::MarkedBlock::noteMarkedSlow): (WTF::printInternal): (JSC::MarkedBlock::create): Deleted. (JSC::MarkedBlock::destroy): Deleted. (JSC::MarkedBlock::callDestructor): Deleted. (JSC::MarkedBlock::specializedSweep): Deleted. (JSC::MarkedBlock::sweep): Deleted. (JSC::MarkedBlock::sweepHelper): Deleted. (JSC::MarkedBlock::stopAllocating): Deleted. (JSC::MarkedBlock::clearMarksWithCollectionType): Deleted. (JSC::MarkedBlock::lastChanceToFinalize): Deleted. (JSC::MarkedBlock::resumeAllocating): Deleted. (JSC::MarkedBlock::didRetireBlock): Deleted. * heap/MarkedBlock.h: (JSC::MarkedBlock::VoidFunctor::returnValue): (JSC::MarkedBlock::CountFunctor::CountFunctor): (JSC::MarkedBlock::CountFunctor::count): (JSC::MarkedBlock::CountFunctor::returnValue): (JSC::MarkedBlock::Handle::hasAnyNewlyAllocated): (JSC::MarkedBlock::Handle::isOnBlocksToSweep): (JSC::MarkedBlock::Handle::setIsOnBlocksToSweep): (JSC::MarkedBlock::Handle::state): (JSC::MarkedBlock::needsDestruction): (JSC::MarkedBlock::handle): (JSC::MarkedBlock::Handle::block): (JSC::MarkedBlock::firstAtom): (JSC::MarkedBlock::atoms): (JSC::MarkedBlock::isAtomAligned): (JSC::MarkedBlock::Handle::cellAlign): (JSC::MarkedBlock::blockFor): (JSC::MarkedBlock::Handle::allocator): (JSC::MarkedBlock::Handle::heap): (JSC::MarkedBlock::Handle::vm): (JSC::MarkedBlock::vm): (JSC::MarkedBlock::Handle::weakSet): (JSC::MarkedBlock::weakSet): (JSC::MarkedBlock::Handle::shrink): (JSC::MarkedBlock::Handle::visitWeakSet): (JSC::MarkedBlock::Handle::reapWeakSet): (JSC::MarkedBlock::Handle::cellSize): (JSC::MarkedBlock::cellSize): (JSC::MarkedBlock::Handle::attributes): (JSC::MarkedBlock::attributes): (JSC::MarkedBlock::Handle::needsDestruction): (JSC::MarkedBlock::Handle::destruction): (JSC::MarkedBlock::Handle::cellKind): (JSC::MarkedBlock::Handle::markCount): (JSC::MarkedBlock::Handle::size): (JSC::MarkedBlock::atomNumber): (JSC::MarkedBlock::flipIfNecessary): (JSC::MarkedBlock::flipIfNecessaryConcurrently): (JSC::MarkedBlock::Handle::flipIfNecessary): (JSC::MarkedBlock::Handle::flipIfNecessaryConcurrently): (JSC::MarkedBlock::Handle::flipForEdenCollection): (JSC::MarkedBlock::assertFlipped): (JSC::MarkedBlock::Handle::assertFlipped): (JSC::MarkedBlock::isMarked): (JSC::MarkedBlock::testAndSetMarked): (JSC::MarkedBlock::Handle::isNewlyAllocated): (JSC::MarkedBlock::Handle::setNewlyAllocated): (JSC::MarkedBlock::Handle::clearNewlyAllocated): (JSC::MarkedBlock::Handle::isMarkedOrNewlyAllocated): (JSC::MarkedBlock::isMarkedOrNewlyAllocated): (JSC::MarkedBlock::Handle::isLive): (JSC::MarkedBlock::isAtom): (JSC::MarkedBlock::Handle::isLiveCell): (JSC::MarkedBlock::Handle::forEachCell): (JSC::MarkedBlock::Handle::forEachLiveCell): (JSC::MarkedBlock::Handle::forEachDeadCell): (JSC::MarkedBlock::Handle::needsSweeping): (JSC::MarkedBlock::Handle::isAllocated): (JSC::MarkedBlock::Handle::isMarked): (JSC::MarkedBlock::Handle::isFreeListed): (JSC::MarkedBlock::hasAnyMarked): (JSC::MarkedBlock::noteMarked): (WTF::MarkedBlockHash::hash): (JSC::MarkedBlock::FreeList::FreeList): Deleted. (JSC::MarkedBlock::allocator): Deleted. (JSC::MarkedBlock::heap): Deleted. (JSC::MarkedBlock::shrink): Deleted. (JSC::MarkedBlock::visitWeakSet): Deleted. (JSC::MarkedBlock::reapWeakSet): Deleted. (JSC::MarkedBlock::willRemoveBlock): Deleted. (JSC::MarkedBlock::didConsumeFreeList): Deleted. (JSC::MarkedBlock::markCount): Deleted. (JSC::MarkedBlock::isEmpty): Deleted. (JSC::MarkedBlock::destruction): Deleted. (JSC::MarkedBlock::cellKind): Deleted. (JSC::MarkedBlock::size): Deleted. (JSC::MarkedBlock::capacity): Deleted. (JSC::MarkedBlock::setMarked): Deleted. (JSC::MarkedBlock::clearMarked): Deleted. (JSC::MarkedBlock::isNewlyAllocated): Deleted. (JSC::MarkedBlock::setNewlyAllocated): Deleted. (JSC::MarkedBlock::clearNewlyAllocated): Deleted. (JSC::MarkedBlock::isLive): Deleted. (JSC::MarkedBlock::isLiveCell): Deleted. (JSC::MarkedBlock::forEachCell): Deleted. (JSC::MarkedBlock::forEachLiveCell): Deleted. (JSC::MarkedBlock::forEachDeadCell): Deleted. (JSC::MarkedBlock::needsSweeping): Deleted. (JSC::MarkedBlock::isAllocated): Deleted. (JSC::MarkedBlock::isMarkedOrRetired): Deleted. * heap/MarkedSpace.cpp: (JSC::MarkedSpace::initializeSizeClassForStepSize): (JSC::MarkedSpace::MarkedSpace): (JSC::MarkedSpace::~MarkedSpace): (JSC::MarkedSpace::lastChanceToFinalize): (JSC::MarkedSpace::allocate): (JSC::MarkedSpace::tryAllocate): (JSC::MarkedSpace::allocateLarge): (JSC::MarkedSpace::tryAllocateLarge): (JSC::MarkedSpace::sweep): (JSC::MarkedSpace::sweepLargeAllocations): (JSC::MarkedSpace::zombifySweep): (JSC::MarkedSpace::resetAllocators): (JSC::MarkedSpace::visitWeakSets): (JSC::MarkedSpace::reapWeakSets): (JSC::MarkedSpace::stopAllocating): (JSC::MarkedSpace::prepareForMarking): (JSC::MarkedSpace::resumeAllocating): (JSC::MarkedSpace::isPagedOut): (JSC::MarkedSpace::freeBlock): (JSC::MarkedSpace::freeOrShrinkBlock): (JSC::MarkedSpace::shrink): (JSC::MarkedSpace::clearNewlyAllocated): (JSC::VerifyMarked::operator()): (JSC::MarkedSpace::flip): (JSC::MarkedSpace::objectCount): (JSC::MarkedSpace::size): (JSC::MarkedSpace::capacity): (JSC::MarkedSpace::addActiveWeakSet): (JSC::MarkedSpace::didAddBlock): (JSC::MarkedSpace::didAllocateInBlock): (JSC::MarkedSpace::forEachAllocator): Deleted. (JSC::VerifyMarkedOrRetired::operator()): Deleted. (JSC::MarkedSpace::clearMarks): Deleted. * heap/MarkedSpace.h: (JSC::MarkedSpace::sizeClassToIndex): (JSC::MarkedSpace::indexToSizeClass): (JSC::MarkedSpace::version): (JSC::MarkedSpace::blocksWithNewObjects): (JSC::MarkedSpace::largeAllocations): (JSC::MarkedSpace::largeAllocationsNurseryOffset): (JSC::MarkedSpace::largeAllocationsOffsetForThisCollection): (JSC::MarkedSpace::largeAllocationsForThisCollectionBegin): (JSC::MarkedSpace::largeAllocationsForThisCollectionEnd): (JSC::MarkedSpace::largeAllocationsForThisCollectionSize): (JSC::MarkedSpace::forEachLiveCell): (JSC::MarkedSpace::forEachDeadCell): (JSC::MarkedSpace::allocatorFor): (JSC::MarkedSpace::destructorAllocatorFor): (JSC::MarkedSpace::auxiliaryAllocatorFor): (JSC::MarkedSpace::allocateWithoutDestructor): (JSC::MarkedSpace::allocateWithDestructor): (JSC::MarkedSpace::allocateAuxiliary): (JSC::MarkedSpace::tryAllocateAuxiliary): (JSC::MarkedSpace::forEachBlock): (JSC::MarkedSpace::forEachAllocator): (JSC::MarkedSpace::optimalSizeFor): (JSC::MarkedSpace::didAddBlock): Deleted. (JSC::MarkedSpace::didAllocateInBlock): Deleted. (JSC::MarkedSpace::objectCount): Deleted. (JSC::MarkedSpace::size): Deleted. (JSC::MarkedSpace::capacity): Deleted. * heap/SlotVisitor.cpp: (JSC::SlotVisitor::SlotVisitor): (JSC::SlotVisitor::didStartMarking): (JSC::SlotVisitor::reset): (JSC::SlotVisitor::append): (JSC::SlotVisitor::appendJSCellOrAuxiliary): (JSC::SlotVisitor::setMarkedAndAppendToMarkStack): (JSC::SlotVisitor::appendToMarkStack): (JSC::SlotVisitor::markAuxiliary): (JSC::SlotVisitor::noteLiveAuxiliaryCell): (JSC::SlotVisitor::visitChildren): * heap/SlotVisitor.h: * heap/WeakBlock.cpp: (JSC::WeakBlock::create): (JSC::WeakBlock::WeakBlock): (JSC::WeakBlock::visit): (JSC::WeakBlock::reap): * heap/WeakBlock.h: (JSC::WeakBlock::disconnectContainer): (JSC::WeakBlock::disconnectMarkedBlock): Deleted. * heap/WeakSet.cpp: (JSC::WeakSet::~WeakSet): (JSC::WeakSet::sweep): (JSC::WeakSet::shrink): (JSC::WeakSet::addAllocator): * heap/WeakSet.h: (JSC::WeakSet::container): (JSC::WeakSet::setContainer): (JSC::WeakSet::WeakSet): (JSC::WeakSet::visit): (JSC::WeakSet::shrink): Deleted. * heap/WeakSetInlines.h: (JSC::WeakSet::allocate): * inspector/InjectedScriptManager.cpp: * inspector/JSGlobalObjectInspectorController.cpp: * inspector/JSJavaScriptCallFrame.cpp: * inspector/ScriptDebugServer.cpp: * inspector/agents/InspectorDebuggerAgent.cpp: * interpreter/CachedCall.h: (JSC::CachedCall::CachedCall): * interpreter/Interpreter.cpp: (JSC::loadVarargs): (JSC::StackFrame::sourceID): Deleted. (JSC::StackFrame::sourceURL): Deleted. (JSC::StackFrame::functionName): Deleted. (JSC::StackFrame::computeLineAndColumn): Deleted. (JSC::StackFrame::toString): Deleted. * interpreter/Interpreter.h: (JSC::StackFrame::isNative): Deleted. * jit/AssemblyHelpers.h: (JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator): (JSC::AssemblyHelpers::emitAllocate): (JSC::AssemblyHelpers::emitAllocateJSCell): (JSC::AssemblyHelpers::emitAllocateJSObject): (JSC::AssemblyHelpers::emitAllocateJSObjectWithKnownSize): (JSC::AssemblyHelpers::emitAllocateVariableSized): * jit/GCAwareJITStubRoutine.cpp: (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine): * jit/JIT.cpp: (JSC::JIT::compileCTINativeCall): (JSC::JIT::link): * jit/JIT.h: (JSC::JIT::compileCTINativeCall): Deleted. * jit/JITExceptions.cpp: (JSC::genericUnwind): * jit/JITExceptions.h: * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_new_object): (JSC::JIT::emitSlow_op_new_object): (JSC::JIT::emit_op_create_this): (JSC::JIT::emitSlow_op_create_this): * jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_new_object): (JSC::JIT::emitSlow_op_new_object): (JSC::JIT::emit_op_create_this): (JSC::JIT::emitSlow_op_create_this): * jit/JITOperations.cpp: * jit/JITOperations.h: * jit/JITPropertyAccess.cpp: (JSC::JIT::emitWriteBarrier): * jit/JITThunks.cpp: * jit/JITThunks.h: * jsc.cpp: (functionDescribeArray): (main): * llint/LLIntData.cpp: (JSC::LLInt::Data::performAssertions): * llint/LLIntExceptions.cpp: * llint/LLIntThunks.cpp: * llint/LLIntThunks.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter.cpp: * llint/LowLevelInterpreter32_64.asm: * llint/LowLevelInterpreter64.asm: * parser/ModuleAnalyzer.cpp: * parser/NodeConstructors.h: * parser/Nodes.h: * profiler/ProfilerBytecode.cpp: * profiler/ProfilerBytecode.h: * profiler/ProfilerBytecodeSequence.cpp: * runtime/ArrayConventions.h: (JSC::indexingHeaderForArrayStorage): (JSC::baseIndexingHeaderForArrayStorage): (JSC::indexingHeaderForArray): Deleted. (JSC::baseIndexingHeaderForArray): Deleted. * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): (JSC::concatAppendOne): (JSC::arrayProtoPrivateFuncConcatMemcpy): * runtime/ArrayStorage.h: (JSC::ArrayStorage::vectorLength): (JSC::ArrayStorage::totalSizeFor): (JSC::ArrayStorage::totalSize): (JSC::ArrayStorage::availableVectorLength): (JSC::ArrayStorage::optimalVectorLength): (JSC::ArrayStorage::sizeFor): Deleted. * runtime/AuxiliaryBarrier.h: Added. (JSC::AuxiliaryBarrier::AuxiliaryBarrier): (JSC::AuxiliaryBarrier::clear): (JSC::AuxiliaryBarrier::get): (JSC::AuxiliaryBarrier::slot): (JSC::AuxiliaryBarrier::operator bool): (JSC::AuxiliaryBarrier::setWithoutBarrier): * runtime/AuxiliaryBarrierInlines.h: Added. (JSC::AuxiliaryBarrier<T>::AuxiliaryBarrier): (JSC::AuxiliaryBarrier<T>::set): * runtime/Butterfly.h: * runtime/ButterflyInlines.h: (JSC::Butterfly::availableContiguousVectorLength): (JSC::Butterfly::optimalContiguousVectorLength): (JSC::Butterfly::createUninitialized): (JSC::Butterfly::growArrayRight): * runtime/ClonedArguments.cpp: (JSC::ClonedArguments::createEmpty): * runtime/CommonSlowPathsExceptions.cpp: * runtime/CommonSlowPathsExceptions.h: * runtime/DataView.cpp: * runtime/DirectArguments.h: * runtime/ECMAScriptSpecInternalFunctions.cpp: * runtime/Error.cpp: * runtime/Error.h: * runtime/ErrorInstance.cpp: * runtime/ErrorInstance.h: * runtime/Exception.cpp: * runtime/Exception.h: * runtime/GeneratorFrame.cpp: * runtime/GeneratorPrototype.cpp: * runtime/InternalFunction.cpp: (JSC::InternalFunction::InternalFunction): * runtime/IntlCollator.cpp: * runtime/IntlCollatorConstructor.cpp: * runtime/IntlCollatorPrototype.cpp: * runtime/IntlDateTimeFormat.cpp: * runtime/IntlDateTimeFormatConstructor.cpp: * runtime/IntlDateTimeFormatPrototype.cpp: * runtime/IntlNumberFormat.cpp: * runtime/IntlNumberFormatConstructor.cpp: * runtime/IntlNumberFormatPrototype.cpp: * runtime/IntlObject.cpp: * runtime/IteratorPrototype.cpp: * runtime/JSArray.cpp: (JSC::JSArray::tryCreateUninitialized): (JSC::JSArray::setLengthWritable): (JSC::JSArray::unshiftCountSlowCase): (JSC::JSArray::setLengthWithArrayStorage): (JSC::JSArray::appendMemcpy): (JSC::JSArray::setLength): (JSC::JSArray::pop): (JSC::JSArray::push): (JSC::JSArray::fastSlice): (JSC::JSArray::shiftCountWithArrayStorage): (JSC::JSArray::shiftCountWithAnyIndexingType): (JSC::JSArray::unshiftCountWithArrayStorage): (JSC::JSArray::fillArgList): (JSC::JSArray::copyToArguments): * runtime/JSArray.h: (JSC::createContiguousArrayButterfly): (JSC::createArrayButterfly): (JSC::JSArray::create): (JSC::JSArray::tryCreateUninitialized): Deleted. * runtime/JSArrayBufferView.h: * runtime/JSCInlines.h: * runtime/JSCJSValue.cpp: (JSC::JSValue::dumpInContextAssumingStructure): * runtime/JSCallee.cpp: (JSC::JSCallee::JSCallee): * runtime/JSCell.cpp: (JSC::JSCell::estimatedSize): * runtime/JSCell.h: (JSC::JSCell::cellStateOffset): Deleted. * runtime/JSCellInlines.h: (JSC::ExecState::vm): (JSC::JSCell::classInfo): (JSC::JSCell::callDestructor): (JSC::JSCell::vm): Deleted. * runtime/JSFunction.cpp: (JSC::JSFunction::create): (JSC::JSFunction::allocateAndInitializeRareData): (JSC::JSFunction::initializeRareData): (JSC::JSFunction::getOwnPropertySlot): (JSC::JSFunction::put): (JSC::JSFunction::deleteProperty): (JSC::JSFunction::defineOwnProperty): (JSC::JSFunction::setFunctionName): (JSC::JSFunction::reifyLength): (JSC::JSFunction::reifyName): (JSC::JSFunction::reifyLazyPropertyIfNeeded): (JSC::JSFunction::reifyBoundNameIfNeeded): * runtime/JSFunction.h: * runtime/JSFunctionInlines.h: (JSC::JSFunction::createWithInvalidatedReallocationWatchpoint): (JSC::JSFunction::JSFunction): * runtime/JSGenericTypedArrayViewInlines.h: (JSC::JSGenericTypedArrayView<Adaptor>::slowDownAndWasteMemory): * runtime/JSInternalPromise.cpp: * runtime/JSInternalPromiseConstructor.cpp: * runtime/JSInternalPromiseDeferred.cpp: * runtime/JSInternalPromisePrototype.cpp: * runtime/JSJob.cpp: * runtime/JSMapIterator.cpp: * runtime/JSModuleNamespaceObject.cpp: * runtime/JSModuleRecord.cpp: * runtime/JSObject.cpp: (JSC::JSObject::visitButterfly): (JSC::JSObject::notifyPresenceOfIndexedAccessors): (JSC::JSObject::createInitialIndexedStorage): (JSC::JSObject::createInitialUndecided): (JSC::JSObject::createInitialInt32): (JSC::JSObject::createInitialDouble): (JSC::JSObject::createInitialContiguous): (JSC::JSObject::createArrayStorage): (JSC::JSObject::createInitialArrayStorage): (JSC::JSObject::convertUndecidedToInt32): (JSC::JSObject::convertUndecidedToContiguous): (JSC::JSObject::convertUndecidedToArrayStorage): (JSC::JSObject::convertInt32ToDouble): (JSC::JSObject::convertInt32ToArrayStorage): (JSC::JSObject::convertDoubleToArrayStorage): (JSC::JSObject::convertContiguousToArrayStorage): (JSC::JSObject::putByIndexBeyondVectorLength): (JSC::JSObject::putDirectIndexBeyondVectorLength): (JSC::JSObject::getNewVectorLength): (JSC::JSObject::increaseVectorLength): (JSC::JSObject::ensureLengthSlow): (JSC::JSObject::growOutOfLineStorage): (JSC::JSObject::copyButterfly): Deleted. (JSC::JSObject::copyBackingStore): Deleted. * runtime/JSObject.h: (JSC::JSObject::globalObject): (JSC::JSObject::putDirectInternal): (JSC::JSObject::setStructureAndReallocateStorageIfNecessary): Deleted. * runtime/JSObjectInlines.h: * runtime/JSPromise.cpp: * runtime/JSPromiseConstructor.cpp: * runtime/JSPromiseDeferred.cpp: * runtime/JSPromisePrototype.cpp: * runtime/JSPropertyNameIterator.cpp: * runtime/JSScope.cpp: (JSC::JSScope::resolve): * runtime/JSScope.h: (JSC::JSScope::globalObject): (JSC::JSScope::vm): Deleted. * runtime/JSSetIterator.cpp: * runtime/JSStringIterator.cpp: * runtime/JSTemplateRegistryKey.cpp: * runtime/JSTypedArrayViewConstructor.cpp: * runtime/JSTypedArrayViewPrototype.cpp: * runtime/JSWeakMap.cpp: * runtime/JSWeakSet.cpp: * runtime/MapConstructor.cpp: * runtime/MapIteratorPrototype.cpp: * runtime/MapPrototype.cpp: * runtime/NativeErrorConstructor.cpp: * runtime/NativeStdFunctionCell.cpp: * runtime/Operations.h: (JSC::scribbleFreeCells): (JSC::scribble): * runtime/Options.h: * runtime/PropertyTable.cpp: * runtime/ProxyConstructor.cpp: * runtime/ProxyObject.cpp: * runtime/ProxyRevoke.cpp: * runtime/RegExp.cpp: (JSC::RegExp::match): (JSC::RegExp::matchConcurrently): (JSC::RegExp::matchCompareWithInterpreter): * runtime/RegExp.h: * runtime/RegExpConstructor.h: * runtime/RegExpInlines.h: (JSC::RegExp::matchInline): * runtime/RegExpMatchesArray.h: (JSC::tryCreateUninitializedRegExpMatchesArray): (JSC::createRegExpMatchesArray): * runtime/RegExpPrototype.cpp: (JSC::genericSplit): * runtime/RuntimeType.cpp: * runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::processUnverifiedStackTraces): * runtime/SetConstructor.cpp: * runtime/SetIteratorPrototype.cpp: * runtime/SetPrototype.cpp: * runtime/StackFrame.cpp: Added. (JSC::StackFrame::sourceID): (JSC::StackFrame::sourceURL): (JSC::StackFrame::functionName): (JSC::StackFrame::computeLineAndColumn): (JSC::StackFrame::toString): * runtime/StackFrame.h: Added. (JSC::StackFrame::isNative): * runtime/StringConstructor.cpp: * runtime/StringIteratorPrototype.cpp: * runtime/StructureInlines.h: (JSC::Structure::propertyTable): * runtime/TemplateRegistry.cpp: * runtime/TestRunnerUtils.cpp: (JSC::finalizeStatsAtEndOfTesting): * runtime/TestRunnerUtils.h: * runtime/TypeProfilerLog.cpp: * runtime/TypeSet.cpp: * runtime/VM.cpp: (JSC::VM::VM): (JSC::VM::ensureStackCapacityForCLoop): (JSC::VM::isSafeToRecurseSoftCLoop): * runtime/VM.h: * runtime/VMEntryScope.h: * runtime/VMInlines.h: (JSC::VM::ensureStackCapacityFor): (JSC::VM::isSafeToRecurseSoft): * runtime/WeakMapConstructor.cpp: * runtime/WeakMapData.cpp: * runtime/WeakMapPrototype.cpp: * runtime/WeakSetConstructor.cpp: * runtime/WeakSetPrototype.cpp: * testRegExp.cpp: (testOneRegExp): * tools/JSDollarVM.cpp: * tools/JSDollarVMPrototype.cpp: (JSC::JSDollarVMPrototype::isInObjectSpace): Source/WebCore: No new tests because no new WebCore behavior. Just rewiring #includes. * ForwardingHeaders/heap/HeapInlines.h: Added. * ForwardingHeaders/interpreter/Interpreter.h: Removed. * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Added. * Modules/indexeddb/IDBCursorWithValue.cpp: * Modules/indexeddb/client/TransactionOperation.cpp: * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: * Modules/indexeddb/server/UniqueIDBDatabase.cpp: * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp: * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp: * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp: * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp: * bindings/js/JSClientRectCustom.cpp: * bindings/js/JSDOMBinding.cpp: * bindings/js/JSDOMBinding.h: * bindings/js/JSDeviceMotionEventCustom.cpp: * bindings/js/JSDeviceOrientationEventCustom.cpp: * bindings/js/JSErrorEventCustom.cpp: * bindings/js/JSIDBCursorWithValueCustom.cpp: * bindings/js/JSIDBIndexCustom.cpp: * bindings/js/JSPopStateEventCustom.cpp: * bindings/js/JSWebGL2RenderingContextCustom.cpp: * bindings/js/JSWorkerGlobalScopeCustom.cpp: * bindings/js/WorkerScriptController.cpp: * contentextensions/ContentExtensionParser.cpp: * dom/ErrorEvent.cpp: * html/HTMLCanvasElement.cpp: * html/MediaDocument.cpp: * inspector/CommandLineAPIModule.cpp: * loader/EmptyClients.cpp: * page/CaptionUserPreferences.cpp: * page/Frame.cpp: * page/PageGroup.cpp: * page/UserContentController.cpp: * platform/mock/mediasource/MockBox.cpp: * testing/GCObservation.cpp: Source/WebKit2: Just rewiring some #includes. * UIProcess/ViewGestureController.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: * WebProcess/Plugins/Netscape/JSNPObject.cpp: Source/WTF: I needed tryFastAlignedMalloc() so I added it. * wtf/FastMalloc.cpp: (WTF::tryFastAlignedMalloc): * wtf/FastMalloc.h: * wtf/ParkingLot.cpp: (WTF::ParkingLot::forEachImpl): (WTF::ParkingLot::forEach): Deleted. * wtf/ParkingLot.h: (WTF::ParkingLot::parkConditionally): (WTF::ParkingLot::unparkOne): (WTF::ParkingLot::forEach): * wtf/ScopedLambda.h: (WTF::scopedLambdaRef): * wtf/SentinelLinkedList.h: (WTF::SentinelLinkedList::forEach): (WTF::RawNode>::takeFrom): * wtf/SimpleStats.h: (WTF::SimpleStats::operator bool): (WTF::SimpleStats::operator!): Deleted. Tools: * DumpRenderTree/TestRunner.cpp: * DumpRenderTree/mac/DumpRenderTree.mm: (DumpRenderTreeMain): * Scripts/run-jsc-stress-tests: * TestWebKitAPI/Tests/WTF/Vector.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/179778@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-06 01:02:22 +00:00
return !!m_count;
JIT heuristics should be hyperbolic https://bugs.webkit.org/show_bug.cgi?id=80055 <rdar://problem/10922260> Source/JavaScriptCore: Reviewed by Oliver Hunt. Added tracking of the amount of executable memory typically used for a bytecode instruction. Modified the execution counter scheme to use this, and the amount of free memory, to determine how long to wait before invoking the JIT. The result is that even if we bomb the VM with more code than can fit in our executable memory pool, we still keep running and almost never run out of executable memory - which ensures that if we have to JIT something critical, then we'll likely have enough memory to do so. This also does not regress performance on the three main benchmarks. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::predictedMachineCodeSize): (JSC): (JSC::CodeBlock::usesOpcode): * bytecode/CodeBlock.h: (CodeBlock): (JSC::CodeBlock::checkIfJITThresholdReached): (JSC::CodeBlock::dontJITAnytimeSoon): (JSC::CodeBlock::jitAfterWarmUp): (JSC::CodeBlock::jitSoon): (JSC::CodeBlock::llintExecuteCounter): (JSC::CodeBlock::counterValueForOptimizeAfterWarmUp): (JSC::CodeBlock::counterValueForOptimizeAfterLongWarmUp): (JSC::CodeBlock::addressOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): (JSC::CodeBlock::offsetOfJITExecutionTotalCount): (JSC::CodeBlock::jitExecuteCounter): (JSC::CodeBlock::checkIfOptimizationThresholdReached): (JSC::CodeBlock::optimizeNextInvocation): (JSC::CodeBlock::dontOptimizeAnytimeSoon): (JSC::CodeBlock::optimizeAfterWarmUp): (JSC::CodeBlock::optimizeAfterLongWarmUp): (JSC::CodeBlock::optimizeSoon): * bytecode/ExecutionCounter.cpp: Added. (JSC): (JSC::ExecutionCounter::ExecutionCounter): (JSC::ExecutionCounter::checkIfThresholdCrossedAndSet): (JSC::ExecutionCounter::setNewThreshold): (JSC::ExecutionCounter::deferIndefinitely): (JSC::ExecutionCounter::applyMemoryUsageHeuristics): (JSC::ExecutionCounter::applyMemoryUsageHeuristicsAndConvertToInt): (JSC::ExecutionCounter::hasCrossedThreshold): (JSC::ExecutionCounter::setThreshold): (JSC::ExecutionCounter::reset): * bytecode/ExecutionCounter.h: Added. (JSC): (ExecutionCounter): (JSC::ExecutionCounter::formattedTotalCount): * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * jit/ExecutableAllocator.cpp: (JSC::DemandExecutableAllocator::allocateNewSpace): (JSC::ExecutableAllocator::underMemoryPressure): (JSC): (JSC::ExecutableAllocator::memoryPressureMultiplier): * jit/ExecutableAllocator.h: * jit/ExecutableAllocatorFixedVMPool.cpp: (JSC::ExecutableAllocator::memoryPressureMultiplier): (JSC): * jit/JIT.cpp: (JSC::JIT::privateCompile): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * llint/LLIntSlowPaths.cpp: (JSC::LLInt::jitCompileAndSetHeuristics): * llint/LowLevelInterpreter32_64.asm: * runtime/JSGlobalData.h: (JSGlobalData): * runtime/Options.cpp: (Options): (JSC::Options::initializeOptions): * runtime/Options.h: (Options): * wtf/SimpleStats.h: Added. (WTF): (SimpleStats): (WTF::SimpleStats::SimpleStats): (WTF::SimpleStats::add): (WTF::SimpleStats::operator!): (WTF::SimpleStats::count): (WTF::SimpleStats::sum): (WTF::SimpleStats::sumOfSquares): (WTF::SimpleStats::mean): (WTF::SimpleStats::variance): (WTF::SimpleStats::standardDeviation): Source/WebCore: Reviewed by Oliver Hunt. No new tests, since there's no new functionality. * ForwardingHeaders/wtf/SimpleStats.h: Added. Canonical link: https://commits.webkit.org/97373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-05 06:52:44 +00:00
}
double count() const
{
return m_count;
}
double sum() const
{
return m_sum;
}
double sumOfSquares() const
{
return m_sumOfSquares;
}
double mean() const
{
return m_sum / m_count;
}
// NB. This gives a biased variance as it divides by the number of samples rather
// than the degrees of freedom. This is fine once the count grows large, which in
// our case will happen rather quickly.
double variance() const
{
if (m_count < 2)
return 0;
// Compute <x^2> - <x>^2
double secondMoment = m_sumOfSquares / m_count;
double firstMoment = m_sum / m_count;
op_mod fails on many interesting corner cases https://bugs.webkit.org/show_bug.cgi?id=81648 Source/JavaScriptCore: Reviewed by Oliver Hunt. Removed most strength reduction for op_mod, and fixed the integer handling to do the right thing for corner cases. Oddly, this revealed bugs in OSR, which this patch also fixes. This patch is performance neutral on all of the major benchmarks we track. * dfg/DFGOperations.cpp: * dfg/DFGOperations.h: * dfg/DFGSpeculativeJIT.cpp: (DFG): (JSC::DFG::SpeculativeJIT::compileSoftModulo): (JSC::DFG::SpeculativeJIT::compileArithMod): * jit/JIT.h: (JIT): * jit/JITArithmetic.cpp: (JSC): (JSC::JIT::emit_op_mod): (JSC::JIT::emitSlow_op_mod): * jit/JITArithmetic32_64.cpp: (JSC::JIT::emit_op_mod): (JSC::JIT::emitSlow_op_mod): * jit/JITOpcodes32_64.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines): (JSC): * jit/JITStubs.h: (TrampolineStructure): (JSC::JITThunks::ctiNativeConstruct): * llint/LowLevelInterpreter64.asm: * wtf/Platform.h: * wtf/SimpleStats.h: (WTF::SimpleStats::variance): LayoutTests: Reviewed by Oliver Hunt. * fast/js/integer-division-neg2tothe32-by-neg1-expected.txt: Added. * fast/js/integer-division-neg2tothe32-by-neg1.html: Added. * fast/js/script-tests/integer-division-neg2tothe32-by-neg1.js: Added. (myDiv): (myDivByNeg1): (myDivNeg2ToThe31): (myMod): (myModByNeg1): (myModNeg2ToThe31): (myOtherDiv): (myOtherDivByNeg1): (myOtherDivNeg2ToThe31): (myOtherMod): (myOtherModByNeg1): (myOtherModNeg2ToThe31): Canonical link: https://commits.webkit.org/98989@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-21 01:29:28 +00:00
double result = secondMoment - firstMoment * firstMoment;
// It's possible to get -epsilon. Protect against this and turn it into
// +0.
if (result <= 0)
return 0;
return result;
JIT heuristics should be hyperbolic https://bugs.webkit.org/show_bug.cgi?id=80055 <rdar://problem/10922260> Source/JavaScriptCore: Reviewed by Oliver Hunt. Added tracking of the amount of executable memory typically used for a bytecode instruction. Modified the execution counter scheme to use this, and the amount of free memory, to determine how long to wait before invoking the JIT. The result is that even if we bomb the VM with more code than can fit in our executable memory pool, we still keep running and almost never run out of executable memory - which ensures that if we have to JIT something critical, then we'll likely have enough memory to do so. This also does not regress performance on the three main benchmarks. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::predictedMachineCodeSize): (JSC): (JSC::CodeBlock::usesOpcode): * bytecode/CodeBlock.h: (CodeBlock): (JSC::CodeBlock::checkIfJITThresholdReached): (JSC::CodeBlock::dontJITAnytimeSoon): (JSC::CodeBlock::jitAfterWarmUp): (JSC::CodeBlock::jitSoon): (JSC::CodeBlock::llintExecuteCounter): (JSC::CodeBlock::counterValueForOptimizeAfterWarmUp): (JSC::CodeBlock::counterValueForOptimizeAfterLongWarmUp): (JSC::CodeBlock::addressOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecuteCounter): (JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): (JSC::CodeBlock::offsetOfJITExecutionTotalCount): (JSC::CodeBlock::jitExecuteCounter): (JSC::CodeBlock::checkIfOptimizationThresholdReached): (JSC::CodeBlock::optimizeNextInvocation): (JSC::CodeBlock::dontOptimizeAnytimeSoon): (JSC::CodeBlock::optimizeAfterWarmUp): (JSC::CodeBlock::optimizeAfterLongWarmUp): (JSC::CodeBlock::optimizeSoon): * bytecode/ExecutionCounter.cpp: Added. (JSC): (JSC::ExecutionCounter::ExecutionCounter): (JSC::ExecutionCounter::checkIfThresholdCrossedAndSet): (JSC::ExecutionCounter::setNewThreshold): (JSC::ExecutionCounter::deferIndefinitely): (JSC::ExecutionCounter::applyMemoryUsageHeuristics): (JSC::ExecutionCounter::applyMemoryUsageHeuristicsAndConvertToInt): (JSC::ExecutionCounter::hasCrossedThreshold): (JSC::ExecutionCounter::setThreshold): (JSC::ExecutionCounter::reset): * bytecode/ExecutionCounter.h: Added. (JSC): (ExecutionCounter): (JSC::ExecutionCounter::formattedTotalCount): * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * jit/ExecutableAllocator.cpp: (JSC::DemandExecutableAllocator::allocateNewSpace): (JSC::ExecutableAllocator::underMemoryPressure): (JSC): (JSC::ExecutableAllocator::memoryPressureMultiplier): * jit/ExecutableAllocator.h: * jit/ExecutableAllocatorFixedVMPool.cpp: (JSC::ExecutableAllocator::memoryPressureMultiplier): (JSC): * jit/JIT.cpp: (JSC::JIT::privateCompile): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * llint/LLIntSlowPaths.cpp: (JSC::LLInt::jitCompileAndSetHeuristics): * llint/LowLevelInterpreter32_64.asm: * runtime/JSGlobalData.h: (JSGlobalData): * runtime/Options.cpp: (Options): (JSC::Options::initializeOptions): * runtime/Options.h: (Options): * wtf/SimpleStats.h: Added. (WTF): (SimpleStats): (WTF::SimpleStats::SimpleStats): (WTF::SimpleStats::add): (WTF::SimpleStats::operator!): (WTF::SimpleStats::count): (WTF::SimpleStats::sum): (WTF::SimpleStats::sumOfSquares): (WTF::SimpleStats::mean): (WTF::SimpleStats::variance): (WTF::SimpleStats::standardDeviation): Source/WebCore: Reviewed by Oliver Hunt. No new tests, since there's no new functionality. * ForwardingHeaders/wtf/SimpleStats.h: Added. Canonical link: https://commits.webkit.org/97373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-05 06:52:44 +00:00
}
// NB. This gives a biased standard deviation. See above.
double standardDeviation() const
{
return sqrt(variance());
}
private:
double m_count;
double m_sum;
double m_sumOfSquares;
};
} // namespace WTF
Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression https://bugs.webkit.org/show_bug.cgi?id=160125 Reviewed by Geoffrey Garen and Keith Miller. JSTests: Most of the things I did properly covered by existing tests, but I found some simple cases of unshifting that had sketchy coverage. * stress/array-storage-array-unshift.js: Added. * stress/contiguous-array-unshift.js: Added. * stress/double-array-unshift.js: Added. * stress/int32-array-unshift.js: Added. Source/bmalloc: I needed to tryMemalign, so I added such a thing. * bmalloc/Allocator.cpp: (bmalloc::Allocator::allocate): (bmalloc::Allocator::tryAllocate): (bmalloc::Allocator::allocateImpl): * bmalloc/Allocator.h: * bmalloc/Cache.h: (bmalloc::Cache::tryAllocate): * bmalloc/bmalloc.h: (bmalloc::api::tryMemalign): Source/JavaScriptCore: In order to make the GC concurrent (bug 149432), we would either need to enable concurrent copying or we would need to not copy. Concurrent copying carries a 1-2% throughput overhead from the barriers alone. Considering that MarkedSpace does a decent job of avoiding fragmentation, it's unlikely that it's worth paying 1-2% throughput for copying. So, we want to get rid of copied space. This change moves copied space's biggest client over to marked space. Moving butterflies to marked space means having them use the new Auxiliary HeapCell allocation path. This is a fairly mechanical change, but it caused performance regressions everywhere, so this change also fixes MarkedSpace's performance issues. At a high level the mechanical changes are: - We use AuxiliaryBarrier instead of CopyBarrier. - We use tryAllocateAuxiliary instead of tryAllocateStorage. I got rid of the silly CheckedBoolean stuff, since it's so much more trouble than it's worth. - The JITs have to emit inlined marked space allocations instead of inline copy space allocations. - Everyone has to get used to zeroing their butterflies after allocation instead of relying on them being pre-zeroed by the GC. Copied space would zero things for you, while marked space doesn't. That's about 1/3 of this change. But this led to performance problems, which I fixed with optimizations that amounted to a major MarkedSpace rewrite: - MarkedSpace always causes internal fragmentation for array allocations because the vector length we choose when we resize usually leads to a cell size that doesn't correspond to any size class. I got around this by making array allocations usually round up vectorLength to the maximum allowed by the size class that we would have allocated in. Also, ensureLengthSlow() and friends first make sure that the requested length can't just be fulfilled with the current allocation size. This safeguard means that not every array allocation has to do size class queries. For example, the fast path of new Array(length) never does any size class queries, under the assumption that (1) the speed gained from avoiding an ensureLengthSlow() call, which then just changes the vectorLength by doing the size class query, is too small to offset the speed lost by doing the query on every allocation and (2) new Array(length) is a pretty good hint that resizing is not very likely. - Size classes in MarkedSpace were way too precise, which led to external fragmentation. This changes MarkedSpace size classes to use a linear progression for very small sizes followed by a geometric progression that naturally transitions to a hyperbolic progression. We want hyperbolic sizes when we get close to blockSize: for example the largest size we want is payloadSize / 2 rounded down, to ensure we get exactly two cells with minimal slop. The next size down should be payloadSize / 3 rounded down, and so on. After the last precise size (80 bytes), we proceed using a geometric progression, but round up each size to minimize slop at the end of the block. This naturally causes the geometric progression to turn hyperbolic for large sizes. The size class configuration happens at VM start-up, so it can be controlled with runtime options. I found that a base of 1.4 works pretty well. - Large allocations caused massive internal fragmentation, since the smallest large allocation had to use exactly blockSize, and the largest small allocation used blockSize / 2. The next size up - the first large allocation size to require two blocks - also had 50% internal fragmentation. This is because we required large allocations to be blockSize aligned, so that MarkedBlock::blockFor() would work. I decided to rewrite all of that. Cells no longer have to be owned by a MarkedBlock. They can now alternatively be owned by a LargeAllocation. These two things are abstracted as CellContainer. You know that a cell is owned by a LargeAllocation if the MarkedBlock::atomSize / 2 bit is set. Basically, large allocations are deliberately misaligned by 8 bytes. This actually works out great since (1) typed arrays won't use large allocations anyway since they have their own malloc fallback and (2) large array butterflies already have a 8 byte header, which means that the 8 byte base misalignment aligns the large array payload on a 16 byte boundary. I took extreme care to make sure that the isLargeAllocation bit checks are as rare as possible; for example, ExecState::vm() skips the check because we know that callees must be small allocations. It's also possible to use template tricks to do one check for cell container kind, and then invoke a function specialized for MarkedBlock or a function specialized for LargeAllocation. LargeAllocation includes stubs for all MarkedBlock methods that get used from functions that are template-specialized like this. That's mostly to speed up the GC marking code. Most other code can use CellContainer API or HeapCell API directly. That's another thing: HeapCell, the common base of JSCell and auxiliary allocations, is now smart enough to do a lot of things for you, like HeapCell::vm(), HeapCell::heap(), HeapCell::isLargeAllocation(), and HeapCell::cellContainer(). The size cutoff for large allocations is runtime-configurable, so long as you don't choose something so small that callees end up large. I found that 400 bytes is roughly optimal. This means that the MarkedBlock size classes end up being: 16, 32, 48, 64, 80, 112, 160, 224, 320 The next size class would have been 432, but that's above the 400 byte cutoff. All of this is configurable with --sizeClassProgression and --largeAllocationCutoff. You can see what size classes you end up with by doing --dumpSizeClasses=true. - Copied space uses 64KB blocks, while marked space used to use 16KB blocks. Allocating a lot of stuff in 16KB blocks was slower than allocating it in 64KB blocks because the GC had a lot of per-block overhead. I removed this overhead: It's now 2x faster to scan all MarkedBlocks because the list that contains the interesting meta-data is allocated on the side, for better locality during a sequential walk. It's no longer necessary to scan MarkedBlocks to find WeakSets, since the sets of WeakSets for eden scan and full scan are maintained on-the-fly. It's no longer necessary to scan all MarkedBlocks to clear mark bits because we now use versioned mark bits: to clear then, just increment the 64-bit heap version. It's no longer necessary to scan retired MarkedBlocks while allocating because marking retires them on-the-fly. It's no longer necessary to sort all blocks in the IncrementalSweeper's snapshot because blocks now know if they are in the snapshot. Put together, these optimizations allowed me to reduce block size to 16KB without losing much performance. There is some small perf loss on JetStream/splay, but not enough to hurt JetStream overall. I tried reducing block sizes further, to 4KB, since that is a progression on membuster. That's not possible yet, since there is still enough per-block overhead yet that such a reduction hurts JetStream too much. I filed a bug about improving this further: https://bugs.webkit.org/show_bug.cgi?id=161581. - Even after all of that, copying butterflies was still faster because it allowed us to skip sweeping dead space. A good GC allocates over dead bytes without explicitly freeing them, so the GC pause is O(size of live), not O(size of live + dead). O(dead) is usually much larger than O(live), especially in an eden collection. Copying satisfies this premise while mark+sweep does not. So, I invented a new kind of allocator: bump'n'pop. Previously, our MarkedSpace allocator was a freelist pop. That's simple and easy to inline but requires that we walk the block to build a free list. This means walking dead space. The new allocator allows totally free MarkedBlocks to simply set up a bump-pointer arena instead. The allocator is a hybrid of bump-pointer and freelist pop. It tries bump first. The bump pointer always bumps by cellSize, so the result of filling a block with bumping looks as if we had used freelist popping to fill it. Additionally, each MarkedBlock now has a bit to quickly tell if the block is entirely free. This makes sweeping O(1) whenever a MarkedBlock is completely empty, which is the common case because of the generational hypothesis: the number of objects that survive an eden collection is a tiny fraction of the number of objects that had been allocated, and this fraction is so small that there are typically fewer than one survivors per MarkedBlock. This change was enough to make this change a net win over tip-of-tree. - FTL now shares the same allocation fast paths as everything else, which is great, because bump'n'pop has gnarly control flow. We don't really want B3 to have to think about that control flow, since it won't be able to improve the machine code we write ourselves. GC fast paths are best written in assembly. So, I've empowered B3 to have even better support for Patchpoint terminals. It's now totally fine for a Patchpoint terminal to be non-Void. So, the new FTL allocation fast paths are just Patchpoint terminals that call through to AssemblyHelpers::emitAllocate(). B3 still reasons about things like constant-folding the size class calculation and constant-hoisting the allocator. Also, I gave the FTL the ability to constant-fold some allocator logic (in case we first assume that we're doing a variable-length allocation but then realize that the length is known). I think it makes sense to have constant folding rules in FTL::Output, or whatever the B3 IR builder is, since this makes lowering easier (you can constant fold during lowering more easily) and it reduces the amount of malloc traffic. In the future, we could teach B3 how to better constant-fold this code. That would require allowing loads to be constant-folded, which is doable but hella tricky. - It used to be that if a logical object allocation required two physical allocations (first the butterfly and then the cell), then the JIT would emit the code in such a way that a failure in the second fast path would cause us to forget the successful first physical allocation. This was pointlessly wasteful. It turns out that it's very cheap to devote a register to storing either the butterfly or null, because the butterfly register is anyway going to be free inside the first allocation. The only overhead here is zeroing the butterfly register. With that in place, we can just pass the butterfly-or-null to the slow path, which can then either allocate a butterfly or not. So now we never waste a successful allocation. This patch implements such a solution both in DFG (where it's easy to do this since we control registers already) and in FTL (where it's annoying, because mutable "butterfly-or-null" variables are hard to say in SSA; also I realized that we had code duplicated the JSArray allocation utility, so I deduplicated it). This came up because in one version of this patch, this wastage would resonate with some Kraken benchmark: the benchmark would always allocate N small things followed by one bigger thing. The problem was I accidentally adjusted the various fixed overheads in MarkedBlock in such a way that the JSObject size class, which both the small and big thing shared for their cell, could hold exactly N cells per MarkedBlock. Then the benchmark would always call slow path when it allocated the big thing. So, it would end up having to allocate the big thing's large butterfly twice, every single time! Ouch! - It used to be that we zeroed CopiedBlocks using memset, and so array allocations enjoyed amortization of the cost of zeroing. This doesn't work anymore - it's now up to the client of the allocator to initialize the object to whatever state they need. It used to be that we would just use a dumb loop. I initially changed this so that we would end up in memset for large allocations, but this didn't actually help performance that much. I got a much better result by playing with different memsets written in assembly. First I wrote one using non-temporal stores. That was a small speed-up over memset. Then I tried the classic "rep stos" approach, and holy cow that version was fast. It's a ~20% speed-up on array allocation microbenchmarks. So, this patch adds code paths to do "rep stos" on x86_64, or memset, or use a loop, as appropriate, for both "contiguous" arrays (holes are zero) and double arrays (holes are PNaN). Note that the JIT always emits either a loop or a flat slab of stores (if the size is known), but those paths in the JIT won't trigger for NewArrayWithSize() if the size is large, since that takes us to the operationNewArrayWithSize() slow path, which calls into JSArray::create(). That's why the optimizations here are all in JSArray::create() - that's the hot place for large arrays that need to be filled with holes. All of this put together gives us neutral perf on JetStream, membuster, and PLT3, a ~1% regression on Speedometer, and up to a 4% regression Kraken. The Kraken regression is because Kraken was allocating exactly 1024 element arrays at a rate of 400MB/sec. This is a best-case scenario for bump allocation. I think that we should fix bmalloc to make up the difference, but take the hit for now because it's a crazy corner case. By comparison, the alternative approach of using a copy barrier would have cost us 1-2%. That's the real apples-to-apples comparison if your premise is that we should have a concurrent GC. After we finish removing copied space, we will be barrier-ready for concurrent GC: we already have a marking barrier and we simply won't need a copying barrier. This change gets us there for the purposes of our benchmarks, since the remaining clients of copied space are not very important. On the other hand, if we keep copying, then getting barrier-ready would mean adding back the copy barrier, which costs more perf. We might get bigger speed-ups once we remove CopiedSpace altogether. That requires moving typed arrays and a few other weird things over to Aux MarkedSpace. This also includes some header sanitization. The introduction of AuxiliaryBarrier, HeapCell, and CellContainer meant that I had to include those files from everywhere. Fortunately, just including JSCInlines.h (instead of manually including the files that includes) is usually enough. So, I made most of JSC's cpp files include JSCInlines.h, which is something that we were already basically doing. In places where JSCInlines.h would be too much, I just included HeapInlines.h. This got weird, because we previously included HeapInlines.h from JSObject.h. That's bad because it led to some circular dependencies, so I fixed it - but that meant having to manually include HeapInlines.h from the places that previously got it implicitly via JSObject.h. But that led to more problems for some reason: I started getting build errors because non-JSC files were having trouble including Opcode.h. That's just silly, since Opcode.h is meant to be an internal JSC header. So, I made it an internal header and made it impossible to include it from outside JSC. This was a lot of work, but it was necessary to get the patch to build on all ports. It's also a net win. There were many places in WebCore that were transitively including a *ton* of JSC headers just because of the JSObject.h->HeapInlines.h edge and a bunch of dependency edges that arose from some public (for WebCore) JSC headers needing Interpreter.h or Opcode.h for bad reasons. * API/JSManagedValue.mm: (-[JSManagedValue initWithValue:]): * API/JSTypedArray.cpp: * API/ObjCCallbackFunction.mm: * API/tests/testapi.mm: (testObjectiveCAPI): (testWeakValue): Deleted. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/builtins/builtins_generate_combined_implementation.py: (BuiltinsCombinedImplementationGenerator.generate_secondary_header_includes): * Scripts/builtins/builtins_generate_internals_wrapper_implementation.py: (BuiltinsInternalsWrapperImplementationGenerator.generate_secondary_header_includes): * Scripts/builtins/builtins_generate_separate_implementation.py: (BuiltinsSeparateImplementationGenerator.generate_secondary_header_includes): * assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::JumpList::link): (JSC::AbstractMacroAssembler::JumpList::linkTo): * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::add32): * assembler/MacroAssemblerCodeRef.cpp: Added. (JSC::MacroAssemblerCodePtr::createLLIntCodePtr): (JSC::MacroAssemblerCodePtr::dumpWithName): (JSC::MacroAssemblerCodePtr::dump): (JSC::MacroAssemblerCodeRef::createLLIntCodeRef): (JSC::MacroAssemblerCodeRef::dump): * assembler/MacroAssemblerCodeRef.h: (JSC::MacroAssemblerCodePtr::createLLIntCodePtr): Deleted. (JSC::MacroAssemblerCodePtr::dumpWithName): Deleted. (JSC::MacroAssemblerCodePtr::dump): Deleted. (JSC::MacroAssemblerCodeRef::createLLIntCodeRef): Deleted. (JSC::MacroAssemblerCodeRef::dump): Deleted. * b3/B3BasicBlock.cpp: (JSC::B3::BasicBlock::appendBoolConstant): * b3/B3BasicBlock.h: * b3/B3DuplicateTails.cpp: * b3/B3StackmapGenerationParams.h: * b3/testb3.cpp: (JSC::B3::testPatchpointTerminalReturnValue): (JSC::B3::run): * bindings/ScriptValue.cpp: * bytecode/AdaptiveInferredPropertyValueWatchpointBase.cpp: * bytecode/BytecodeBasicBlock.cpp: * bytecode/BytecodeLivenessAnalysis.cpp: * bytecode/BytecodeUseDef.h: * bytecode/CallLinkInfo.cpp: (JSC::CallLinkInfo::callTypeFor): * bytecode/CallLinkInfo.h: (JSC::CallLinkInfo::callTypeFor): Deleted. * bytecode/CallLinkStatus.cpp: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::finishCreation): (JSC::CodeBlock::clearLLIntGetByIdCache): (JSC::CodeBlock::predictedMachineCodeSize): * bytecode/CodeBlock.h: (JSC::CodeBlock::jitCodeMap): Deleted. (JSC::clearLLIntGetByIdCache): Deleted. * bytecode/ExecutionCounter.h: * bytecode/Instruction.h: * bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp: (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::fireInternal): * bytecode/ObjectAllocationProfile.h: (JSC::ObjectAllocationProfile::isNull): (JSC::ObjectAllocationProfile::initialize): * bytecode/Opcode.h: (JSC::padOpcodeName): * bytecode/PolymorphicAccess.cpp: (JSC::AccessCase::generateImpl): (JSC::PolymorphicAccess::regenerate): * bytecode/PolymorphicAccess.h: * bytecode/PreciseJumpTargets.cpp: * bytecode/StructureStubInfo.cpp: * bytecode/StructureStubInfo.h: * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedCodeBlock::vm): Deleted. * bytecode/UnlinkedCodeBlock.h: * bytecode/UnlinkedInstructionStream.cpp: * bytecode/UnlinkedInstructionStream.h: * dfg/DFGOperations.cpp: * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::compileMakeRope): (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage): (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage): * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::emitAllocateJSCell): (JSC::DFG::SpeculativeJIT::emitAllocateJSObject): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): (JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): (JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): * dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::handleNode): * ftl/FTLAbstractHeapRepository.h: * ftl/FTLCompile.cpp: * ftl/FTLJITFinalizer.cpp: * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments): (JSC::FTL::DFG::LowerDFGToB3::compileCreateRest): (JSC::FTL::DFG::LowerDFGToB3::allocateArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileMakeRope): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): (JSC::FTL::DFG::LowerDFGToB3::initializeArrayElements): (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorageWithSizeImpl): (JSC::FTL::DFG::LowerDFGToB3::allocateHeapCell): (JSC::FTL::DFG::LowerDFGToB3::allocateCell): (JSC::FTL::DFG::LowerDFGToB3::allocateObject): (JSC::FTL::DFG::LowerDFGToB3::allocatorForSize): (JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject): (JSC::FTL::DFG::LowerDFGToB3::allocateJSArray): (JSC::FTL::DFG::LowerDFGToB3::compileAllocateArrayWithSize): Deleted. * ftl/FTLOutput.cpp: (JSC::FTL::Output::constBool): (JSC::FTL::Output::add): (JSC::FTL::Output::shl): (JSC::FTL::Output::aShr): (JSC::FTL::Output::lShr): (JSC::FTL::Output::zeroExt): (JSC::FTL::Output::equal): (JSC::FTL::Output::notEqual): (JSC::FTL::Output::above): (JSC::FTL::Output::aboveOrEqual): (JSC::FTL::Output::below): (JSC::FTL::Output::belowOrEqual): (JSC::FTL::Output::greaterThan): (JSC::FTL::Output::greaterThanOrEqual): (JSC::FTL::Output::lessThan): (JSC::FTL::Output::lessThanOrEqual): (JSC::FTL::Output::select): (JSC::FTL::Output::appendSuccessor): (JSC::FTL::Output::addIncomingToPhi): * ftl/FTLOutput.h: * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::operator bool): (JSC::FTL::ValueFromBlock::ValueFromBlock): Deleted. * ftl/FTLWeightedTarget.h: (JSC::FTL::WeightedTarget::frequentedBlock): * heap/CellContainer.h: Added. (JSC::CellContainer::CellContainer): (JSC::CellContainer::operator bool): (JSC::CellContainer::isMarkedBlock): (JSC::CellContainer::isLargeAllocation): (JSC::CellContainer::markedBlock): (JSC::CellContainer::largeAllocation): * heap/CellContainerInlines.h: Added. (JSC::CellContainer::isMarked): (JSC::CellContainer::isMarkedOrNewlyAllocated): (JSC::CellContainer::noteMarked): (JSC::CellContainer::cellSize): (JSC::CellContainer::weakSet): (JSC::CellContainer::flipIfNecessary): * heap/ConservativeRoots.cpp: (JSC::ConservativeRoots::ConservativeRoots): (JSC::ConservativeRoots::~ConservativeRoots): (JSC::ConservativeRoots::grow): (JSC::ConservativeRoots::genericAddPointer): (JSC::ConservativeRoots::genericAddSpan): * heap/ConservativeRoots.h: (JSC::ConservativeRoots::roots): * heap/CopyToken.h: * heap/FreeList.cpp: Added. (JSC::FreeList::dump): * heap/FreeList.h: Added. (JSC::FreeList::FreeList): (JSC::FreeList::list): (JSC::FreeList::bump): (JSC::FreeList::operator==): (JSC::FreeList::operator!=): (JSC::FreeList::operator bool): (JSC::FreeList::allocationWillFail): (JSC::FreeList::allocationWillSucceed): * heap/GCTypeMap.h: Added. (JSC::GCTypeMap::operator[]): * heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::lastChanceToFinalize): (JSC::Heap::finalizeUnconditionalFinalizers): (JSC::Heap::markRoots): (JSC::Heap::copyBackingStores): (JSC::Heap::gatherStackRoots): (JSC::Heap::gatherJSStackRoots): (JSC::Heap::gatherScratchBufferRoots): (JSC::Heap::clearLivenessData): (JSC::Heap::visitSmallStrings): (JSC::Heap::visitConservativeRoots): (JSC::Heap::removeDeadCompilerWorklistEntries): (JSC::Heap::gatherExtraHeapSnapshotData): (JSC::Heap::removeDeadHeapSnapshotNodes): (JSC::Heap::visitProtectedObjects): (JSC::Heap::visitArgumentBuffers): (JSC::Heap::visitException): (JSC::Heap::visitStrongHandles): (JSC::Heap::visitHandleStack): (JSC::Heap::visitSamplingProfiler): (JSC::Heap::traceCodeBlocksAndJITStubRoutines): (JSC::Heap::converge): (JSC::Heap::visitWeakHandles): (JSC::Heap::updateObjectCounts): (JSC::Heap::clearUnmarkedExecutables): (JSC::Heap::deleteUnmarkedCompiledCode): (JSC::Heap::collectAllGarbage): (JSC::Heap::collect): (JSC::Heap::collectWithoutAnySweep): (JSC::Heap::collectImpl): (JSC::Heap::suspendCompilerThreads): (JSC::Heap::willStartCollection): (JSC::Heap::flushOldStructureIDTables): (JSC::Heap::flushWriteBarrierBuffer): (JSC::Heap::stopAllocation): (JSC::Heap::prepareForMarking): (JSC::Heap::reapWeakHandles): (JSC::Heap::pruneStaleEntriesFromWeakGCMaps): (JSC::Heap::sweepArrayBuffers): (JSC::MarkedBlockSnapshotFunctor::MarkedBlockSnapshotFunctor): (JSC::MarkedBlockSnapshotFunctor::operator()): (JSC::Heap::snapshotMarkedSpace): (JSC::Heap::deleteSourceProviderCaches): (JSC::Heap::notifyIncrementalSweeper): (JSC::Heap::writeBarrierCurrentlyExecutingCodeBlocks): (JSC::Heap::resetAllocators): (JSC::Heap::updateAllocationLimits): (JSC::Heap::didFinishCollection): (JSC::Heap::resumeCompilerThreads): (JSC::Zombify::visit): (JSC::Heap::forEachCodeBlockImpl): * heap/Heap.h: (JSC::Heap::allocatorForObjectWithoutDestructor): (JSC::Heap::allocatorForObjectWithDestructor): (JSC::Heap::allocatorForAuxiliaryData): (JSC::Heap::jitStubRoutines): (JSC::Heap::codeBlockSet): (JSC::Heap::storageAllocator): Deleted. * heap/HeapCell.h: (JSC::HeapCell::isZapped): Deleted. * heap/HeapCellInlines.h: Added. (JSC::HeapCell::isLargeAllocation): (JSC::HeapCell::cellContainer): (JSC::HeapCell::markedBlock): (JSC::HeapCell::largeAllocation): (JSC::HeapCell::heap): (JSC::HeapCell::vm): (JSC::HeapCell::cellSize): (JSC::HeapCell::allocatorAttributes): (JSC::HeapCell::destructionMode): (JSC::HeapCell::cellKind): * heap/HeapInlines.h: (JSC::Heap::heap): (JSC::Heap::isLive): (JSC::Heap::isMarked): (JSC::Heap::testAndSetMarked): (JSC::Heap::setMarked): (JSC::Heap::cellSize): (JSC::Heap::forEachCodeBlock): (JSC::Heap::allocateObjectOfType): (JSC::Heap::subspaceForObjectOfType): (JSC::Heap::allocatorForObjectOfType): (JSC::Heap::allocateAuxiliary): (JSC::Heap::tryAllocateAuxiliary): (JSC::Heap::tryReallocateAuxiliary): (JSC::Heap::isPointerGCObject): Deleted. (JSC::Heap::isValueGCObject): Deleted. * heap/HeapOperation.cpp: Added. (WTF::printInternal): * heap/HeapOperation.h: * heap/HeapUtil.h: Added. (JSC::HeapUtil::findGCObjectPointersForMarking): (JSC::HeapUtil::isPointerGCObjectJSCell): (JSC::HeapUtil::isValueGCObject): * heap/IncrementalSweeper.cpp: (JSC::IncrementalSweeper::sweepNextBlock): * heap/IncrementalSweeper.h: * heap/LargeAllocation.cpp: Added. (JSC::LargeAllocation::tryCreate): (JSC::LargeAllocation::LargeAllocation): (JSC::LargeAllocation::lastChanceToFinalize): (JSC::LargeAllocation::shrink): (JSC::LargeAllocation::visitWeakSet): (JSC::LargeAllocation::reapWeakSet): (JSC::LargeAllocation::flip): (JSC::LargeAllocation::isEmpty): (JSC::LargeAllocation::sweep): (JSC::LargeAllocation::destroy): (JSC::LargeAllocation::dump): * heap/LargeAllocation.h: Added. (JSC::LargeAllocation::fromCell): (JSC::LargeAllocation::cell): (JSC::LargeAllocation::isLargeAllocation): (JSC::LargeAllocation::heap): (JSC::LargeAllocation::vm): (JSC::LargeAllocation::weakSet): (JSC::LargeAllocation::clearNewlyAllocated): (JSC::LargeAllocation::isNewlyAllocated): (JSC::LargeAllocation::isMarked): (JSC::LargeAllocation::isMarkedOrNewlyAllocated): (JSC::LargeAllocation::isLive): (JSC::LargeAllocation::hasValidCell): (JSC::LargeAllocation::cellSize): (JSC::LargeAllocation::aboveLowerBound): (JSC::LargeAllocation::belowUpperBound): (JSC::LargeAllocation::contains): (JSC::LargeAllocation::attributes): (JSC::LargeAllocation::flipIfNecessary): (JSC::LargeAllocation::flipIfNecessaryConcurrently): (JSC::LargeAllocation::testAndSetMarked): (JSC::LargeAllocation::setMarked): (JSC::LargeAllocation::clearMarked): (JSC::LargeAllocation::noteMarked): (JSC::LargeAllocation::headerSize): * heap/MarkedAllocator.cpp: (JSC::MarkedAllocator::MarkedAllocator): (JSC::MarkedAllocator::isPagedOut): (JSC::MarkedAllocator::retire): (JSC::MarkedAllocator::filterNextBlock): (JSC::MarkedAllocator::setNextBlockToSweep): (JSC::MarkedAllocator::tryAllocateWithoutCollectingImpl): (JSC::MarkedAllocator::tryAllocateWithoutCollecting): (JSC::MarkedAllocator::allocateSlowCase): (JSC::MarkedAllocator::tryAllocateSlowCase): (JSC::MarkedAllocator::allocateSlowCaseImpl): (JSC::blockHeaderSize): (JSC::MarkedAllocator::blockSizeForBytes): (JSC::MarkedAllocator::tryAllocateBlock): (JSC::MarkedAllocator::addBlock): (JSC::MarkedAllocator::removeBlock): (JSC::MarkedAllocator::stopAllocating): (JSC::MarkedAllocator::reset): (JSC::MarkedAllocator::lastChanceToFinalize): (JSC::MarkedAllocator::setFreeList): (JSC::isListPagedOut): Deleted. (JSC::MarkedAllocator::tryAllocateHelper): Deleted. (JSC::MarkedAllocator::tryPopFreeList): Deleted. (JSC::MarkedAllocator::tryAllocate): Deleted. (JSC::MarkedAllocator::allocateBlock): Deleted. * heap/MarkedAllocator.h: (JSC::MarkedAllocator::takeLastActiveBlock): (JSC::MarkedAllocator::offsetOfFreeList): (JSC::MarkedAllocator::offsetOfCellSize): (JSC::MarkedAllocator::tryAllocate): (JSC::MarkedAllocator::allocate): (JSC::MarkedAllocator::forEachBlock): (JSC::MarkedAllocator::offsetOfFreeListHead): Deleted. (JSC::MarkedAllocator::MarkedAllocator): Deleted. (JSC::MarkedAllocator::init): Deleted. (JSC::MarkedAllocator::stopAllocating): Deleted. * heap/MarkedBlock.cpp: (JSC::MarkedBlock::tryCreate): (JSC::MarkedBlock::Handle::Handle): (JSC::MarkedBlock::Handle::~Handle): (JSC::MarkedBlock::MarkedBlock): (JSC::MarkedBlock::Handle::specializedSweep): (JSC::MarkedBlock::Handle::sweep): (JSC::MarkedBlock::Handle::sweepHelperSelectScribbleMode): (JSC::MarkedBlock::Handle::sweepHelperSelectStateAndSweepMode): (JSC::MarkedBlock::Handle::unsweepWithNoNewlyAllocated): (JSC::SetNewlyAllocatedFunctor::SetNewlyAllocatedFunctor): (JSC::SetNewlyAllocatedFunctor::operator()): (JSC::MarkedBlock::Handle::stopAllocating): (JSC::MarkedBlock::Handle::lastChanceToFinalize): (JSC::MarkedBlock::Handle::resumeAllocating): (JSC::MarkedBlock::Handle::zap): (JSC::MarkedBlock::Handle::forEachFreeCell): (JSC::MarkedBlock::flipIfNecessary): (JSC::MarkedBlock::Handle::flipIfNecessary): (JSC::MarkedBlock::flipIfNecessarySlow): (JSC::MarkedBlock::flipIfNecessaryConcurrentlySlow): (JSC::MarkedBlock::clearMarks): (JSC::MarkedBlock::assertFlipped): (JSC::MarkedBlock::needsFlip): (JSC::MarkedBlock::Handle::needsFlip): (JSC::MarkedBlock::Handle::willRemoveBlock): (JSC::MarkedBlock::Handle::didConsumeFreeList): (JSC::MarkedBlock::markCount): (JSC::MarkedBlock::Handle::isEmpty): (JSC::MarkedBlock::clearHasAnyMarked): (JSC::MarkedBlock::noteMarkedSlow): (WTF::printInternal): (JSC::MarkedBlock::create): Deleted. (JSC::MarkedBlock::destroy): Deleted. (JSC::MarkedBlock::callDestructor): Deleted. (JSC::MarkedBlock::specializedSweep): Deleted. (JSC::MarkedBlock::sweep): Deleted. (JSC::MarkedBlock::sweepHelper): Deleted. (JSC::MarkedBlock::stopAllocating): Deleted. (JSC::MarkedBlock::clearMarksWithCollectionType): Deleted. (JSC::MarkedBlock::lastChanceToFinalize): Deleted. (JSC::MarkedBlock::resumeAllocating): Deleted. (JSC::MarkedBlock::didRetireBlock): Deleted. * heap/MarkedBlock.h: (JSC::MarkedBlock::VoidFunctor::returnValue): (JSC::MarkedBlock::CountFunctor::CountFunctor): (JSC::MarkedBlock::CountFunctor::count): (JSC::MarkedBlock::CountFunctor::returnValue): (JSC::MarkedBlock::Handle::hasAnyNewlyAllocated): (JSC::MarkedBlock::Handle::isOnBlocksToSweep): (JSC::MarkedBlock::Handle::setIsOnBlocksToSweep): (JSC::MarkedBlock::Handle::state): (JSC::MarkedBlock::needsDestruction): (JSC::MarkedBlock::handle): (JSC::MarkedBlock::Handle::block): (JSC::MarkedBlock::firstAtom): (JSC::MarkedBlock::atoms): (JSC::MarkedBlock::isAtomAligned): (JSC::MarkedBlock::Handle::cellAlign): (JSC::MarkedBlock::blockFor): (JSC::MarkedBlock::Handle::allocator): (JSC::MarkedBlock::Handle::heap): (JSC::MarkedBlock::Handle::vm): (JSC::MarkedBlock::vm): (JSC::MarkedBlock::Handle::weakSet): (JSC::MarkedBlock::weakSet): (JSC::MarkedBlock::Handle::shrink): (JSC::MarkedBlock::Handle::visitWeakSet): (JSC::MarkedBlock::Handle::reapWeakSet): (JSC::MarkedBlock::Handle::cellSize): (JSC::MarkedBlock::cellSize): (JSC::MarkedBlock::Handle::attributes): (JSC::MarkedBlock::attributes): (JSC::MarkedBlock::Handle::needsDestruction): (JSC::MarkedBlock::Handle::destruction): (JSC::MarkedBlock::Handle::cellKind): (JSC::MarkedBlock::Handle::markCount): (JSC::MarkedBlock::Handle::size): (JSC::MarkedBlock::atomNumber): (JSC::MarkedBlock::flipIfNecessary): (JSC::MarkedBlock::flipIfNecessaryConcurrently): (JSC::MarkedBlock::Handle::flipIfNecessary): (JSC::MarkedBlock::Handle::flipIfNecessaryConcurrently): (JSC::MarkedBlock::Handle::flipForEdenCollection): (JSC::MarkedBlock::assertFlipped): (JSC::MarkedBlock::Handle::assertFlipped): (JSC::MarkedBlock::isMarked): (JSC::MarkedBlock::testAndSetMarked): (JSC::MarkedBlock::Handle::isNewlyAllocated): (JSC::MarkedBlock::Handle::setNewlyAllocated): (JSC::MarkedBlock::Handle::clearNewlyAllocated): (JSC::MarkedBlock::Handle::isMarkedOrNewlyAllocated): (JSC::MarkedBlock::isMarkedOrNewlyAllocated): (JSC::MarkedBlock::Handle::isLive): (JSC::MarkedBlock::isAtom): (JSC::MarkedBlock::Handle::isLiveCell): (JSC::MarkedBlock::Handle::forEachCell): (JSC::MarkedBlock::Handle::forEachLiveCell): (JSC::MarkedBlock::Handle::forEachDeadCell): (JSC::MarkedBlock::Handle::needsSweeping): (JSC::MarkedBlock::Handle::isAllocated): (JSC::MarkedBlock::Handle::isMarked): (JSC::MarkedBlock::Handle::isFreeListed): (JSC::MarkedBlock::hasAnyMarked): (JSC::MarkedBlock::noteMarked): (WTF::MarkedBlockHash::hash): (JSC::MarkedBlock::FreeList::FreeList): Deleted. (JSC::MarkedBlock::allocator): Deleted. (JSC::MarkedBlock::heap): Deleted. (JSC::MarkedBlock::shrink): Deleted. (JSC::MarkedBlock::visitWeakSet): Deleted. (JSC::MarkedBlock::reapWeakSet): Deleted. (JSC::MarkedBlock::willRemoveBlock): Deleted. (JSC::MarkedBlock::didConsumeFreeList): Deleted. (JSC::MarkedBlock::markCount): Deleted. (JSC::MarkedBlock::isEmpty): Deleted. (JSC::MarkedBlock::destruction): Deleted. (JSC::MarkedBlock::cellKind): Deleted. (JSC::MarkedBlock::size): Deleted. (JSC::MarkedBlock::capacity): Deleted. (JSC::MarkedBlock::setMarked): Deleted. (JSC::MarkedBlock::clearMarked): Deleted. (JSC::MarkedBlock::isNewlyAllocated): Deleted. (JSC::MarkedBlock::setNewlyAllocated): Deleted. (JSC::MarkedBlock::clearNewlyAllocated): Deleted. (JSC::MarkedBlock::isLive): Deleted. (JSC::MarkedBlock::isLiveCell): Deleted. (JSC::MarkedBlock::forEachCell): Deleted. (JSC::MarkedBlock::forEachLiveCell): Deleted. (JSC::MarkedBlock::forEachDeadCell): Deleted. (JSC::MarkedBlock::needsSweeping): Deleted. (JSC::MarkedBlock::isAllocated): Deleted. (JSC::MarkedBlock::isMarkedOrRetired): Deleted. * heap/MarkedSpace.cpp: (JSC::MarkedSpace::initializeSizeClassForStepSize): (JSC::MarkedSpace::MarkedSpace): (JSC::MarkedSpace::~MarkedSpace): (JSC::MarkedSpace::lastChanceToFinalize): (JSC::MarkedSpace::allocate): (JSC::MarkedSpace::tryAllocate): (JSC::MarkedSpace::allocateLarge): (JSC::MarkedSpace::tryAllocateLarge): (JSC::MarkedSpace::sweep): (JSC::MarkedSpace::sweepLargeAllocations): (JSC::MarkedSpace::zombifySweep): (JSC::MarkedSpace::resetAllocators): (JSC::MarkedSpace::visitWeakSets): (JSC::MarkedSpace::reapWeakSets): (JSC::MarkedSpace::stopAllocating): (JSC::MarkedSpace::prepareForMarking): (JSC::MarkedSpace::resumeAllocating): (JSC::MarkedSpace::isPagedOut): (JSC::MarkedSpace::freeBlock): (JSC::MarkedSpace::freeOrShrinkBlock): (JSC::MarkedSpace::shrink): (JSC::MarkedSpace::clearNewlyAllocated): (JSC::VerifyMarked::operator()): (JSC::MarkedSpace::flip): (JSC::MarkedSpace::objectCount): (JSC::MarkedSpace::size): (JSC::MarkedSpace::capacity): (JSC::MarkedSpace::addActiveWeakSet): (JSC::MarkedSpace::didAddBlock): (JSC::MarkedSpace::didAllocateInBlock): (JSC::MarkedSpace::forEachAllocator): Deleted. (JSC::VerifyMarkedOrRetired::operator()): Deleted. (JSC::MarkedSpace::clearMarks): Deleted. * heap/MarkedSpace.h: (JSC::MarkedSpace::sizeClassToIndex): (JSC::MarkedSpace::indexToSizeClass): (JSC::MarkedSpace::version): (JSC::MarkedSpace::blocksWithNewObjects): (JSC::MarkedSpace::largeAllocations): (JSC::MarkedSpace::largeAllocationsNurseryOffset): (JSC::MarkedSpace::largeAllocationsOffsetForThisCollection): (JSC::MarkedSpace::largeAllocationsForThisCollectionBegin): (JSC::MarkedSpace::largeAllocationsForThisCollectionEnd): (JSC::MarkedSpace::largeAllocationsForThisCollectionSize): (JSC::MarkedSpace::forEachLiveCell): (JSC::MarkedSpace::forEachDeadCell): (JSC::MarkedSpace::allocatorFor): (JSC::MarkedSpace::destructorAllocatorFor): (JSC::MarkedSpace::auxiliaryAllocatorFor): (JSC::MarkedSpace::allocateWithoutDestructor): (JSC::MarkedSpace::allocateWithDestructor): (JSC::MarkedSpace::allocateAuxiliary): (JSC::MarkedSpace::tryAllocateAuxiliary): (JSC::MarkedSpace::forEachBlock): (JSC::MarkedSpace::forEachAllocator): (JSC::MarkedSpace::optimalSizeFor): (JSC::MarkedSpace::didAddBlock): Deleted. (JSC::MarkedSpace::didAllocateInBlock): Deleted. (JSC::MarkedSpace::objectCount): Deleted. (JSC::MarkedSpace::size): Deleted. (JSC::MarkedSpace::capacity): Deleted. * heap/SlotVisitor.cpp: (JSC::SlotVisitor::SlotVisitor): (JSC::SlotVisitor::didStartMarking): (JSC::SlotVisitor::reset): (JSC::SlotVisitor::append): (JSC::SlotVisitor::appendJSCellOrAuxiliary): (JSC::SlotVisitor::setMarkedAndAppendToMarkStack): (JSC::SlotVisitor::appendToMarkStack): (JSC::SlotVisitor::markAuxiliary): (JSC::SlotVisitor::noteLiveAuxiliaryCell): (JSC::SlotVisitor::visitChildren): * heap/SlotVisitor.h: * heap/WeakBlock.cpp: (JSC::WeakBlock::create): (JSC::WeakBlock::WeakBlock): (JSC::WeakBlock::visit): (JSC::WeakBlock::reap): * heap/WeakBlock.h: (JSC::WeakBlock::disconnectContainer): (JSC::WeakBlock::disconnectMarkedBlock): Deleted. * heap/WeakSet.cpp: (JSC::WeakSet::~WeakSet): (JSC::WeakSet::sweep): (JSC::WeakSet::shrink): (JSC::WeakSet::addAllocator): * heap/WeakSet.h: (JSC::WeakSet::container): (JSC::WeakSet::setContainer): (JSC::WeakSet::WeakSet): (JSC::WeakSet::visit): (JSC::WeakSet::shrink): Deleted. * heap/WeakSetInlines.h: (JSC::WeakSet::allocate): * inspector/InjectedScriptManager.cpp: * inspector/JSGlobalObjectInspectorController.cpp: * inspector/JSJavaScriptCallFrame.cpp: * inspector/ScriptDebugServer.cpp: * inspector/agents/InspectorDebuggerAgent.cpp: * interpreter/CachedCall.h: (JSC::CachedCall::CachedCall): * interpreter/Interpreter.cpp: (JSC::loadVarargs): (JSC::StackFrame::sourceID): Deleted. (JSC::StackFrame::sourceURL): Deleted. (JSC::StackFrame::functionName): Deleted. (JSC::StackFrame::computeLineAndColumn): Deleted. (JSC::StackFrame::toString): Deleted. * interpreter/Interpreter.h: (JSC::StackFrame::isNative): Deleted. * jit/AssemblyHelpers.h: (JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator): (JSC::AssemblyHelpers::emitAllocate): (JSC::AssemblyHelpers::emitAllocateJSCell): (JSC::AssemblyHelpers::emitAllocateJSObject): (JSC::AssemblyHelpers::emitAllocateJSObjectWithKnownSize): (JSC::AssemblyHelpers::emitAllocateVariableSized): * jit/GCAwareJITStubRoutine.cpp: (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine): * jit/JIT.cpp: (JSC::JIT::compileCTINativeCall): (JSC::JIT::link): * jit/JIT.h: (JSC::JIT::compileCTINativeCall): Deleted. * jit/JITExceptions.cpp: (JSC::genericUnwind): * jit/JITExceptions.h: * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_new_object): (JSC::JIT::emitSlow_op_new_object): (JSC::JIT::emit_op_create_this): (JSC::JIT::emitSlow_op_create_this): * jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_new_object): (JSC::JIT::emitSlow_op_new_object): (JSC::JIT::emit_op_create_this): (JSC::JIT::emitSlow_op_create_this): * jit/JITOperations.cpp: * jit/JITOperations.h: * jit/JITPropertyAccess.cpp: (JSC::JIT::emitWriteBarrier): * jit/JITThunks.cpp: * jit/JITThunks.h: * jsc.cpp: (functionDescribeArray): (main): * llint/LLIntData.cpp: (JSC::LLInt::Data::performAssertions): * llint/LLIntExceptions.cpp: * llint/LLIntThunks.cpp: * llint/LLIntThunks.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter.cpp: * llint/LowLevelInterpreter32_64.asm: * llint/LowLevelInterpreter64.asm: * parser/ModuleAnalyzer.cpp: * parser/NodeConstructors.h: * parser/Nodes.h: * profiler/ProfilerBytecode.cpp: * profiler/ProfilerBytecode.h: * profiler/ProfilerBytecodeSequence.cpp: * runtime/ArrayConventions.h: (JSC::indexingHeaderForArrayStorage): (JSC::baseIndexingHeaderForArrayStorage): (JSC::indexingHeaderForArray): Deleted. (JSC::baseIndexingHeaderForArray): Deleted. * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): (JSC::concatAppendOne): (JSC::arrayProtoPrivateFuncConcatMemcpy): * runtime/ArrayStorage.h: (JSC::ArrayStorage::vectorLength): (JSC::ArrayStorage::totalSizeFor): (JSC::ArrayStorage::totalSize): (JSC::ArrayStorage::availableVectorLength): (JSC::ArrayStorage::optimalVectorLength): (JSC::ArrayStorage::sizeFor): Deleted. * runtime/AuxiliaryBarrier.h: Added. (JSC::AuxiliaryBarrier::AuxiliaryBarrier): (JSC::AuxiliaryBarrier::clear): (JSC::AuxiliaryBarrier::get): (JSC::AuxiliaryBarrier::slot): (JSC::AuxiliaryBarrier::operator bool): (JSC::AuxiliaryBarrier::setWithoutBarrier): * runtime/AuxiliaryBarrierInlines.h: Added. (JSC::AuxiliaryBarrier<T>::AuxiliaryBarrier): (JSC::AuxiliaryBarrier<T>::set): * runtime/Butterfly.h: * runtime/ButterflyInlines.h: (JSC::Butterfly::availableContiguousVectorLength): (JSC::Butterfly::optimalContiguousVectorLength): (JSC::Butterfly::createUninitialized): (JSC::Butterfly::growArrayRight): * runtime/ClonedArguments.cpp: (JSC::ClonedArguments::createEmpty): * runtime/CommonSlowPathsExceptions.cpp: * runtime/CommonSlowPathsExceptions.h: * runtime/DataView.cpp: * runtime/DirectArguments.h: * runtime/ECMAScriptSpecInternalFunctions.cpp: * runtime/Error.cpp: * runtime/Error.h: * runtime/ErrorInstance.cpp: * runtime/ErrorInstance.h: * runtime/Exception.cpp: * runtime/Exception.h: * runtime/GeneratorFrame.cpp: * runtime/GeneratorPrototype.cpp: * runtime/InternalFunction.cpp: (JSC::InternalFunction::InternalFunction): * runtime/IntlCollator.cpp: * runtime/IntlCollatorConstructor.cpp: * runtime/IntlCollatorPrototype.cpp: * runtime/IntlDateTimeFormat.cpp: * runtime/IntlDateTimeFormatConstructor.cpp: * runtime/IntlDateTimeFormatPrototype.cpp: * runtime/IntlNumberFormat.cpp: * runtime/IntlNumberFormatConstructor.cpp: * runtime/IntlNumberFormatPrototype.cpp: * runtime/IntlObject.cpp: * runtime/IteratorPrototype.cpp: * runtime/JSArray.cpp: (JSC::JSArray::tryCreateUninitialized): (JSC::JSArray::setLengthWritable): (JSC::JSArray::unshiftCountSlowCase): (JSC::JSArray::setLengthWithArrayStorage): (JSC::JSArray::appendMemcpy): (JSC::JSArray::setLength): (JSC::JSArray::pop): (JSC::JSArray::push): (JSC::JSArray::fastSlice): (JSC::JSArray::shiftCountWithArrayStorage): (JSC::JSArray::shiftCountWithAnyIndexingType): (JSC::JSArray::unshiftCountWithArrayStorage): (JSC::JSArray::fillArgList): (JSC::JSArray::copyToArguments): * runtime/JSArray.h: (JSC::createContiguousArrayButterfly): (JSC::createArrayButterfly): (JSC::JSArray::create): (JSC::JSArray::tryCreateUninitialized): Deleted. * runtime/JSArrayBufferView.h: * runtime/JSCInlines.h: * runtime/JSCJSValue.cpp: (JSC::JSValue::dumpInContextAssumingStructure): * runtime/JSCallee.cpp: (JSC::JSCallee::JSCallee): * runtime/JSCell.cpp: (JSC::JSCell::estimatedSize): * runtime/JSCell.h: (JSC::JSCell::cellStateOffset): Deleted. * runtime/JSCellInlines.h: (JSC::ExecState::vm): (JSC::JSCell::classInfo): (JSC::JSCell::callDestructor): (JSC::JSCell::vm): Deleted. * runtime/JSFunction.cpp: (JSC::JSFunction::create): (JSC::JSFunction::allocateAndInitializeRareData): (JSC::JSFunction::initializeRareData): (JSC::JSFunction::getOwnPropertySlot): (JSC::JSFunction::put): (JSC::JSFunction::deleteProperty): (JSC::JSFunction::defineOwnProperty): (JSC::JSFunction::setFunctionName): (JSC::JSFunction::reifyLength): (JSC::JSFunction::reifyName): (JSC::JSFunction::reifyLazyPropertyIfNeeded): (JSC::JSFunction::reifyBoundNameIfNeeded): * runtime/JSFunction.h: * runtime/JSFunctionInlines.h: (JSC::JSFunction::createWithInvalidatedReallocationWatchpoint): (JSC::JSFunction::JSFunction): * runtime/JSGenericTypedArrayViewInlines.h: (JSC::JSGenericTypedArrayView<Adaptor>::slowDownAndWasteMemory): * runtime/JSInternalPromise.cpp: * runtime/JSInternalPromiseConstructor.cpp: * runtime/JSInternalPromiseDeferred.cpp: * runtime/JSInternalPromisePrototype.cpp: * runtime/JSJob.cpp: * runtime/JSMapIterator.cpp: * runtime/JSModuleNamespaceObject.cpp: * runtime/JSModuleRecord.cpp: * runtime/JSObject.cpp: (JSC::JSObject::visitButterfly): (JSC::JSObject::notifyPresenceOfIndexedAccessors): (JSC::JSObject::createInitialIndexedStorage): (JSC::JSObject::createInitialUndecided): (JSC::JSObject::createInitialInt32): (JSC::JSObject::createInitialDouble): (JSC::JSObject::createInitialContiguous): (JSC::JSObject::createArrayStorage): (JSC::JSObject::createInitialArrayStorage): (JSC::JSObject::convertUndecidedToInt32): (JSC::JSObject::convertUndecidedToContiguous): (JSC::JSObject::convertUndecidedToArrayStorage): (JSC::JSObject::convertInt32ToDouble): (JSC::JSObject::convertInt32ToArrayStorage): (JSC::JSObject::convertDoubleToArrayStorage): (JSC::JSObject::convertContiguousToArrayStorage): (JSC::JSObject::putByIndexBeyondVectorLength): (JSC::JSObject::putDirectIndexBeyondVectorLength): (JSC::JSObject::getNewVectorLength): (JSC::JSObject::increaseVectorLength): (JSC::JSObject::ensureLengthSlow): (JSC::JSObject::growOutOfLineStorage): (JSC::JSObject::copyButterfly): Deleted. (JSC::JSObject::copyBackingStore): Deleted. * runtime/JSObject.h: (JSC::JSObject::globalObject): (JSC::JSObject::putDirectInternal): (JSC::JSObject::setStructureAndReallocateStorageIfNecessary): Deleted. * runtime/JSObjectInlines.h: * runtime/JSPromise.cpp: * runtime/JSPromiseConstructor.cpp: * runtime/JSPromiseDeferred.cpp: * runtime/JSPromisePrototype.cpp: * runtime/JSPropertyNameIterator.cpp: * runtime/JSScope.cpp: (JSC::JSScope::resolve): * runtime/JSScope.h: (JSC::JSScope::globalObject): (JSC::JSScope::vm): Deleted. * runtime/JSSetIterator.cpp: * runtime/JSStringIterator.cpp: * runtime/JSTemplateRegistryKey.cpp: * runtime/JSTypedArrayViewConstructor.cpp: * runtime/JSTypedArrayViewPrototype.cpp: * runtime/JSWeakMap.cpp: * runtime/JSWeakSet.cpp: * runtime/MapConstructor.cpp: * runtime/MapIteratorPrototype.cpp: * runtime/MapPrototype.cpp: * runtime/NativeErrorConstructor.cpp: * runtime/NativeStdFunctionCell.cpp: * runtime/Operations.h: (JSC::scribbleFreeCells): (JSC::scribble): * runtime/Options.h: * runtime/PropertyTable.cpp: * runtime/ProxyConstructor.cpp: * runtime/ProxyObject.cpp: * runtime/ProxyRevoke.cpp: * runtime/RegExp.cpp: (JSC::RegExp::match): (JSC::RegExp::matchConcurrently): (JSC::RegExp::matchCompareWithInterpreter): * runtime/RegExp.h: * runtime/RegExpConstructor.h: * runtime/RegExpInlines.h: (JSC::RegExp::matchInline): * runtime/RegExpMatchesArray.h: (JSC::tryCreateUninitializedRegExpMatchesArray): (JSC::createRegExpMatchesArray): * runtime/RegExpPrototype.cpp: (JSC::genericSplit): * runtime/RuntimeType.cpp: * runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::processUnverifiedStackTraces): * runtime/SetConstructor.cpp: * runtime/SetIteratorPrototype.cpp: * runtime/SetPrototype.cpp: * runtime/StackFrame.cpp: Added. (JSC::StackFrame::sourceID): (JSC::StackFrame::sourceURL): (JSC::StackFrame::functionName): (JSC::StackFrame::computeLineAndColumn): (JSC::StackFrame::toString): * runtime/StackFrame.h: Added. (JSC::StackFrame::isNative): * runtime/StringConstructor.cpp: * runtime/StringIteratorPrototype.cpp: * runtime/StructureInlines.h: (JSC::Structure::propertyTable): * runtime/TemplateRegistry.cpp: * runtime/TestRunnerUtils.cpp: (JSC::finalizeStatsAtEndOfTesting): * runtime/TestRunnerUtils.h: * runtime/TypeProfilerLog.cpp: * runtime/TypeSet.cpp: * runtime/VM.cpp: (JSC::VM::VM): (JSC::VM::ensureStackCapacityForCLoop): (JSC::VM::isSafeToRecurseSoftCLoop): * runtime/VM.h: * runtime/VMEntryScope.h: * runtime/VMInlines.h: (JSC::VM::ensureStackCapacityFor): (JSC::VM::isSafeToRecurseSoft): * runtime/WeakMapConstructor.cpp: * runtime/WeakMapData.cpp: * runtime/WeakMapPrototype.cpp: * runtime/WeakSetConstructor.cpp: * runtime/WeakSetPrototype.cpp: * testRegExp.cpp: (testOneRegExp): * tools/JSDollarVM.cpp: * tools/JSDollarVMPrototype.cpp: (JSC::JSDollarVMPrototype::isInObjectSpace): Source/WebCore: No new tests because no new WebCore behavior. Just rewiring #includes. * ForwardingHeaders/heap/HeapInlines.h: Added. * ForwardingHeaders/interpreter/Interpreter.h: Removed. * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Added. * Modules/indexeddb/IDBCursorWithValue.cpp: * Modules/indexeddb/client/TransactionOperation.cpp: * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: * Modules/indexeddb/server/UniqueIDBDatabase.cpp: * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp: * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp: * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp: * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp: * bindings/js/JSClientRectCustom.cpp: * bindings/js/JSDOMBinding.cpp: * bindings/js/JSDOMBinding.h: * bindings/js/JSDeviceMotionEventCustom.cpp: * bindings/js/JSDeviceOrientationEventCustom.cpp: * bindings/js/JSErrorEventCustom.cpp: * bindings/js/JSIDBCursorWithValueCustom.cpp: * bindings/js/JSIDBIndexCustom.cpp: * bindings/js/JSPopStateEventCustom.cpp: * bindings/js/JSWebGL2RenderingContextCustom.cpp: * bindings/js/JSWorkerGlobalScopeCustom.cpp: * bindings/js/WorkerScriptController.cpp: * contentextensions/ContentExtensionParser.cpp: * dom/ErrorEvent.cpp: * html/HTMLCanvasElement.cpp: * html/MediaDocument.cpp: * inspector/CommandLineAPIModule.cpp: * loader/EmptyClients.cpp: * page/CaptionUserPreferences.cpp: * page/Frame.cpp: * page/PageGroup.cpp: * page/UserContentController.cpp: * platform/mock/mediasource/MockBox.cpp: * testing/GCObservation.cpp: Source/WebKit2: Just rewiring some #includes. * UIProcess/ViewGestureController.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: * WebProcess/Plugins/Netscape/JSNPObject.cpp: Source/WTF: I needed tryFastAlignedMalloc() so I added it. * wtf/FastMalloc.cpp: (WTF::tryFastAlignedMalloc): * wtf/FastMalloc.h: * wtf/ParkingLot.cpp: (WTF::ParkingLot::forEachImpl): (WTF::ParkingLot::forEach): Deleted. * wtf/ParkingLot.h: (WTF::ParkingLot::parkConditionally): (WTF::ParkingLot::unparkOne): (WTF::ParkingLot::forEach): * wtf/ScopedLambda.h: (WTF::scopedLambdaRef): * wtf/SentinelLinkedList.h: (WTF::SentinelLinkedList::forEach): (WTF::RawNode>::takeFrom): * wtf/SimpleStats.h: (WTF::SimpleStats::operator bool): (WTF::SimpleStats::operator!): Deleted. Tools: * DumpRenderTree/TestRunner.cpp: * DumpRenderTree/mac/DumpRenderTree.mm: (DumpRenderTreeMain): * Scripts/run-jsc-stress-tests: * TestWebKitAPI/Tests/WTF/Vector.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/179778@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-06 01:02:22 +00:00
using WTF::SimpleStats;