Ignore:
Timestamp:
Sep 17, 2019, 5:36:19 PM (6 years ago)
Author:
[email protected]
Message:

Use constexpr instead of const in symbol definitions that are obviously constexpr.
https://bugs.webkit.org/show_bug.cgi?id=201879

Rubber-stamped by Joseph Pecoraro.

Source/bmalloc:

  • bmalloc/AvailableMemory.cpp:
  • bmalloc/IsoTLS.h:
  • bmalloc/Map.h:
  • bmalloc/Mutex.cpp:

(bmalloc::Mutex::lockSlowCase):

  • bmalloc/PerThread.h:
  • bmalloc/Vector.h:
  • bmalloc/Zone.h:

Source/JavaScriptCore:

const may require external storage (at the compiler's whim) though these
currently do not. constexpr makes it clear that the value is a literal constant
that can be inlined. In most cases in the code, when we say static const, we
actually mean static constexpr. I'm changing the code to reflect this.

  • API/JSAPIValueWrapper.h:
  • API/JSCallbackConstructor.h:
  • API/JSCallbackObject.h:
  • API/JSContextRef.cpp:
  • API/JSWrapperMap.mm:
  • API/tests/CompareAndSwapTest.cpp:
  • API/tests/TypedArrayCTest.cpp:
  • API/tests/testapi.mm:

(testObjectiveCAPIMain):

  • KeywordLookupGenerator.py:

(Trie.printAsC):

  • assembler/ARMv7Assembler.h:
  • assembler/AssemblerBuffer.h:
  • assembler/AssemblerCommon.h:
  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerARM64.h:
  • assembler/MacroAssemblerARM64E.h:
  • assembler/MacroAssemblerARMv7.h:
  • assembler/MacroAssemblerCodeRef.h:
  • assembler/MacroAssemblerMIPS.h:
  • assembler/MacroAssemblerX86.h:
  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::absDouble):
(JSC::MacroAssemblerX86Common::negateDouble):

  • assembler/MacroAssemblerX86_64.h:
  • assembler/X86Assembler.h:
  • b3/B3Bank.h:
  • b3/B3CheckSpecial.h:
  • b3/B3DuplicateTails.cpp:
  • b3/B3EliminateCommonSubexpressions.cpp:
  • b3/B3FixSSA.cpp:
  • b3/B3FoldPathConstants.cpp:
  • b3/B3InferSwitches.cpp:
  • b3/B3Kind.h:
  • b3/B3LowerToAir.cpp:
  • b3/B3NativeTraits.h:
  • b3/B3ReduceDoubleToFloat.cpp:
  • b3/B3ReduceLoopStrength.cpp:
  • b3/B3ReduceStrength.cpp:
  • b3/B3ValueKey.h:
  • b3/air/AirAllocateRegistersByGraphColoring.cpp:
  • b3/air/AirAllocateStackByGraphColoring.cpp:
  • b3/air/AirArg.h:
  • b3/air/AirCCallSpecial.h:
  • b3/air/AirEmitShuffle.cpp:
  • b3/air/AirFixObviousSpills.cpp:
  • b3/air/AirFormTable.h:
  • b3/air/AirLowerAfterRegAlloc.cpp:
  • b3/air/AirPrintSpecial.h:
  • b3/air/AirStackAllocation.cpp:
  • b3/air/AirTmp.h:
  • b3/testb3_6.cpp:

(testInterpreter):

  • bytecode/AccessCase.cpp:
  • bytecode/CallLinkStatus.cpp:
  • bytecode/CallVariant.h:
  • bytecode/CodeBlock.h:
  • bytecode/CodeOrigin.h:
  • bytecode/DFGExitProfile.h:
  • bytecode/DirectEvalCodeCache.h:
  • bytecode/ExecutableToCodeBlockEdge.h:
  • bytecode/GetterSetterAccessCase.cpp:
  • bytecode/LazyOperandValueProfile.h:
  • bytecode/ObjectPropertyCondition.h:
  • bytecode/ObjectPropertyConditionSet.cpp:
  • bytecode/PolymorphicAccess.cpp:
  • bytecode/PropertyCondition.h:
  • bytecode/SpeculatedType.h:
  • bytecode/StructureStubInfo.cpp:
  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset):

  • bytecode/UnlinkedCodeBlock.h:
  • bytecode/UnlinkedEvalCodeBlock.h:
  • bytecode/UnlinkedFunctionCodeBlock.h:
  • bytecode/UnlinkedFunctionExecutable.h:
  • bytecode/UnlinkedModuleProgramCodeBlock.h:
  • bytecode/UnlinkedProgramCodeBlock.h:
  • bytecode/ValueProfile.h:
  • bytecode/VirtualRegister.h:
  • bytecode/Watchpoint.h:
  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/Label.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ThisNode::emitBytecode):

  • bytecompiler/RegisterID.h:
  • debugger/Breakpoint.h:
  • debugger/DebuggerParseData.cpp:
  • debugger/DebuggerPrimitives.h:
  • debugger/DebuggerScope.h:
  • dfg/DFGAbstractHeap.h:
  • dfg/DFGAbstractValue.h:
  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGByteCodeParser.cpp:
  • dfg/DFGCSEPhase.cpp:
  • dfg/DFGCommon.h:
  • dfg/DFGCompilationKey.h:
  • dfg/DFGDesiredGlobalProperty.h:
  • dfg/DFGEdgeDominates.h:
  • dfg/DFGEpoch.h:
  • dfg/DFGForAllKills.h:

