Always use OperationPtrTag for all operations and annotate operations in CSS JIT
https://bugs.webkit.org/show_bug.cgi?id=217117
Reviewed by Mark Lam.
Source/JavaScriptCore:
For JIT-caging, we would like to annotate all operations consistently with OperationPtrTag.
This patch replaces B3CCallPtrTag and CSSOperationPtrTag with OperationPtrTag and handle these
operations as Operation in JIT-caging.
We also collect and annotate all the operations called in CSS JIT and define them with JSC_DEFINE_JIT_OPERATION.
- b3/B3LowerMacros.cpp:
- b3/B3LowerMacrosAfterOptimizations.cpp:
- b3/B3MathExtras.cpp:
- b3/B3ReduceLoopStrength.cpp:
(JSC::B3::ReduceLoopStrength::reduceByteCopyLoopsToMemcpy):
- b3/B3ReduceStrength.cpp:
- b3/air/AirCCallSpecial.cpp:
(JSC::B3::Air::CCallSpecial::generate):
(testCallSimple):
(testCallRare):
(testCallRareLive):
(testCallSimplePure):
(testCallFunctionWithHellaArguments):
(testCallFunctionWithHellaArguments2):
(testCallFunctionWithHellaArguments3):
(testCallSimpleDouble):
(testCallSimpleFloat):
(testCallFunctionWithHellaDoubleArguments):
(testCallFunctionWithHellaFloatArguments):
(testLinearScanWithCalleeOnStack):
(testInterpreter):
(testLICMPure):
(testLICMPureSideExits):
(testLICMPureWritesPinned):
(testLICMPureWrites):
(testLICMReadsLocalState):
(testLICMReadsPinned):
(testLICMReads):
(testLICMPureNotBackwardsDominant):
(testLICMPureFoiledByChild):
(testLICMPureNotBackwardsDominantFoiledByChild):
(testLICMExitsSideways):
(testLICMWritesLocalState):
(testLICMWrites):
(testLICMFence):
(testLICMWritesPinned):
(testLICMControlDependent):
(testLICMControlDependentNotBackwardsDominant):
(testLICMControlDependentSideExits):
(testLICMReadsPinnedWritesPinned):
(testLICMReadsWritesDifferentHeaps):
(testLICMReadsWritesOverlappingHeaps):
(testLICMDefaultCall):
(testShuffleDoesntTrashCalleeSaves):
(JSC::FTL::Output::callWithoutSideEffects):
(JSC::FTL::Output::operation):
- runtime/JSCPtrTag.h:
- wasm/WasmAirIRGenerator.cpp:
(JSC::Wasm::AirIRGenerator::emitCCall):
- wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addRefFunc):
(JSC::Wasm::B3IRGenerator::addTableSize):
(JSC::Wasm::B3IRGenerator::addTableGrow):
(JSC::Wasm::B3IRGenerator::addTableFill):
(JSC::Wasm::B3IRGenerator::addGrowMemory):
(JSC::Wasm::B3IRGenerator::setGlobal):
(JSC::Wasm::B3IRGenerator::emitWriteBarrierForJSWrapper):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Popcnt>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Popcnt>):
Source/WebCore:
(WebCore::isFrameFocused): Deleted.
(WebCore::doesShadowTreeContainFocusedElement): Deleted.
(WebCore::SelectorChecker::matchesFocusPseudoClass): Deleted.
(WebCore::SelectorChecker::matchesDirectFocusPseudoClass): Deleted.
- css/SelectorChecker.h:
- css/SelectorCheckerTestFunctions.h:
(WebCore::isFrameFocused):
(WebCore::matchesDirectFocusPseudoClass):
(WebCore::doesShadowTreeContainFocusedElement):
(WebCore::matchesFocusPseudoClass):
- cssjit/CSSPtrTag.h:
- cssjit/FunctionCall.h:
(WebCore::FunctionCall::FunctionCall):
(WebCore::FunctionCall::setFunctionAddress):
(WebCore::FunctionCall::prepareAndCall):
- cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::JSC_DEFINE_JIT_OPERATION):
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelation):
(WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeStyleAttribute):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeAllAnimatedSVGAttribute):
(WebCore::SelectorCompiler::attributeValueSpaceSeparatedListContains):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
(WebCore::SelectorCompiler::SelectorFragment::appendUnoptimizedPseudoClassWithContext): Deleted.
(WebCore::SelectorCompiler::addStyleRelationFunction): Deleted.
(WebCore::SelectorCompiler::moduloHelper): Deleted.
(WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains): Deleted.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateContextFunctionCallTest): Deleted.
(WebCore::SelectorCompiler::elementIsActive): Deleted.
(WebCore::SelectorCompiler::elementIsHovered): Deleted.
(WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown): Deleted.
(WebCore::SelectorCompiler::isPlaceholderShown): Deleted.
(WebCore::StyledElement::synchronizeStyleAttributeInternalImpl):
(WebCore::StyledElement::synchronizeStyleAttributeInternal): Deleted.
(WebCore::StyledElement::synchronizeStyleAttributeInternal const):
- style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::collectMatchingRules):
(WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute): Deleted.