haikuwebkit/Source/WTF/Scripts/generate-unified-source-bun...

377 lines
13 KiB
Ruby
Raw Permalink Normal View History

Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
# Copyright (C) 2017 Apple Inc. All rights reserved.
#
# 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. AND ITS CONTRIBUTORS ``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 ITS 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.
require 'digest'
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
require 'fileutils'
require 'pathname'
require 'getoptlong'
SCRIPT_NAME = File.basename($0)
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
COMMENT_REGEXP = /\/\//
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
def usage(message)
if message
puts "Error: #{message}"
puts
end
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
puts "usage: #{SCRIPT_NAME} [options] <sources-list-file>..."
puts "<sources-list-file> may be separate arguments or one semicolon separated string"
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
puts "--help (-h) Print this message"
puts "--verbose (-v) Adds extra logging to stderr."
puts
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
puts "Required arguments:"
puts "--source-tree-path (-s) Path to the root of the source directory."
puts "--derived-sources-path (-d) Path to the directory where the unified source files should be placed."
puts
puts "Optional arguments:"
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
puts "--print-bundled-sources Print bundled sources rather than generating sources"
puts "--print-all-sources Print all sources rather than generating sources"
puts "--generate-xcfilelists Generate .xcfilelist files"
puts "--input-xcfilelist-path Path of the generated input .xcfilelist file"
puts "--output-xcfilelist-path Path of the generated output .xcfilelist file"
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
puts
puts "Generation options:"
puts "--max-cpp-bundle-count Use global sequential numbers for cpp bundle filenames and set the limit on the number"
puts "--max-obj-c-bundle-count Use global sequential numbers for Obj-C bundle filenames and set the limit on the number"
Unify sources for bindings more densely https://bugs.webkit.org/show_bug.cgi?id=202918 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a build time speedup. For me, this is a reliable 17% boost on the WebCore Build Time Benchmark. * Scripts/generate-unified-sources.sh: Use dense bundles for JS* and bindings/js/*. This seems acceptable for a few reasons: - most of the time building these files is spent parsing the exact same set of JSC headers, because the generated bindings code ends up including the same set of things - the incremental build cost of bundling more bindings sources together is small, because the JSC headers dominate the time - folks will frequently have to rebuild all of the bindings (on every pull, for example, because they indirectly include most JSC headers), but rarely end up rebuilding only a single one (in my experience) * bindings/js/ReadableStreamDefaultController.cpp: (WebCore::readableStreamCallFunction): (WebCore::ReadableStreamDefaultController::invoke): (WebCore::callFunction): Deleted. Deduplicate static functions that now get bundled together. * platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::currentTimeToMediaTime): * platform/graphics/ca/PlatformCALayer.h: In older macOS SDKs, CABase.h included ApplicationServices.h, which causes lots of trouble. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Add an option to separate and more densely unify sources that match a given glob pattern. Canonical link: https://commits.webkit.org/216403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-15 05:53:17 +00:00
puts "--dense-bundle-filter Densely bundle files matching the given path glob"
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
exit 1
end
MAX_BUNDLE_SIZE = 8
Unify sources for bindings more densely https://bugs.webkit.org/show_bug.cgi?id=202918 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a build time speedup. For me, this is a reliable 17% boost on the WebCore Build Time Benchmark. * Scripts/generate-unified-sources.sh: Use dense bundles for JS* and bindings/js/*. This seems acceptable for a few reasons: - most of the time building these files is spent parsing the exact same set of JSC headers, because the generated bindings code ends up including the same set of things - the incremental build cost of bundling more bindings sources together is small, because the JSC headers dominate the time - folks will frequently have to rebuild all of the bindings (on every pull, for example, because they indirectly include most JSC headers), but rarely end up rebuilding only a single one (in my experience) * bindings/js/ReadableStreamDefaultController.cpp: (WebCore::readableStreamCallFunction): (WebCore::ReadableStreamDefaultController::invoke): (WebCore::callFunction): Deleted. Deduplicate static functions that now get bundled together. * platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::currentTimeToMediaTime): * platform/graphics/ca/PlatformCALayer.h: In older macOS SDKs, CABase.h included ApplicationServices.h, which causes lots of trouble. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Add an option to separate and more densely unify sources that match a given glob pattern. Canonical link: https://commits.webkit.org/216403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-15 05:53:17 +00:00
MAX_DENSE_BUNDLE_SIZE = 64
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
$derivedSourcesPath = nil
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
$unifiedSourceOutputPath = nil
$sourceTreePath = nil
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
$verbose = false
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
$mode = :GenerateBundles
$inputXCFilelistPath = nil
$outputXCFilelistPath = nil
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
$maxCppBundleCount = nil
$maxObjCBundleCount = nil
Unify sources for bindings more densely https://bugs.webkit.org/show_bug.cgi?id=202918 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a build time speedup. For me, this is a reliable 17% boost on the WebCore Build Time Benchmark. * Scripts/generate-unified-sources.sh: Use dense bundles for JS* and bindings/js/*. This seems acceptable for a few reasons: - most of the time building these files is spent parsing the exact same set of JSC headers, because the generated bindings code ends up including the same set of things - the incremental build cost of bundling more bindings sources together is small, because the JSC headers dominate the time - folks will frequently have to rebuild all of the bindings (on every pull, for example, because they indirectly include most JSC headers), but rarely end up rebuilding only a single one (in my experience) * bindings/js/ReadableStreamDefaultController.cpp: (WebCore::readableStreamCallFunction): (WebCore::ReadableStreamDefaultController::invoke): (WebCore::callFunction): Deleted. Deduplicate static functions that now get bundled together. * platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::currentTimeToMediaTime): * platform/graphics/ca/PlatformCALayer.h: In older macOS SDKs, CABase.h included ApplicationServices.h, which causes lots of trouble. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Add an option to separate and more densely unify sources that match a given glob pattern. Canonical link: https://commits.webkit.org/216403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-15 05:53:17 +00:00
$denseBundleFilters = []
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
def log(text)
$stderr.puts text if $verbose
end
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
GetoptLong.new(['--help', '-h', GetoptLong::NO_ARGUMENT],
['--verbose', '-v', GetoptLong::NO_ARGUMENT],
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
['--derived-sources-path', '-d', GetoptLong::REQUIRED_ARGUMENT],
['--source-tree-path', '-s', GetoptLong::REQUIRED_ARGUMENT],
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
['--print-bundled-sources', GetoptLong::NO_ARGUMENT],
['--print-all-sources', GetoptLong::NO_ARGUMENT],
['--generate-xcfilelists', GetoptLong::NO_ARGUMENT],
['--input-xcfilelist-path', GetoptLong::REQUIRED_ARGUMENT],
['--output-xcfilelist-path', GetoptLong::REQUIRED_ARGUMENT],
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
['--max-cpp-bundle-count', GetoptLong::REQUIRED_ARGUMENT],
Unify sources for bindings more densely https://bugs.webkit.org/show_bug.cgi?id=202918 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a build time speedup. For me, this is a reliable 17% boost on the WebCore Build Time Benchmark. * Scripts/generate-unified-sources.sh: Use dense bundles for JS* and bindings/js/*. This seems acceptable for a few reasons: - most of the time building these files is spent parsing the exact same set of JSC headers, because the generated bindings code ends up including the same set of things - the incremental build cost of bundling more bindings sources together is small, because the JSC headers dominate the time - folks will frequently have to rebuild all of the bindings (on every pull, for example, because they indirectly include most JSC headers), but rarely end up rebuilding only a single one (in my experience) * bindings/js/ReadableStreamDefaultController.cpp: (WebCore::readableStreamCallFunction): (WebCore::ReadableStreamDefaultController::invoke): (WebCore::callFunction): Deleted. Deduplicate static functions that now get bundled together. * platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::currentTimeToMediaTime): * platform/graphics/ca/PlatformCALayer.h: In older macOS SDKs, CABase.h included ApplicationServices.h, which causes lots of trouble. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Add an option to separate and more densely unify sources that match a given glob pattern. Canonical link: https://commits.webkit.org/216403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-15 05:53:17 +00:00
['--max-obj-c-bundle-count', GetoptLong::REQUIRED_ARGUMENT],
['--dense-bundle-filter', GetoptLong::REQUIRED_ARGUMENT]).each {
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
| opt, arg |
case opt
when '--help'
usage(nil)
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
when '--verbose'
$verbose = true
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
when '--derived-sources-path'
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
$derivedSourcesPath = Pathname.new(arg)
when '--source-tree-path'
$sourceTreePath = Pathname.new(arg)
usage("Source tree #{arg} does not exist.") if !$sourceTreePath.exist?
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
when '--print-bundled-sources'
$mode = :PrintBundledSources
when '--print-all-sources'
$mode = :PrintAllSources
when '--generate-xcfilelists'
$mode = :GenerateXCFilelists
when '--input-xcfilelist-path'
$inputXCFilelistPath = arg
when '--output-xcfilelist-path'
$outputXCFilelistPath = arg
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
when '--max-cpp-bundle-count'
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
$maxCppBundleCount = arg.to_i
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
when '--max-obj-c-bundle-count'
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
$maxObjCBundleCount = arg.to_i
Unify sources for bindings more densely https://bugs.webkit.org/show_bug.cgi?id=202918 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a build time speedup. For me, this is a reliable 17% boost on the WebCore Build Time Benchmark. * Scripts/generate-unified-sources.sh: Use dense bundles for JS* and bindings/js/*. This seems acceptable for a few reasons: - most of the time building these files is spent parsing the exact same set of JSC headers, because the generated bindings code ends up including the same set of things - the incremental build cost of bundling more bindings sources together is small, because the JSC headers dominate the time - folks will frequently have to rebuild all of the bindings (on every pull, for example, because they indirectly include most JSC headers), but rarely end up rebuilding only a single one (in my experience) * bindings/js/ReadableStreamDefaultController.cpp: (WebCore::readableStreamCallFunction): (WebCore::ReadableStreamDefaultController::invoke): (WebCore::callFunction): Deleted. Deduplicate static functions that now get bundled together. * platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::currentTimeToMediaTime): * platform/graphics/ca/PlatformCALayer.h: In older macOS SDKs, CABase.h included ApplicationServices.h, which causes lots of trouble. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Add an option to separate and more densely unify sources that match a given glob pattern. Canonical link: https://commits.webkit.org/216403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-15 05:53:17 +00:00
when '--dense-bundle-filter'
$denseBundleFilters.push(arg)
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
end
}
$unifiedSourceOutputPath = $derivedSourcesPath + Pathname.new("unified-sources")
FileUtils.mkpath($unifiedSourceOutputPath) if !$unifiedSourceOutputPath.exist? && $mode != :GenerateXCFilelists
usage("--derived-sources-path must be specified.") if !$unifiedSourceOutputPath
usage("--source-tree-path must be specified.") if !$sourceTreePath
log("Putting unified sources in #{$unifiedSourceOutputPath}")
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
usage("At least one source list file must be specified.") if ARGV.length == 0
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
# Even though CMake will only pass us a single semicolon separated arguemnts, we separate all the arguments for simplicity.
sourceListFiles = ARGV.to_a.map { | sourceFileList | sourceFileList.split(";") }.flatten
log("Source files: #{sourceListFiles}")
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
$generatedSources = []
$inputSources = []
$outputSources = []
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
class SourceFile
attr_reader :unifiable, :fileIndex, :path
def initialize(file, fileIndex)
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
@unifiable = true
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
@fileIndex = fileIndex
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
attributeStart = file =~ /@/
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
if attributeStart
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
# We want to make sure we skip the first @ so split works correctly
attributesText = file[(attributeStart + 1)..file.length]
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
attributesText.split(/\s*@/).each {
| attribute |
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
case attribute.strip
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
when "no-unify"
@unifiable = false
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
else
raise "unknown attribute: #{attribute}"
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
end
}
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
file = file[0..(attributeStart-1)]
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
end
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
@path = Pathname.new(file.strip)
end
def <=>(other)
return @path.dirname <=> other.path.dirname if @path.dirname != other.path.dirname
return @path.basename <=> other.path.basename if @fileIndex == other.fileIndex
@fileIndex <=> other.fileIndex
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
end
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
def derived?
return @derived if @derived != nil
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
@derived = !($sourceTreePath + self.path).exist?
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
end
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
def to_s
if $mode == :GenerateXCFilelists
if derived?
($derivedSourcesPath + @path).to_s
else
'$(SRCROOT)/' + @path.to_s
end
elsif $mode == :GenerateBundles || !derived?
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
@path.to_s
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
else
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
($derivedSourcesPath + @path).to_s
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
end
end
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
end
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
class BundleManager
attr_reader :bundleCount, :extension, :fileCount, :currentBundleText, :maxCount, :extraFiles
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
def initialize(extension, max)
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
@extension = extension
@fileCount = 0
@bundleCount = 0
@currentBundleText = ""
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
@maxCount = max
@extraFiles = []
@currentDirectory = nil
Unify sources for bindings more densely https://bugs.webkit.org/show_bug.cgi?id=202918 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a build time speedup. For me, this is a reliable 17% boost on the WebCore Build Time Benchmark. * Scripts/generate-unified-sources.sh: Use dense bundles for JS* and bindings/js/*. This seems acceptable for a few reasons: - most of the time building these files is spent parsing the exact same set of JSC headers, because the generated bindings code ends up including the same set of things - the incremental build cost of bundling more bindings sources together is small, because the JSC headers dominate the time - folks will frequently have to rebuild all of the bindings (on every pull, for example, because they indirectly include most JSC headers), but rarely end up rebuilding only a single one (in my experience) * bindings/js/ReadableStreamDefaultController.cpp: (WebCore::readableStreamCallFunction): (WebCore::ReadableStreamDefaultController::invoke): (WebCore::callFunction): Deleted. Deduplicate static functions that now get bundled together. * platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::currentTimeToMediaTime): * platform/graphics/ca/PlatformCALayer.h: In older macOS SDKs, CABase.h included ApplicationServices.h, which causes lots of trouble. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Add an option to separate and more densely unify sources that match a given glob pattern. Canonical link: https://commits.webkit.org/216403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-15 05:53:17 +00:00
@lastBundlingPrefix = nil
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
end
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
def writeFile(file, text)
bundleFile = $unifiedSourceOutputPath + file
if $mode == :GenerateXCFilelists
$outputSources << bundleFile
return
end
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
if (!bundleFile.exist? || IO::read(bundleFile) != @currentBundleText)
log("Writing bundle #{bundleFile} with: \n#{@currentBundleText}")
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
IO::write(bundleFile, @currentBundleText)
end
end
def bundleFileName()
id =
if @maxCount
@bundleCount.to_s
else
# The dash makes the filenames more clear when using a hash.
hash = Digest::SHA1.hexdigest(@currentDirectory.to_s)[0..7]
"-#{hash}-#{@bundleCount}"
end
@extension == "cpp" ? "UnifiedSource#{id}.#{extension}" : "UnifiedSource#{id}-#{extension}.#{extension}"
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
end
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
def flush
@bundleCount += 1
bundleFile = bundleFileName
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
$generatedSources << $unifiedSourceOutputPath + bundleFile
@extraFiles << bundleFile if @maxCount and @bundleCount > @maxCount
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
writeFile(bundleFile, @currentBundleText)
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
@currentBundleText = ""
@fileCount = 0
end
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
def flushToMax
raise if !@maxCount
while @bundleCount < @maxCount
flush
end
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
end
def addFile(sourceFile)
path = sourceFile.path
raise "wrong extension: #{path.extname} expected #{@extension}" unless path.extname == ".#{@extension}"
Unify sources for bindings more densely https://bugs.webkit.org/show_bug.cgi?id=202918 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a build time speedup. For me, this is a reliable 17% boost on the WebCore Build Time Benchmark. * Scripts/generate-unified-sources.sh: Use dense bundles for JS* and bindings/js/*. This seems acceptable for a few reasons: - most of the time building these files is spent parsing the exact same set of JSC headers, because the generated bindings code ends up including the same set of things - the incremental build cost of bundling more bindings sources together is small, because the JSC headers dominate the time - folks will frequently have to rebuild all of the bindings (on every pull, for example, because they indirectly include most JSC headers), but rarely end up rebuilding only a single one (in my experience) * bindings/js/ReadableStreamDefaultController.cpp: (WebCore::readableStreamCallFunction): (WebCore::ReadableStreamDefaultController::invoke): (WebCore::callFunction): Deleted. Deduplicate static functions that now get bundled together. * platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::currentTimeToMediaTime): * platform/graphics/ca/PlatformCALayer.h: In older macOS SDKs, CABase.h included ApplicationServices.h, which causes lots of trouble. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Add an option to separate and more densely unify sources that match a given glob pattern. Canonical link: https://commits.webkit.org/216403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-15 05:53:17 +00:00
bundlePrefix, bundleSize = BundlePrefixAndSizeForPath(path)
if (@lastBundlingPrefix != bundlePrefix)
log("Flushing because new top level directory; old: #{@currentDirectory}, new: #{path.dirname}")
flush
Unify sources for bindings more densely https://bugs.webkit.org/show_bug.cgi?id=202918 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a build time speedup. For me, this is a reliable 17% boost on the WebCore Build Time Benchmark. * Scripts/generate-unified-sources.sh: Use dense bundles for JS* and bindings/js/*. This seems acceptable for a few reasons: - most of the time building these files is spent parsing the exact same set of JSC headers, because the generated bindings code ends up including the same set of things - the incremental build cost of bundling more bindings sources together is small, because the JSC headers dominate the time - folks will frequently have to rebuild all of the bindings (on every pull, for example, because they indirectly include most JSC headers), but rarely end up rebuilding only a single one (in my experience) * bindings/js/ReadableStreamDefaultController.cpp: (WebCore::readableStreamCallFunction): (WebCore::ReadableStreamDefaultController::invoke): (WebCore::callFunction): Deleted. Deduplicate static functions that now get bundled together. * platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::currentTimeToMediaTime): * platform/graphics/ca/PlatformCALayer.h: In older macOS SDKs, CABase.h included ApplicationServices.h, which causes lots of trouble. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Add an option to separate and more densely unify sources that match a given glob pattern. Canonical link: https://commits.webkit.org/216403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-15 05:53:17 +00:00
@lastBundlingPrefix = bundlePrefix
@currentDirectory = path.dirname
@bundleCount = 0 unless @maxCount
end
Unify sources for bindings more densely https://bugs.webkit.org/show_bug.cgi?id=202918 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a build time speedup. For me, this is a reliable 17% boost on the WebCore Build Time Benchmark. * Scripts/generate-unified-sources.sh: Use dense bundles for JS* and bindings/js/*. This seems acceptable for a few reasons: - most of the time building these files is spent parsing the exact same set of JSC headers, because the generated bindings code ends up including the same set of things - the incremental build cost of bundling more bindings sources together is small, because the JSC headers dominate the time - folks will frequently have to rebuild all of the bindings (on every pull, for example, because they indirectly include most JSC headers), but rarely end up rebuilding only a single one (in my experience) * bindings/js/ReadableStreamDefaultController.cpp: (WebCore::readableStreamCallFunction): (WebCore::ReadableStreamDefaultController::invoke): (WebCore::callFunction): Deleted. Deduplicate static functions that now get bundled together. * platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::currentTimeToMediaTime): * platform/graphics/ca/PlatformCALayer.h: In older macOS SDKs, CABase.h included ApplicationServices.h, which causes lots of trouble. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Add an option to separate and more densely unify sources that match a given glob pattern. Canonical link: https://commits.webkit.org/216403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-15 05:53:17 +00:00
if @fileCount >= bundleSize
log("Flushing because new bundle is full (#{@fileCount} sources)")
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
flush
end
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
@currentBundleText += "#include \"#{sourceFile}\"\n"
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
@fileCount += 1
end
end
Unify sources for bindings more densely https://bugs.webkit.org/show_bug.cgi?id=202918 Reviewed by Simon Fraser. Source/WebCore: No new tests, just a build time speedup. For me, this is a reliable 17% boost on the WebCore Build Time Benchmark. * Scripts/generate-unified-sources.sh: Use dense bundles for JS* and bindings/js/*. This seems acceptable for a few reasons: - most of the time building these files is spent parsing the exact same set of JSC headers, because the generated bindings code ends up including the same set of things - the incremental build cost of bundling more bindings sources together is small, because the JSC headers dominate the time - folks will frequently have to rebuild all of the bindings (on every pull, for example, because they indirectly include most JSC headers), but rarely end up rebuilding only a single one (in my experience) * bindings/js/ReadableStreamDefaultController.cpp: (WebCore::readableStreamCallFunction): (WebCore::ReadableStreamDefaultController::invoke): (WebCore::callFunction): Deleted. Deduplicate static functions that now get bundled together. * platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::currentTimeToMediaTime): * platform/graphics/ca/PlatformCALayer.h: In older macOS SDKs, CABase.h included ApplicationServices.h, which causes lots of trouble. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Add an option to separate and more densely unify sources that match a given glob pattern. Canonical link: https://commits.webkit.org/216403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-15 05:53:17 +00:00
def BundlePrefixAndSizeForPath(path)
topLevelDirectory = TopLevelDirectoryForPath(path.dirname)
$denseBundleFilters.each { |filter|
if path.fnmatch(filter)
return filter, MAX_DENSE_BUNDLE_SIZE
end
}
return topLevelDirectory, MAX_BUNDLE_SIZE
end
Bundle unified sources more tightly in projects with deep directory structures https://bugs.webkit.org/show_bug.cgi?id=189009 Reviewed by Simon Fraser. * Scripts/generate-unified-source-bundles.rb: It turns out our plan to switch unified source bundle every time the directory changes is not a good fit for projects like WebKit2 with many small directories. It leaves many unified source bundles with only a single source file, achieving only ~40% density. Instead, switch unified source bundles every time the top-level directory changes. This still achieves the goal of *usually* only rebuilding the one top-level directory you touched, and increases source bundle density wildly, to ~95%. Fix a variety of unification errors due to reshuffling the bundles. * Modules/mediastream/RTCController.cpp: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * crypto/algorithms/CryptoAlgorithmECDSA.cpp: (WebCore::CryptoAlgorithmECDSA::importKey): * dom/Document.h: * html/parser/HTMLTreeBuilder.cpp: * loader/appcache/ApplicationCacheResourceLoader.h: * page/AlternativeTextClient.h: * platform/Pasteboard.h: * platform/graphics/DisplayRefreshMonitor.cpp: * platform/graphics/FontFamilySpecificationNull.cpp: * platform/graphics/cocoa/WebGLLayer.mm: (-[WebGLLayer initWithGraphicsContext3D:]): (-[WebGLLayer copyImageSnapshotWithColorSpace:]): (-[WebGLLayer display]): (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): * platform/graphics/cocoa/WebGPULayer.mm: (-[WebGPULayer initWithGPUDevice:]): * platform/graphics/metal/GPUCommandQueueMetal.mm: * platform/mac/PasteboardMac.mm: * platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp: * platform/network/ResourceRequestBase.cpp: * rendering/updating/RenderTreeBuilderBlockFlow.cpp: * rendering/updating/RenderTreeBuilderInline.cpp: * Shared/APIWebArchive.mm: * Shared/APIWebArchiveResource.mm: * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: * SourcesCocoa.txt: * SourcesGTK.txt: * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): (API::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage): * UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm: (-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]): (-[WKCustomProtocolLoader connection:didFailWithError:]): (-[WKCustomProtocolLoader connection:didReceiveResponse:]): * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::generatePluginProcessCallbackID): (WebKit::PluginProcessProxy::fetchWebsiteData): (WebKit::PluginProcessProxy::deleteWebsiteData): (WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames): (WebKit::generateCallbackID): Deleted. * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: (-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): * UIProcess/Storage/StorageProcessProxy.cpp: (WebKit::generateStorageProcessCallbackID): (WebKit::StorageProcessProxy::fetchWebsiteData): (WebKit::StorageProcessProxy::deleteWebsiteData): (WebKit::StorageProcessProxy::deleteWebsiteDataForOrigins): (WebKit::generateCallbackID): Deleted. * WebKit.xcodeproj/project.pbxproj: * WebProcess/Plugins/PDF/PDFPlugin.mm: (-[WKPDFPluginAccessibilityObject accessibilityPerformAction:]): (-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]): (-[WKPDFPluginAccessibilityObject accessibilityAssociatedControlForAnnotation:]): (-[WKPDFPluginAccessibilityObject accessibilityHitTest:]): (-[WKPDFLayerControllerDelegate updateScrollPosition:]): (WebKit::PDFPlugin::updateCursor): (WebKit::coreCursor): (appendValuesInPDFNameSubtreeToVector): Deleted. (getAllValuesInPDFNameTree): Deleted. (getAllScriptsInPDFDocument): Deleted. Canonical link: https://commits.webkit.org/204172@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-30 20:31:32 +00:00
def TopLevelDirectoryForPath(path)
if !path
return nil
end
while path.dirname != path.dirname.dirname
path = path.dirname
end
return path
end
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
def ProcessFileForUnifiedSourceGeneration(sourceFile)
path = sourceFile.path
$inputSources << sourceFile.to_s
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
bundle = $bundleManagers[path.extname]
if !bundle
log("No bundle for #{path.extname} files, building #{path} standalone")
$generatedSources << sourceFile
elsif !sourceFile.unifiable
log("Not allowed to unify #{path}, building standalone")
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
$generatedSources << sourceFile
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
else
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
bundle.addFile(sourceFile)
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
end
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
end
$bundleManagers = {
".cpp" => BundleManager.new("cpp", $maxCppBundleCount),
".mm" => BundleManager.new("mm", $maxObjCBundleCount)
}
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
seen = {}
sourceFiles = []
JSC should use unified sources for platform specific files. https://bugs.webkit.org/show_bug.cgi?id=177290 Reviewed by Michael Saboff. .: Change WEBKIT_COMPUTE_SOURCES CMake macro to look for platform specific unified source lists. This is done in the same way that we look for port specific configuration files. For example, if I were building for the Mac port WEBKIT_COMPUTE_SOURCES would add the Sources.txt and SourcesMac.txt source lists to the list of unified sources. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Add a list of platform specific source files and update the Generate Unified Sources phase of the Xcode build. I skipped WPE since that seems to have failed for some reason that I didn't fully understand. See: https://webkit-queues.webkit.org/results/4611260 Also, fix duplicate symbols in Glib remote inspector files. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * PlatformGTK.cmake: * PlatformMac.cmake: * SourcesGTK.txt: Added. * SourcesMac.txt: Added. * inspector/remote/glib/RemoteInspectorServer.cpp: (Inspector::RemoteInspectorServer::interfaceInfo): (Inspector::RemoteInspectorServer::setTargetList): (Inspector::RemoteInspectorServer::setupInspectorClient): (Inspector::RemoteInspectorServer::setup): (Inspector::RemoteInspectorServer::close): (Inspector::RemoteInspectorServer::connectionClosed): (Inspector::RemoteInspectorServer::sendMessageToBackend): (Inspector::RemoteInspectorServer::sendMessageToFrontend): (Inspector::dbusConnectionCallAsyncReadyCallback): Deleted. Source/WTF: The unified source bundler script can now handle more than one list of sources. Sources will not be bundled across source file lists. We want to ensure that changing one platform's sources doesn't break another platform's build, as much as possible. Additionally, it means that there won't be weird performance changes when files are added to an unrelated platform. Remove stale reference to generate-unified-source-bundles.rb script from Xcode. * Scripts/generate-unified-source-bundles.rb: * WTF.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/193634@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-21 17:35:18 +00:00
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
sourceListFiles.each_with_index {
| path, sourceFileIndex |
log("Reading #{path}")
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
result = []
File.read(path).lines.each {
| line |
commentStart = line =~ COMMENT_REGEXP
log("Before: #{line}")
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
if commentStart != nil
line = line.slice(0, commentStart)
log("After: #{line}")
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
end
line.strip!
JSC should use unified sources for platform specific files. https://bugs.webkit.org/show_bug.cgi?id=177290 Reviewed by Michael Saboff. .: Change WEBKIT_COMPUTE_SOURCES CMake macro to look for platform specific unified source lists. This is done in the same way that we look for port specific configuration files. For example, if I were building for the Mac port WEBKIT_COMPUTE_SOURCES would add the Sources.txt and SourcesMac.txt source lists to the list of unified sources. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Add a list of platform specific source files and update the Generate Unified Sources phase of the Xcode build. I skipped WPE since that seems to have failed for some reason that I didn't fully understand. See: https://webkit-queues.webkit.org/results/4611260 Also, fix duplicate symbols in Glib remote inspector files. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * PlatformGTK.cmake: * PlatformMac.cmake: * SourcesGTK.txt: Added. * SourcesMac.txt: Added. * inspector/remote/glib/RemoteInspectorServer.cpp: (Inspector::RemoteInspectorServer::interfaceInfo): (Inspector::RemoteInspectorServer::setTargetList): (Inspector::RemoteInspectorServer::setupInspectorClient): (Inspector::RemoteInspectorServer::setup): (Inspector::RemoteInspectorServer::close): (Inspector::RemoteInspectorServer::connectionClosed): (Inspector::RemoteInspectorServer::sendMessageToBackend): (Inspector::RemoteInspectorServer::sendMessageToFrontend): (Inspector::dbusConnectionCallAsyncReadyCallback): Deleted. Source/WTF: The unified source bundler script can now handle more than one list of sources. Sources will not be bundled across source file lists. We want to ensure that changing one platform's sources doesn't break another platform's build, as much as possible. Additionally, it means that there won't be weird performance changes when files are added to an unrelated platform. Remove stale reference to generate-unified-source-bundles.rb script from Xcode. * Scripts/generate-unified-source-bundles.rb: * WTF.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/193634@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-21 17:35:18 +00:00
Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable https://bugs.webkit.org/show_bug.cgi?id=212420 Reviewed by Don Olmstead. .: * Source/cmake/WebKitCommon.cmake: Removed call to SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS. * Source/cmake/WebKitFeatures.cmake: Removed SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS. * Source/cmake/WebKitMacros.cmake: Removed use of "--feature-flags" when invoking the generate-unified-source-bundles.rb, which also means no longer depending on the UNIFIED_SOURCE_LIST_ENABLED_FEATURES variable, which was set by the SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS function. Source/JavaScriptCore: * Scripts/generate-unified-sources.sh: Removed many unneeded quote marks from the invocation of generate-unified-source-bundles.rb. Source/WebCore: * Scripts/generate-unified-sources.sh: Added code to include sources from SourcesCocoaInternalSDK.txt, only if USE_INTERNAL_SDK is YES. Removed --feature-flags argument from invocation of generate-unified-source-bundles.rb. Removed many unnecessary quotes. * SourcesCocoa.txt: Removed the names of the files from the internal SDK. * SourcesCocoaInternalSDK.txt: Added. Moved those names here. * html/MediaElementSession.cpp: Added some includes, apparently needed because of different groupings of unified sources. Source/WebKit: * Scripts/generate-unified-sources.sh: Removed --feature-flags from the arguments passed to generate-unified-source-bundles.rb. Also removed many unneeded quotes. Source/WebKitLegacy: * scripts/generate-unified-sources.sh: Removed --feature-flags from the arguments passed to generate-unified-source-bundles.rb. Also removed many unneeded quotes. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Removed the --feature-flags command line option along with the code that implements it. Canonical link: https://commits.webkit.org/226759@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-04 16:41:45 +00:00
next if line.empty?
JSC should use unified sources for platform specific files. https://bugs.webkit.org/show_bug.cgi?id=177290 Reviewed by Michael Saboff. .: Change WEBKIT_COMPUTE_SOURCES CMake macro to look for platform specific unified source lists. This is done in the same way that we look for port specific configuration files. For example, if I were building for the Mac port WEBKIT_COMPUTE_SOURCES would add the Sources.txt and SourcesMac.txt source lists to the list of unified sources. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Add a list of platform specific source files and update the Generate Unified Sources phase of the Xcode build. I skipped WPE since that seems to have failed for some reason that I didn't fully understand. See: https://webkit-queues.webkit.org/results/4611260 Also, fix duplicate symbols in Glib remote inspector files. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * PlatformGTK.cmake: * PlatformMac.cmake: * SourcesGTK.txt: Added. * SourcesMac.txt: Added. * inspector/remote/glib/RemoteInspectorServer.cpp: (Inspector::RemoteInspectorServer::interfaceInfo): (Inspector::RemoteInspectorServer::setTargetList): (Inspector::RemoteInspectorServer::setupInspectorClient): (Inspector::RemoteInspectorServer::setup): (Inspector::RemoteInspectorServer::close): (Inspector::RemoteInspectorServer::connectionClosed): (Inspector::RemoteInspectorServer::sendMessageToBackend): (Inspector::RemoteInspectorServer::sendMessageToFrontend): (Inspector::dbusConnectionCallAsyncReadyCallback): Deleted. Source/WTF: The unified source bundler script can now handle more than one list of sources. Sources will not be bundled across source file lists. We want to ensure that changing one platform's sources doesn't break another platform's build, as much as possible. Additionally, it means that there won't be weird performance changes when files are added to an unrelated platform. Remove stale reference to generate-unified-source-bundles.rb script from Xcode. * Scripts/generate-unified-source-bundles.rb: * WTF.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/193634@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-21 17:35:18 +00:00
Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable https://bugs.webkit.org/show_bug.cgi?id=212420 Reviewed by Don Olmstead. .: * Source/cmake/WebKitCommon.cmake: Removed call to SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS. * Source/cmake/WebKitFeatures.cmake: Removed SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS. * Source/cmake/WebKitMacros.cmake: Removed use of "--feature-flags" when invoking the generate-unified-source-bundles.rb, which also means no longer depending on the UNIFIED_SOURCE_LIST_ENABLED_FEATURES variable, which was set by the SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS function. Source/JavaScriptCore: * Scripts/generate-unified-sources.sh: Removed many unneeded quote marks from the invocation of generate-unified-source-bundles.rb. Source/WebCore: * Scripts/generate-unified-sources.sh: Added code to include sources from SourcesCocoaInternalSDK.txt, only if USE_INTERNAL_SDK is YES. Removed --feature-flags argument from invocation of generate-unified-source-bundles.rb. Removed many unnecessary quotes. * SourcesCocoa.txt: Removed the names of the files from the internal SDK. * SourcesCocoaInternalSDK.txt: Added. Moved those names here. * html/MediaElementSession.cpp: Added some includes, apparently needed because of different groupings of unified sources. Source/WebKit: * Scripts/generate-unified-sources.sh: Removed --feature-flags from the arguments passed to generate-unified-source-bundles.rb. Also removed many unneeded quotes. Source/WebKitLegacy: * scripts/generate-unified-sources.sh: Removed --feature-flags from the arguments passed to generate-unified-source-bundles.rb. Also removed many unneeded quotes. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Removed the --feature-flags command line option along with the code that implements it. Canonical link: https://commits.webkit.org/226759@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-04 16:41:45 +00:00
if seen[line]
next if $mode == :GenerateXCFilelists
raise "duplicate line: #{line} in #{path}"
JSC should use unified sources for platform specific files. https://bugs.webkit.org/show_bug.cgi?id=177290 Reviewed by Michael Saboff. .: Change WEBKIT_COMPUTE_SOURCES CMake macro to look for platform specific unified source lists. This is done in the same way that we look for port specific configuration files. For example, if I were building for the Mac port WEBKIT_COMPUTE_SOURCES would add the Sources.txt and SourcesMac.txt source lists to the list of unified sources. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Add a list of platform specific source files and update the Generate Unified Sources phase of the Xcode build. I skipped WPE since that seems to have failed for some reason that I didn't fully understand. See: https://webkit-queues.webkit.org/results/4611260 Also, fix duplicate symbols in Glib remote inspector files. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * PlatformGTK.cmake: * PlatformMac.cmake: * SourcesGTK.txt: Added. * SourcesMac.txt: Added. * inspector/remote/glib/RemoteInspectorServer.cpp: (Inspector::RemoteInspectorServer::interfaceInfo): (Inspector::RemoteInspectorServer::setTargetList): (Inspector::RemoteInspectorServer::setupInspectorClient): (Inspector::RemoteInspectorServer::setup): (Inspector::RemoteInspectorServer::close): (Inspector::RemoteInspectorServer::connectionClosed): (Inspector::RemoteInspectorServer::sendMessageToBackend): (Inspector::RemoteInspectorServer::sendMessageToFrontend): (Inspector::dbusConnectionCallAsyncReadyCallback): Deleted. Source/WTF: The unified source bundler script can now handle more than one list of sources. Sources will not be bundled across source file lists. We want to ensure that changing one platform's sources doesn't break another platform's build, as much as possible. Additionally, it means that there won't be weird performance changes when files are added to an unrelated platform. Remove stale reference to generate-unified-source-bundles.rb script from Xcode. * Scripts/generate-unified-source-bundles.rb: * WTF.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/193634@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-21 17:35:18 +00:00
end
Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable https://bugs.webkit.org/show_bug.cgi?id=212420 Reviewed by Don Olmstead. .: * Source/cmake/WebKitCommon.cmake: Removed call to SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS. * Source/cmake/WebKitFeatures.cmake: Removed SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS. * Source/cmake/WebKitMacros.cmake: Removed use of "--feature-flags" when invoking the generate-unified-source-bundles.rb, which also means no longer depending on the UNIFIED_SOURCE_LIST_ENABLED_FEATURES variable, which was set by the SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS function. Source/JavaScriptCore: * Scripts/generate-unified-sources.sh: Removed many unneeded quote marks from the invocation of generate-unified-source-bundles.rb. Source/WebCore: * Scripts/generate-unified-sources.sh: Added code to include sources from SourcesCocoaInternalSDK.txt, only if USE_INTERNAL_SDK is YES. Removed --feature-flags argument from invocation of generate-unified-source-bundles.rb. Removed many unnecessary quotes. * SourcesCocoa.txt: Removed the names of the files from the internal SDK. * SourcesCocoaInternalSDK.txt: Added. Moved those names here. * html/MediaElementSession.cpp: Added some includes, apparently needed because of different groupings of unified sources. Source/WebKit: * Scripts/generate-unified-sources.sh: Removed --feature-flags from the arguments passed to generate-unified-source-bundles.rb. Also removed many unneeded quotes. Source/WebKitLegacy: * scripts/generate-unified-sources.sh: Removed --feature-flags from the arguments passed to generate-unified-source-bundles.rb. Also removed many unneeded quotes. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Removed the --feature-flags command line option along with the code that implements it. Canonical link: https://commits.webkit.org/226759@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-04 16:41:45 +00:00
seen[line] = true
result << SourceFile.new(line, sourceFileIndex)
JSC should use unified sources for platform specific files. https://bugs.webkit.org/show_bug.cgi?id=177290 Reviewed by Michael Saboff. .: Change WEBKIT_COMPUTE_SOURCES CMake macro to look for platform specific unified source lists. This is done in the same way that we look for port specific configuration files. For example, if I were building for the Mac port WEBKIT_COMPUTE_SOURCES would add the Sources.txt and SourcesMac.txt source lists to the list of unified sources. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Add a list of platform specific source files and update the Generate Unified Sources phase of the Xcode build. I skipped WPE since that seems to have failed for some reason that I didn't fully understand. See: https://webkit-queues.webkit.org/results/4611260 Also, fix duplicate symbols in Glib remote inspector files. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * PlatformGTK.cmake: * PlatformMac.cmake: * SourcesGTK.txt: Added. * SourcesMac.txt: Added. * inspector/remote/glib/RemoteInspectorServer.cpp: (Inspector::RemoteInspectorServer::interfaceInfo): (Inspector::RemoteInspectorServer::setTargetList): (Inspector::RemoteInspectorServer::setupInspectorClient): (Inspector::RemoteInspectorServer::setup): (Inspector::RemoteInspectorServer::close): (Inspector::RemoteInspectorServer::connectionClosed): (Inspector::RemoteInspectorServer::sendMessageToBackend): (Inspector::RemoteInspectorServer::sendMessageToFrontend): (Inspector::dbusConnectionCallAsyncReadyCallback): Deleted. Source/WTF: The unified source bundler script can now handle more than one list of sources. Sources will not be bundled across source file lists. We want to ensure that changing one platform's sources doesn't break another platform's build, as much as possible. Additionally, it means that there won't be weird performance changes when files are added to an unrelated platform. Remove stale reference to generate-unified-source-bundles.rb script from Xcode. * Scripts/generate-unified-source-bundles.rb: * WTF.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/193634@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-21 17:35:18 +00:00
}
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
log("Found #{result.length} source files in #{path}")
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
sourceFiles += result
}
JSC Xcode build should use unified sources for platform independent files https://bugs.webkit.org/show_bug.cgi?id=177190 Reviewed by Saam Barati. .: Add a macro for collecting the set of "header" source files and adding the bundle files to the "sources" list. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch changes the Xcode build to use unified sources. The main difference from a development perspective is that instead of added source files to Xcode they need to be added to the shared sources.txt. For now, platform specific files are still added to the JavaScriptCore target. Because Xcode needs to know about all the files before we generate them all the unified source files need to be added to the JavaScriptCore framework target. As a result, if we run out of bundle files more will need to be added to the project. Currently, there are no spare files. If adding more bundle files becomes problematic we can change this. LowLevelInterpreter.cpp can't be added to the unified source list yet due to a clang bug. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * sources.txt: Added. Source/WTF: Add a new directory for build scripts that are forwarded to subsequent framework builds. * Scripts/generate-unified-source-bundles.rb: Renamed from Source/WTF/generate-unified-source-bundles.rb. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: Canonical link: https://commits.webkit.org/193609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-20 23:08:50 +00:00
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
log("Found sources: #{sourceFiles.sort}")
sourceFiles.sort.each {
| sourceFile |
case $mode
when :GenerateBundles, :GenerateXCFilelists
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
ProcessFileForUnifiedSourceGeneration(sourceFile)
when :PrintAllSources
$generatedSources << sourceFile
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
when :PrintBundledSources
$generatedSources << sourceFile if $bundleManagers[sourceFile.path.extname] && sourceFile.unifiable
end
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
}
if $mode != :PrintAllSources
$bundleManagers.each_value {
| manager |
manager.flush
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
maxCount = manager.maxCount
next if !maxCount
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
manager.flushToMax
unless manager.extraFiles.empty?
extension = manager.extension
bundleCount = manager.bundleCount
filesToAdd = manager.extraFiles.join(", ")
raise "number of bundles for #{extension} sources, #{bundleCount}, exceeded limit, #{maxCount}. Please add #{filesToAdd} to Xcode then update UnifiedSource#{extension.capitalize}FileCount"
end
}
end
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
if $mode == :GenerateXCFilelists
Enable the automatic checking and regenerations of .xcfilelists during builds https://bugs.webkit.org/show_bug.cgi?id=194124 <rdar://problem/47721277> Reviewed by Tim Horton. Bug 193790 add a facility for checking -- during build time -- that any needed .xcfilelist files are up-to-date and for updating them if they are not. This facility was initially opt-in by setting WK_ENABLE_CHECK_XCFILELISTS until other pieces were in place and until the process seemed robust. Its now time to enable this facility and make it opt-out. If there is a need to disable this facility, set and export WK_DISABLE_CHECK_XCFILELISTS=1 in your environment before running `make` or `build-webkit`, or before running Xcode from the command line. Additionally, remove the step that generates a list of source files going into the UnifiedSources build step. It's only necessarily to specify Sources.txt and SourcesCocoa.txt as inputs. Source/JavaScriptCore: * JavaScriptCore.xcodeproj/project.pbxproj: * UnifiedSources-input.xcfilelist: Removed. Source/WebCore: No new tests since there should be no observable behavior difference. * UnifiedSources-input.xcfilelist: Removed. * WebCore.xcodeproj/project.pbxproj: Source/WebKit: * UnifiedSources-input.xcfilelist: Removed. * WebKit.xcodeproj/project.pbxproj: Source/WTF: * Scripts/generate-unified-source-bundles.rb: Tools: * Scripts/generate-xcfilelists: Canonical link: https://commits.webkit.org/208752@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-05 22:58:19 +00:00
IO::write($inputXCFilelistPath, $inputSources.sort.join("\n") + "\n") if $inputXCFilelistPath
IO::write($outputXCFilelistPath, $outputSources.sort.join("\n") + "\n") if $outputXCFilelistPath
end
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
# We use stdout to report our unified source list to CMake.
# Add trailing semicolon and avoid a trailing newline for CMake's sake.
JSC build should use unified sources for derived sources https://bugs.webkit.org/show_bug.cgi?id=177421 Reviewed by JF Bastien. .: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: This patch make a couple of changes: 1) Make derived sources added to relevant bundles. I was going to add JSCBuiltins.cpp to runtime but that kept breaking the windows build. I'll get back to it later 2) Move the derived location of some sources both for clarity and for ease of use. 3) Make auto generator scripts able to create directories if needed. 4) Move some scripts from the top level of the JavaScriptCore directory to a more appropriate directory. 5) Move some CMake generation commands around for clarity. * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: * Scripts/lazywriter.py: (LazyFileWriter.close): * Sources.txt: * inspector/scripts/generate-inspector-protocol-bindings.py: (IncrementalFileWriter.close): * yarr/create_regex_tables: Renamed from Source/JavaScriptCore/create_regex_tables. * yarr/generateYarrCanonicalizeUnicode: Renamed from Source/JavaScriptCore/generateYarrCanonicalizeUnicode. Source/WTF: The script now needs to determine if a file is from a derived source. This is only relevant for the CMake build since the script needs to provide a list of the bundled source files. If the script does not provide the full path for derived sources then CMake will be unable to find them and the build will fail. Additionally, I move the error message for the Xcode build outside the main loop. This means that the error message will contain all the files you need to add to Xcode and all those files will now be written in DerivedSources so they should be easier to add. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/193793@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-26 15:34:19 +00:00
Setup WebCore build to start using unified sources. https://bugs.webkit.org/show_bug.cgi?id=178362 Reviewed by Tim Horton. .: Pass features to the unified source bundler script. * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: Change comments in source list files. Also, pass explicit names for build files. * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * Sources.txt: * SourcesGTK.txt: * SourcesMac.txt: Source/WebCore: This patch adds all the long tooling needed to start adding unified sources to WebCore. Most of the source list files are empty to start but will be filled over the next few days. I started by moving all the non-derived bindings code to unified sources to make sure everything worked correctly. * CMakeLists.txt: * Configurations/GenerateUnifiedSources.xcconfig: Added. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * Sources.txt: Added. * SourcesCocoa.txt: Added. * SourcesIOS.txt: Added. * SourcesMac.txt: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this... Source/WTF: There are a number of changes to the bundler script. First, it is now possible to enable or disable building files based on if the associated feature flag is enabled or not. The syntax for this is similar to how we do #ifs in C++ code. e.g. #if ENABLE_APPLE_PAY myApplePayFile.cpp #endif would enable myApplePayFile.cpp if and only if the APPLE_PAY feature define is set. I also changed comments from # to // to make it less likely they would be confused with a #if. Finally, this patch enables bundling files in the same relative directory across source list files. Previously, if SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had platform/cf/bar.cpp those files would not be put in the same unified source bundle. Now, those files will be put into the same bundle but bar.cpp will always follow foo.cpp. The idea is that by putting more specific files after more general files we can avoid random build failures. * Scripts/generate-unified-source-bundles.rb: Canonical link: https://commits.webkit.org/194673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-18 19:14:51 +00:00
log($generatedSources.join(";") + ";")
Do unified source builds for JSC https://bugs.webkit.org/show_bug.cgi?id=176076 Reviewed by Geoffrey Garen. Source/JavaScriptCore: This patch switches the CMake JavaScriptCore build to use unified sources. The Xcode build will be upgraded in a follow up patch. Most of the source changes in this patch are fixing static variable/functions name collisions. The most common collisions were from our use of "static const bool verbose" and "using namespace ...". I fixed all the verbose cases and fixed the "using namespace" issues that occurred under the current bundling strategy. It's likely that more of the "using namespace" issues will need to be resolved in the future, particularly in the FTL. I don't expect either of these problems will apply to other parts of the project nearly as much as in JSC. Using a verbose variable is a JSC idiom and JSC tends use the same, canonical, class name in multiple parts of the engine. * CMakeLists.txt: * b3/B3CheckSpecial.cpp: (JSC::B3::CheckSpecial::forEachArg): (JSC::B3::CheckSpecial::generate): (JSC::B3::Air::numB3Args): Deleted. * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3LowerMacrosAfterOptimizations.cpp: (): Deleted. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::LowerToAir): Deleted. (JSC::B3::Air::LowerToAir::run): Deleted. (JSC::B3::Air::LowerToAir::shouldCopyPropagate): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::swap): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator=): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::~ArgPromise): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::setTraps): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::tmp): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::operator bool const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::kind const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::peek const): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::consume): Deleted. (JSC::B3::Air::LowerToAir::ArgPromise::inst): Deleted. (JSC::B3::Air::LowerToAir::tmp): Deleted. (JSC::B3::Air::LowerToAir::tmpPromise): Deleted. (JSC::B3::Air::LowerToAir::canBeInternal): Deleted. (JSC::B3::Air::LowerToAir::commitInternal): Deleted. (JSC::B3::Air::LowerToAir::crossesInterference): Deleted. (JSC::B3::Air::LowerToAir::scaleForShl): Deleted. (JSC::B3::Air::LowerToAir::effectiveAddr): Deleted. (JSC::B3::Air::LowerToAir::addr): Deleted. (JSC::B3::Air::LowerToAir::trappingInst): Deleted. (JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode): Deleted. (JSC::B3::Air::LowerToAir::loadPromise): Deleted. (JSC::B3::Air::LowerToAir::imm): Deleted. (JSC::B3::Air::LowerToAir::bitImm): Deleted. (JSC::B3::Air::LowerToAir::bitImm64): Deleted. (JSC::B3::Air::LowerToAir::immOrTmp): Deleted. (JSC::B3::Air::LowerToAir::tryOpcodeForType): Deleted. (JSC::B3::Air::LowerToAir::opcodeForType): Deleted. (JSC::B3::Air::LowerToAir::appendUnOp): Deleted. (JSC::B3::Air::LowerToAir::preferRightForResult): Deleted. (JSC::B3::Air::LowerToAir::appendBinOp): Deleted. (JSC::B3::Air::LowerToAir::appendShift): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreUnOp): Deleted. (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp): Deleted. (JSC::B3::Air::LowerToAir::createStore): Deleted. (JSC::B3::Air::LowerToAir::storeOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendStore): Deleted. (JSC::B3::Air::LowerToAir::moveForType): Deleted. (JSC::B3::Air::LowerToAir::relaxedMoveForType): Deleted. (JSC::B3::Air::LowerToAir::print): Deleted. (JSC::B3::Air::LowerToAir::append): Deleted. (JSC::B3::Air::LowerToAir::appendTrapping): Deleted. (JSC::B3::Air::LowerToAir::finishAppendingInstructions): Deleted. (JSC::B3::Air::LowerToAir::newBlock): Deleted. (JSC::B3::Air::LowerToAir::splitBlock): Deleted. (JSC::B3::Air::LowerToAir::ensureSpecial): Deleted. (JSC::B3::Air::LowerToAir::ensureCheckSpecial): Deleted. (JSC::B3::Air::LowerToAir::fillStackmap): Deleted. (JSC::B3::Air::LowerToAir::createGenericCompare): Deleted. (JSC::B3::Air::LowerToAir::createBranch): Deleted. (JSC::B3::Air::LowerToAir::createCompare): Deleted. (JSC::B3::Air::LowerToAir::createSelect): Deleted. (JSC::B3::Air::LowerToAir::tryAppendLea): Deleted. (JSC::B3::Air::LowerToAir::appendX86Div): Deleted. (JSC::B3::Air::LowerToAir::appendX86UDiv): Deleted. (JSC::B3::Air::LowerToAir::loadLinkOpcode): Deleted. (JSC::B3::Air::LowerToAir::storeCondOpcode): Deleted. (JSC::B3::Air::LowerToAir::appendCAS): Deleted. (JSC::B3::Air::LowerToAir::appendVoidAtomic): Deleted. (JSC::B3::Air::LowerToAir::appendGeneralAtomic): Deleted. (JSC::B3::Air::LowerToAir::lower): Deleted. * b3/B3PatchpointSpecial.cpp: (JSC::B3::PatchpointSpecial::generate): * b3/B3ReduceDoubleToFloat.cpp: (JSC::B3::reduceDoubleToFloat): * b3/B3ReduceStrength.cpp: * b3/B3StackmapGenerationParams.cpp: * b3/B3StackmapSpecial.cpp: (JSC::B3::StackmapSpecial::repsImpl): (JSC::B3::StackmapSpecial::repForArg): * b3/air/AirAllocateStackByGraphColoring.cpp: (JSC::B3::Air::allocateStackByGraphColoring): * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirFixObviousSpills.cpp: * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirStackAllocation.cpp: (JSC::B3::Air::attemptAssignment): (JSC::B3::Air::assign): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeDFGStatuses): * bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter): * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::addCases): (JSC::PolymorphicAccess::regenerate): * bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): (JSC::DFG::ByteCodeParser::inliningCost): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::attemptToInlineCall): (JSC::DFG::ByteCodeParser::handleInlining): (JSC::DFG::ByteCodeParser::planLoad): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::linkBlock): (JSC::DFG::ByteCodeParser::linkBlocks): * dfg/DFGCSEPhase.cpp: * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::InPlaceAbstractState::merge): * dfg/DFGIntegerCheckCombiningPhase.cpp: (JSC::DFG::IntegerCheckCombiningPhase::handleBlock): * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLAbstractHeap.cpp: (JSC::FTL::AbstractHeap::compute): * ftl/FTLAbstractHeapRepository.cpp: (JSC::FTL::AbstractHeapRepository::decorateMemory): (JSC::FTL::AbstractHeapRepository::decorateCCallRead): (JSC::FTL::AbstractHeapRepository::decorateCCallWrite): (JSC::FTL::AbstractHeapRepository::decoratePatchpointRead): (JSC::FTL::AbstractHeapRepository::decoratePatchpointWrite): (JSC::FTL::AbstractHeapRepository::decorateFenceRead): (JSC::FTL::AbstractHeapRepository::decorateFenceWrite): (JSC::FTL::AbstractHeapRepository::decorateFencedAccess): (JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions): * ftl/FTLLink.cpp: (JSC::FTL::link): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::build): * llint/LLIntData.cpp: (JSC::LLInt::Data::loadStats): (JSC::LLInt::Data::saveStats): * runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint): (JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire): * runtime/ErrorInstance.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::foundCallFrame const): Deleted. (JSC::FindFirstCallerFrameWithCodeblockFunctor::index const): Deleted. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): * runtime/PromiseDeferredTimer.cpp: (JSC::PromiseDeferredTimer::doWork): (JSC::PromiseDeferredTimer::addPendingPromise): (JSC::PromiseDeferredTimer::cancelPendingPromise): * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::insertNewLocation): * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/WeakMapPrototype.cpp: (JSC::protoFuncWeakMapDelete): (JSC::protoFuncWeakMapGet): (JSC::protoFuncWeakMapHas): (JSC::protoFuncWeakMapSet): (JSC::getWeakMapData): Deleted. * runtime/WeakSetPrototype.cpp: (JSC::protoFuncWeakSetDelete): (JSC::protoFuncWeakSetHas): (JSC::protoFuncWeakSetAdd): (JSC::getWeakMapData): Deleted. * testRegExp.cpp: (testOneRegExp): (runFromFiles): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::moveToState): (JSC::Wasm::BBQPlan::parseAndValidateModule): (JSC::Wasm::BBQPlan::prepare): (JSC::Wasm::BBQPlan::compileFunctions): (JSC::Wasm::BBQPlan::complete): * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::trapHandler): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::OMGPlan): (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::fail): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::adopt): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): Source/WTF: This patch adds a script that will automatically bundle source files, which is currently only used by the CMake build. It's important that we use the same script to generate the bundles for the CMake build as the Xcode build. If we didn't do this then it's likely that there would be build errors that occur in only one build system. On the same note, we also need to be careful to not bundle platform specific source files with platform independent ones. There are a couple of things the script does not currently handle but are not essential for the CMake build. First, it does not handle the max bundle size restrictions that the Xcode build will require. It also does not handle C files. The unified source generator script works by collecting groups of up to 8 files from the same directory. We don't bundle files from across directories since I didn't see a speedup from doing so. Additionally, splitting at the directory boundary means that it is less likely that adding a new file will force a "clean" build. This would happen because the new file will shift every subsequent file into the next unified source bundle. Using unified sources appears to be a roughly 3.5x build time speed up for clean builds on my MBP and appears to have a negligible effect in incremental builds. * generate-unified-source-bundles.rb: Added. * wtf/Assertions.h: Canonical link: https://commits.webkit.org/193292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-13 01:31:07 +00:00
print($generatedSources.join(";") + ";")