(JSC::DFG::forAllKilledNodesAtNodeIndex):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::isLiveInBytecode):

  • dfg/DFGHeapLocation.h:
  • dfg/DFGInPlaceAbstractState.cpp:
  • dfg/DFGIntegerCheckCombiningPhase.cpp:
  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
  • dfg/DFGInvalidationPointInjectionPhase.cpp:
  • dfg/DFGLICMPhase.cpp:
  • dfg/DFGLazyNode.h:
  • dfg/DFGMinifiedID.h:
  • dfg/DFGMovHintRemovalPhase.cpp:
  • dfg/DFGNodeFlowProjection.h:
  • dfg/DFGNodeType.h:
  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGPhantomInsertionPhase.cpp:
  • dfg/DFGPromotedHeapLocation.h:
  • dfg/DFGPropertyTypeKey.h:
  • dfg/DFGPureValue.h:
  • dfg/DFGPutStackSinkingPhase.cpp:
  • dfg/DFGRegisterBank.h:
  • dfg/DFGSSAConversionPhase.cpp:
  • dfg/DFGSSALoweringPhase.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileDoubleRep):
(JSC::DFG::compileClampDoubleToByte):
(JSC::DFG::SpeculativeJIT::compileArithRounding):
(JSC::DFG::compileArithPowIntegerFastPath):
(JSC::DFG::SpeculativeJIT::compileArithPow):
(JSC::DFG::SpeculativeJIT::emitBinarySwitchStringRecurse):

  • dfg/DFGStackLayoutPhase.cpp:
  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • dfg/DFGStrengthReductionPhase.cpp:
  • dfg/DFGStructureAbstractValue.h:
  • dfg/DFGVarargsForwardingPhase.cpp:
  • dfg/DFGVariableEventStream.cpp:

(JSC::DFG::VariableEventStream::reconstruct const):

  • dfg/DFGWatchpointCollectionPhase.cpp:
  • disassembler/ARM64/A64DOpcode.h:
  • ftl/FTLLocation.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileArithRandom):

  • ftl/FTLSlowPathCall.cpp:
  • ftl/FTLSlowPathCallKey.h:
  • heap/CellContainer.h:
  • heap/CellState.h:
  • heap/ConservativeRoots.h:
  • heap/GCSegmentedArray.h:
  • heap/HandleBlock.h:
  • heap/Heap.cpp:

(JSC::Heap::updateAllocationLimits):

  • heap/Heap.h:
  • heap/HeapSnapshot.h:
  • heap/HeapUtil.h:

(JSC::HeapUtil::findGCObjectPointersForMarking):

  • heap/IncrementalSweeper.cpp:
  • heap/LargeAllocation.h:
  • heap/MarkedBlock.cpp:
  • heap/Strong.h:
  • heap/VisitRaceKey.h:
  • heap/Weak.h:
  • heap/WeakBlock.h:
  • inspector/JSInjectedScriptHost.h:
  • inspector/JSInjectedScriptHostPrototype.h:
  • inspector/JSJavaScriptCallFrame.h:
  • inspector/JSJavaScriptCallFramePrototype.h:
  • inspector/agents/InspectorConsoleAgent.cpp:
  • inspector/agents/InspectorRuntimeAgent.cpp:

(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):

  • inspector/scripts/codegen/generate_cpp_protocol_types_header.py:

(CppProtocolTypesHeaderGenerator._generate_versions):

  • inspector/scripts/tests/generic/expected/version.json-result:
  • interpreter/Interpreter.h:
  • interpreter/ShadowChicken.cpp:
  • jit/BinarySwitch.cpp:
  • jit/CallFrameShuffler.h:
  • jit/ExecutableAllocator.h:
  • jit/FPRInfo.h:
  • jit/GPRInfo.h:
  • jit/ICStats.h:
  • jit/JITThunks.h:
  • jit/Reg.h:
  • jit/RegisterSet.h:
  • jit/TempRegisterSet.h:
  • jsc.cpp:
  • parser/ASTBuilder.h:
  • parser/Nodes.h:
  • parser/SourceCodeKey.h:
  • parser/SyntaxChecker.h:
  • parser/VariableEnvironment.h:
  • profiler/ProfilerOrigin.h:
  • profiler/ProfilerOriginStack.h:
  • profiler/ProfilerUID.h:
  • runtime/AbstractModuleRecord.cpp:
  • runtime/ArrayBufferNeuteringWatchpointSet.h:
  • runtime/ArrayConstructor.h:
  • runtime/ArrayConventions.h:
  • runtime/ArrayIteratorPrototype.h:
  • runtime/ArrayPrototype.cpp:

(JSC::setLength):

  • runtime/AsyncFromSyncIteratorPrototype.h:
  • runtime/AsyncGeneratorFunctionPrototype.h:
  • runtime/AsyncGeneratorPrototype.h:
  • runtime/AsyncIteratorPrototype.h:
  • runtime/AtomicsObject.cpp:
  • runtime/BigIntConstructor.h:
  • runtime/BigIntPrototype.h:
  • runtime/BooleanPrototype.h:
  • runtime/ClonedArguments.h:
  • runtime/CodeCache.h:
  • runtime/ControlFlowProfiler.h:
  • runtime/CustomGetterSetter.h:
  • runtime/DateConstructor.h:
  • runtime/DatePrototype.h:
  • runtime/DefinePropertyAttributes.h:
  • runtime/ErrorPrototype.h:
  • runtime/EvalExecutable.h:
  • runtime/Exception.h:
  • runtime/ExceptionHelpers.cpp:

(JSC::invalidParameterInSourceAppender):
(JSC::invalidParameterInstanceofSourceAppender):

  • runtime/ExceptionHelpers.h:
  • runtime/ExecutableBase.h:
  • runtime/FunctionExecutable.h:
  • runtime/FunctionRareData.h:
  • runtime/GeneratorPrototype.h:
  • runtime/GenericArguments.h:
  • runtime/GenericOffset.h:
  • runtime/GetPutInfo.h:
  • runtime/GetterSetter.h:
  • runtime/GlobalExecutable.h:
  • runtime/Identifier.h:
  • runtime/InspectorInstrumentationObject.h:
  • runtime/InternalFunction.h:
  • runtime/IntlCollatorConstructor.h:
  • runtime/IntlCollatorPrototype.h:
  • runtime/IntlDateTimeFormatConstructor.h:
  • runtime/IntlDateTimeFormatPrototype.h:
  • runtime/IntlNumberFormatConstructor.h:
  • runtime/IntlNumberFormatPrototype.h:
  • runtime/IntlObject.h:
  • runtime/IntlPluralRulesConstructor.h:
  • runtime/IntlPluralRulesPrototype.h:
  • runtime/IteratorPrototype.h:
  • runtime/JSArray.cpp:

(JSC::JSArray::tryCreateUninitializedRestricted):

  • runtime/JSArray.h:
  • runtime/JSArrayBuffer.h:
  • runtime/JSArrayBufferView.h:
  • runtime/JSBigInt.h:
  • runtime/JSCJSValue.h:
  • runtime/JSCell.h:
  • runtime/JSCustomGetterSetterFunction.h:
  • runtime/JSDataView.h:
  • runtime/JSDataViewPrototype.h:
  • runtime/JSDestructibleObject.h:
  • runtime/JSFixedArray.h:
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGlobalLexicalEnvironment.h:
  • runtime/JSGlobalObject.h:
  • runtime/JSImmutableButterfly.h:
  • runtime/JSInternalPromiseConstructor.h:
  • runtime/JSInternalPromiseDeferred.h:
  • runtime/JSInternalPromisePrototype.h:
  • runtime/JSLexicalEnvironment.h:
  • runtime/JSModuleEnvironment.h:
  • runtime/JSModuleLoader.h:
  • runtime/JSModuleNamespaceObject.h:
  • runtime/JSNonDestructibleProxy.h:
  • runtime/JSONObject.cpp:
  • runtime/JSONObject.h:
  • runtime/JSObject.h:
  • runtime/JSPromiseConstructor.h:
  • runtime/JSPromiseDeferred.h:
  • runtime/JSPromisePrototype.h:
  • runtime/JSPropertyNameEnumerator.h:
  • runtime/JSProxy.h:
  • runtime/JSScope.h:
  • runtime/JSScriptFetchParameters.h:
  • runtime/JSScriptFetcher.h:
  • runtime/JSSegmentedVariableObject.h:
  • runtime/JSSourceCode.h:
  • runtime/JSString.cpp:
  • runtime/JSString.h:
  • runtime/JSSymbolTableObject.h:
  • runtime/JSTemplateObjectDescriptor.h:
  • runtime/JSTypeInfo.h:
  • runtime/MapPrototype.h:
  • runtime/MinimumReservedZoneSize.h:
  • runtime/ModuleProgramExecutable.h:
  • runtime/NativeExecutable.h:
  • runtime/NativeFunction.h:
  • runtime/NativeStdFunctionCell.h:
  • runtime/NumberConstructor.h:
  • runtime/NumberPrototype.h:
  • runtime/ObjectConstructor.h:
  • runtime/ObjectPrototype.h:
  • runtime/ProgramExecutable.h:
  • runtime/PromiseDeferredTimer.cpp:
  • runtime/PropertyMapHashTable.h:
  • runtime/PropertyNameArray.h:

(JSC::PropertyNameArray::add):

  • runtime/PrototypeKey.h:
  • runtime/ProxyConstructor.h:
  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performGetOwnPropertyNames):

  • runtime/ProxyRevoke.h:
  • runtime/ReflectObject.h:
  • runtime/RegExp.h:
  • runtime/RegExpCache.h:
  • runtime/RegExpConstructor.h:
  • runtime/RegExpKey.h:
  • runtime/RegExpObject.h:
  • runtime/RegExpPrototype.h:
  • runtime/RegExpStringIteratorPrototype.h:
  • runtime/SamplingProfiler.cpp:
  • runtime/ScopedArgumentsTable.h:
  • runtime/ScriptExecutable.h:
  • runtime/SetPrototype.h:
  • runtime/SmallStrings.h:
  • runtime/SparseArrayValueMap.h:
  • runtime/StringConstructor.h:
  • runtime/StringIteratorPrototype.h:
  • runtime/StringObject.h:
  • runtime/StringPrototype.h:
  • runtime/Structure.h:
  • runtime/StructureChain.h:
  • runtime/StructureRareData.h:
  • runtime/StructureTransitionTable.h:
  • runtime/Symbol.h:
  • runtime/SymbolConstructor.h:
  • runtime/SymbolPrototype.h:
  • runtime/SymbolTable.h:
  • runtime/TemplateObjectDescriptor.h:
  • runtime/TypeProfiler.cpp:
  • runtime/TypeProfiler.h:
  • runtime/TypeProfilerLog.cpp:
  • runtime/VarOffset.h:
  • testRegExp.cpp:
  • tools/HeapVerifier.cpp:

(JSC::HeapVerifier::checkIfRecorded):

  • tools/JSDollarVM.cpp:
  • wasm/WasmB3IRGenerator.cpp:
  • wasm/WasmBBQPlan.cpp:
  • wasm/WasmFaultSignalHandler.cpp:
  • wasm/WasmFunctionParser.h:
  • wasm/WasmOMGForOSREntryPlan.cpp:
  • wasm/WasmOMGPlan.cpp:
  • wasm/WasmPlan.cpp:
  • wasm/WasmSignature.cpp:
  • wasm/WasmSignature.h:
  • wasm/WasmWorklist.cpp:
  • wasm/js/JSWebAssembly.h:
  • wasm/js/JSWebAssemblyCodeBlock.h:
  • wasm/js/WebAssemblyCompileErrorConstructor.h:
  • wasm/js/WebAssemblyCompileErrorPrototype.h:
  • wasm/js/WebAssemblyFunction.h:
  • wasm/js/WebAssemblyInstanceConstructor.h:
  • wasm/js/WebAssemblyInstancePrototype.h:
  • wasm/js/WebAssemblyLinkErrorConstructor.h:
  • wasm/js/WebAssemblyLinkErrorPrototype.h:
  • wasm/js/WebAssemblyMemoryConstructor.h:
  • wasm/js/WebAssemblyMemoryPrototype.h:
  • wasm/js/WebAssemblyModuleConstructor.h:
  • wasm/js/WebAssemblyModulePrototype.h:
  • wasm/js/WebAssemblyRuntimeErrorConstructor.h:
  • wasm/js/WebAssemblyRuntimeErrorPrototype.h:
  • wasm/js/WebAssemblyTableConstructor.h:
  • wasm/js/WebAssemblyTablePrototype.h:
  • wasm/js/WebAssemblyToJSCallee.h:
  • yarr/Yarr.h:
  • yarr/YarrParser.h:
  • yarr/generateYarrCanonicalizeUnicode:

Source/WebCore:

No new tests. Covered by existing tests.

  • bindings/js/JSDOMConstructorBase.h:
  • bindings/js/JSDOMWindowProperties.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GeneratePrototypeDeclaration):

  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestEnabledBySetting.h:
  • bindings/scripts/test/JS/JSTestEnabledForContext.h:
  • bindings/scripts/test/JS/JSTestEventTarget.h:
  • bindings/scripts/test/JS/JSTestGlobalObject.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestPluginInterface.h:
  • bindings/scripts/test/JS/JSTestTypedefs.h:
  • bridge/objc/objc_runtime.h:
  • bridge/runtime_array.h:
  • bridge/runtime_method.h:
  • bridge/runtime_object.h:

Source/WebKit:

  • WebProcess/Plugins/Netscape/JSNPObject.h:

Source/WTF:

  • wtf/Assertions.cpp:
  • wtf/AutomaticThread.cpp:
  • wtf/BitVector.h:
  • wtf/Bitmap.h:
  • wtf/BloomFilter.h:
  • wtf/Brigand.h:
  • wtf/CheckedArithmetic.h:
  • wtf/CrossThreadCopier.h:
  • wtf/CurrentTime.cpp:
  • wtf/DataLog.cpp:
  • wtf/DateMath.cpp:

(WTF::daysFrom1970ToYear):

  • wtf/DeferrableRefCounted.h:
  • wtf/GetPtr.h:
  • wtf/HashFunctions.h:
  • wtf/HashMap.h:
  • wtf/HashTable.h:
  • wtf/HashTraits.h:
  • wtf/JSONValues.cpp:
  • wtf/JSONValues.h:
  • wtf/ListHashSet.h:
  • wtf/Lock.h:
  • wtf/LockAlgorithm.h:
  • wtf/LockAlgorithmInlines.h:

(WTF::Hooks>::lockSlow):

  • wtf/Logger.h:
  • wtf/LoggerHelper.h:

(WTF::LoggerHelper::childLogIdentifier const):

  • wtf/MainThread.cpp:
  • wtf/MetaAllocatorPtr.h:
  • wtf/MonotonicTime.h:
  • wtf/NaturalLoops.h:

(WTF::NaturalLoops::NaturalLoops):

  • wtf/ObjectIdentifier.h:
  • wtf/RAMSize.cpp:
  • wtf/Ref.h:
  • wtf/RefPtr.h:
  • wtf/RetainPtr.h:
  • wtf/SchedulePair.h:
  • wtf/StackShot.h:
  • wtf/StdLibExtras.h:
  • wtf/TinyPtrSet.h:
  • wtf/URL.cpp:
  • wtf/URLHash.h:
  • wtf/URLParser.cpp:

(WTF::URLParser::defaultPortForProtocol):

  • wtf/Vector.h:
  • wtf/VectorTraits.h:
  • wtf/WallTime.h:
  • wtf/WeakHashSet.h:
  • wtf/WordLock.h:
  • wtf/cocoa/CPUTimeCocoa.cpp:
  • wtf/cocoa/MemoryPressureHandlerCocoa.mm:
  • wtf/persistence/PersistentDecoder.h:
  • wtf/persistence/PersistentEncoder.h:
  • wtf/text/AtomStringHash.h:
  • wtf/text/CString.h:
  • wtf/text/StringBuilder.cpp:

(WTF::expandedCapacity):

  • wtf/text/StringHash.h:
  • wtf/text/StringImpl.h:
  • wtf/text/StringToIntegerConversion.h:

(WTF::toIntegralType):

  • wtf/text/SymbolRegistry.h:
  • wtf/text/TextStream.cpp:

(WTF::hasFractions):

  • wtf/text/WTFString.h:
  • wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h

    r248546 r250005  
    11/*
    2  * Copyright (C) 2012, 2016 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    196196    }
    197197
    198     static const int bufferSize = 81;
     198    static constexpr int bufferSize = 81;
    199199
    200200    char m_formatBuffer[bufferSize];
     
    228228class A64DOpcodeAddSubtractImmediate : public A64DOpcodeAddSubtract {
    229229public:
    230     static const uint32_t mask = 0x1f000000;
    231     static const uint32_t pattern = 0x11000000;
     230    static constexpr uint32_t mask = 0x1f000000;
     231    static constexpr uint32_t pattern = 0x11000000;
    232232
    233233    DEFINE_STATIC_FORMAT(A64DOpcodeAddSubtractImmediate, thisObj);
     
    242242class A64DOpcodeAddSubtractExtendedRegister : public A64DOpcodeAddSubtract {
    243243public:
    244     static const uint32_t mask = 0x1fe00000;
    245     static const uint32_t pattern = 0x0b200000;
     244    static constexpr uint32_t mask = 0x1fe00000;
     245    static constexpr uint32_t pattern = 0x0b200000;
    246246
    247247    DEFINE_STATIC_FORMAT(A64DOpcodeAddSubtractExtendedRegister, thisObj);
     
    254254class A64DOpcodeAddSubtractShiftedRegister : public A64DOpcodeAddSubtract {
    255255public:
    256     static const uint32_t mask = 0x1f200000;
    257     static const uint32_t pattern = 0x0b000000;
     256    static constexpr uint32_t mask = 0x1f200000;
     257    static constexpr uint32_t pattern = 0x0b000000;
    258258
    259259    DEFINE_STATIC_FORMAT(A64DOpcodeAddSubtractShiftedRegister, thisObj);
     
    275275
    276276public:
    277     static const uint32_t mask = 0x1f800000;
    278     static const uint32_t pattern = 0x13000000;
     277    static constexpr uint32_t mask = 0x1f800000;
     278    static constexpr uint32_t pattern = 0x13000000;
    279279
    280280    DEFINE_STATIC_FORMAT(A64DOpcodeBitfield, thisObj);
     
    295295class A64DOpcodeCompareAndBranchImmediate : public A64DOpcode {
    296296public:
    297     static const uint32_t mask = 0x7e000000;
    298     static const uint32_t pattern = 0x34000000;
     297    static constexpr uint32_t mask = 0x7e000000;
     298    static constexpr uint32_t pattern = 0x34000000;
    299299
    300300    DEFINE_STATIC_FORMAT(A64DOpcodeCompareAndBranchImmediate, thisObj);
     
    308308class A64DOpcodeConditionalBranchImmediate : public A64DOpcode {
    309309public:
    310     static const uint32_t mask = 0xff000010;
    311     static const uint32_t pattern = 0x54000000;
     310    static constexpr uint32_t mask = 0xff000010;
     311    static constexpr uint32_t pattern = 0x54000000;
    312312
    313313    DEFINE_STATIC_FORMAT(A64DOpcodeConditionalBranchImmediate, thisObj);
     
    324324
    325325public:
    326     static const uint32_t mask = 0x1fe00000;
    327     static const uint32_t pattern = 0x1a800000;
     326    static constexpr uint32_t mask = 0x1fe00000;
     327    static constexpr uint32_t pattern = 0x1a800000;
    328328
    329329    DEFINE_STATIC_FORMAT(A64DOpcodeConditionalSelect, thisObj);
     
    345345   
    346346public:
    347     static const uint32_t mask = 0x5fe00000;
    348     static const uint32_t pattern = 0x5ac00000;
     347    static constexpr uint32_t mask = 0x5fe00000;
     348    static constexpr uint32_t pattern = 0x5ac00000;
    349349   
    350350    DEFINE_STATIC_FORMAT(A64DOpcodeDataProcessing1Source, thisObj);
     
    364364
    365365public:
    366     static const uint32_t mask = 0x5fe00000;
    367     static const uint32_t pattern = 0x1ac00000;
     366    static constexpr uint32_t mask = 0x5fe00000;
     367    static constexpr uint32_t pattern = 0x1ac00000;
    368368
    369369    DEFINE_STATIC_FORMAT(A64DOpcodeDataProcessing2Source, thisObj);
     
    383383
    384384public:
    385     static const uint32_t mask = 0x1f000000;
    386     static const uint32_t pattern = 0x1b000000;
     385    static constexpr uint32_t mask = 0x1f000000;
     386    static constexpr uint32_t pattern = 0x1b000000;
    387387
    388388    DEFINE_STATIC_FORMAT(A64DOpcodeDataProcessing3Source, thisObj);
     
    400400class A64OpcodeExceptionGeneration : public A64DOpcode {
    401401public:
    402     static const uint32_t mask = 0xff000000;
    403     static const uint32_t pattern = 0xd4000000;
     402    static constexpr uint32_t mask = 0xff000000;
     403    static constexpr uint32_t pattern = 0xd4000000;
    404404
    405405    DEFINE_STATIC_FORMAT(A64OpcodeExceptionGeneration, thisObj);
     
    415415class A64DOpcodeExtract : public A64DOpcode {
    416416public:
    417     static const uint32_t mask = 0x1f800000;
    418     static const uint32_t pattern = 0x13800000;
     417    static constexpr uint32_t mask = 0x1f800000;
     418    static constexpr uint32_t pattern = 0x13800000;
    419419
    420420    DEFINE_STATIC_FORMAT(A64DOpcodeExtract, thisObj);
     
    440440   
    441441public:
    442     static const uint32_t mask = 0x5f203c00;
    443     static const uint32_t pattern = 0x1e202000;
     442    static constexpr uint32_t mask = 0x5f203c00;
     443    static constexpr uint32_t pattern = 0x1e202000;
    444444   
    445445    DEFINE_STATIC_FORMAT(A64DOpcodeFloatingPointCompare, thisObj);
     
    456456class A64DOpcodeFloatingPointConditionalSelect : public A64DOpcodeFloatingPointOps {
    457457public:
    458     static const uint32_t mask = 0x5f200c00;
    459     static const uint32_t pattern = 0x1e200c00;
     458    static constexpr uint32_t mask = 0x5f200c00;
     459    static constexpr uint32_t pattern = 0x1e200c00;
    460460   
    461461    DEFINE_STATIC_FORMAT(A64DOpcodeFloatingPointConditionalSelect, thisObj);
     
    473473
    474474public:
    475     static const uint32_t mask = 0x5f207c00;
    476     static const uint32_t pattern = 0x1e204000;
     475    static constexpr uint32_t mask = 0x5f207c00;
     476    static constexpr uint32_t pattern = 0x1e204000;
    477477
    478478    DEFINE_STATIC_FORMAT(A64DOpcodeFloatingPointDataProcessing1Source, thisObj);
     
    490490
    491491public:
    492     static const uint32_t mask = 0x5f200800;
    493     static const uint32_t pattern = 0x1e200800;
     492    static constexpr uint32_t mask = 0x5f200800;
     493    static constexpr uint32_t pattern = 0x1e200800;
    494494
    495495    DEFINE_STATIC_FORMAT(A64DOpcodeFloatingPointDataProcessing2Source, thisObj);
     
    507507   
    508508public:
    509     static const uint32_t mask = 0x5f200000;
    510     static const uint32_t pattern = 0x1e000000;
     509    static constexpr uint32_t mask = 0x5f200000;
     510    static constexpr uint32_t pattern = 0x1e000000;
    511511   
    512512    DEFINE_STATIC_FORMAT(A64DOpcodeFloatingFixedPointConversions, thisObj);
     
    526526   
    527527public:
    528     static const uint32_t mask = 0x5f20fc00;
    529     static const uint32_t pattern = 0x1e200000;
     528    static constexpr uint32_t mask = 0x5f20fc00;
     529    static constexpr uint32_t pattern = 0x1e200000;
    530530
    531531    DEFINE_STATIC_FORMAT(A64DOpcodeFloatingPointIntegerConversions, thisObj);
     
    551551class A64DOpcodeMSRImmediate : public A64DOpcodeSystem {
    552552public:
    553     static const uint32_t mask = 0xfff8f01f;
    554     static const uint32_t pattern = 0xd500401f;
     553    static constexpr uint32_t mask = 0xfff8f01f;
     554    static constexpr uint32_t pattern = 0xd500401f;
    555555
    556556    DEFINE_STATIC_FORMAT(A64DOpcodeMSRImmediate, thisObj);
     
    561561class A64DOpcodeMSROrMRSRegister : public A64DOpcodeSystem {
    562562public:
    563     static const uint32_t mask = 0xffd00000;
    564     static const uint32_t pattern = 0xd5100000;
     563    static constexpr uint32_t mask = 0xffd00000;
     564    static constexpr uint32_t pattern = 0xd5100000;
    565565
    566566    DEFINE_STATIC_FORMAT(A64DOpcodeMSROrMRSRegister, thisObj);
     
    577577
    578578public:
    579     static const uint32_t mask = 0xfffff01f;
    580     static const uint32_t pattern = 0xd503201f;
     579    static constexpr uint32_t mask = 0xfffff01f;
     580    static constexpr uint32_t pattern = 0xd503201f;
    581581
    582582    DEFINE_STATIC_FORMAT(A64DOpcodeHint, thisObj);
     
    593593
    594594public:
    595     static const uint32_t mask = 0xfffff01f;
    596     static const uint32_t pattern = 0xd503301f;
     595    static constexpr uint32_t mask = 0xfffff01f;
     596    static constexpr uint32_t pattern = 0xd503301f;
    597597
    598598    DEFINE_STATIC_FORMAT(A64DOpcodeSystemSync, thisObj);
     
    626626
    627627public:
    628     static const uint32_t mask = 0x3f000000;
    629     static const uint32_t pattern = 0x08000000;
     628    static constexpr uint32_t mask = 0x3f000000;
     629    static constexpr uint32_t pattern = 0x08000000;
    630630
    631631    DEFINE_STATIC_FORMAT(A64DOpcodeLoadStoreExclusive, thisObj);
     
    654654
    655655public:
    656     static const uint32_t mask = 0x3b200000;
    657     static const uint32_t pattern = 0x38000000;
     656    static constexpr uint32_t mask = 0x3b200000;
     657    static constexpr uint32_t pattern = 0x38000000;
    658658
    659659    DEFINE_STATIC_FORMAT(A64DOpcodeLoadStoreImmediate, thisObj);
     
    675675class A64DOpcodeLoadStoreRegisterOffset : public A64DOpcodeLoadStore {
    676676public:
    677     static const uint32_t mask = 0x3b200c00;
    678     static const uint32_t pattern = 0x38200800;
     677    static constexpr uint32_t mask = 0x3b200c00;
     678    static constexpr uint32_t pattern = 0x38200800;
    679679
    680680    DEFINE_STATIC_FORMAT(A64DOpcodeLoadStoreRegisterOffset, thisObj);
     
    697697
    698698public:
    699     static const uint32_t mask = 0xff200400;
    700     static const uint32_t pattern = 0xf8200400;
     699    static constexpr uint32_t mask = 0xff200400;
     700    static constexpr uint32_t pattern = 0xf8200400;
    701701   
    702702    DEFINE_STATIC_FORMAT(A64DOpcodeLoadStoreAuthenticated, thisObj);
     
    714714class A64DOpcodeLoadStoreRegisterPair : public A64DOpcodeLoadStore {
    715715public:
    716     static const uint32_t mask = 0x3a000000;
    717     static const uint32_t pattern = 0x28000000;
     716    static constexpr uint32_t mask = 0x3a000000;
     717    static constexpr uint32_t pattern = 0x28000000;
    718718
    719719    DEFINE_STATIC_FORMAT(A64DOpcodeLoadStoreRegisterPair, thisObj);
     
    730730class A64DOpcodeLoadStoreUnsignedImmediate : public A64DOpcodeLoadStore {
    731731public:
    732     static const uint32_t mask = 0x3b000000;
    733     static const uint32_t pattern = 0x39000000;
     732    static constexpr uint32_t mask = 0x3b000000;
     733    static constexpr uint32_t pattern = 0x39000000;
    734734
    735735    DEFINE_STATIC_FORMAT(A64DOpcodeLoadStoreUnsignedImmediate, thisObj);
     
    756756class A64DOpcodeLogicalImmediate : public A64DOpcodeLogical {
    757757public:
    758     static const uint32_t mask = 0x1f800000;
    759     static const uint32_t pattern = 0x12000000;
     758    static constexpr uint32_t mask = 0x1f800000;
     759    static constexpr uint32_t pattern = 0x12000000;
    760760
    761761    DEFINE_STATIC_FORMAT(A64DOpcodeLogicalImmediate, thisObj);
     
    773773class A64DOpcodeLogicalShiftedRegister : public A64DOpcodeLogical {
    774774public:
    775     static const uint32_t mask = 0x1f000000;
    776     static const uint32_t pattern = 0x0a000000;
     775    static constexpr uint32_t mask = 0x1f000000;
     776    static constexpr uint32_t pattern = 0x0a000000;
    777777
    778778    DEFINE_STATIC_FORMAT(A64DOpcodeLogicalShiftedRegister, thisObj);
     
    792792
    793793public:
    794     static const uint32_t mask = 0x1f800000;
    795     static const uint32_t pattern = 0x12800000;
     794    static constexpr uint32_t mask = 0x1f800000;
     795    static constexpr uint32_t pattern = 0x12800000;
    796796
    797797    DEFINE_STATIC_FORMAT(A64DOpcodeMoveWide, thisObj);
     
    807807class A64DOpcodeTestAndBranchImmediate : public A64DOpcode {
    808808public:
    809     static const uint32_t mask = 0x7e000000;
    810     static const uint32_t pattern = 0x36000000;
     809    static constexpr uint32_t mask = 0x7e000000;
     810    static constexpr uint32_t pattern = 0x36000000;
    811811
    812812    DEFINE_STATIC_FORMAT(A64DOpcodeTestAndBranchImmediate, thisObj);
     
    821821class A64DOpcodeUnconditionalBranchImmediate : public A64DOpcode {
    822822public:
    823     static const uint32_t mask = 0x7c000000;
    824     static const uint32_t pattern = 0x14000000;
     823    static constexpr uint32_t mask = 0x7c000000;
     824    static constexpr uint32_t pattern = 0x14000000;
    825825
    826826    DEFINE_STATIC_FORMAT(A64DOpcodeUnconditionalBranchImmediate, thisObj);
     
    838838
    839839public:
    840     static const uint32_t mask = 0xfe1f0000;
    841     static const uint32_t pattern = 0xd61f0000;
     840    static constexpr uint32_t mask = 0xfe1f0000;
     841    static constexpr uint32_t pattern = 0xd61f0000;
    842842
    843843    DEFINE_STATIC_FORMAT(A64DOpcodeUnconditionalBranchRegister, thisObj);
Note: See TracChangeset for help on using the changeset viewer.