Use constexpr instead of const in symbol definitions that are obviously constexpr.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Sep 2019 00:36:19 +0000 (00:36 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Sep 2019 00:36:19 +0000 (00:36 +0000)
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250005 268f45cc-cd09-0410-ab3c-d52691b4dbfc

455 files changed:
Source/JavaScriptCore/API/JSAPIValueWrapper.h
Source/JavaScriptCore/API/JSCallbackConstructor.h
Source/JavaScriptCore/API/JSCallbackObject.h
Source/JavaScriptCore/API/JSContextRef.cpp
Source/JavaScriptCore/API/JSWrapperMap.mm
Source/JavaScriptCore/API/tests/CompareAndSwapTest.cpp
Source/JavaScriptCore/API/tests/TypedArrayCTest.cpp
Source/JavaScriptCore/API/tests/testapi.mm
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/KeywordLookupGenerator.py
Source/JavaScriptCore/assembler/ARMv7Assembler.h
Source/JavaScriptCore/assembler/AssemblerBuffer.h
Source/JavaScriptCore/assembler/AssemblerCommon.h
Source/JavaScriptCore/assembler/MacroAssembler.h
Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
Source/JavaScriptCore/assembler/MacroAssemblerARM64E.h
Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h
Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h
Source/JavaScriptCore/assembler/MacroAssemblerX86.h
Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h
Source/JavaScriptCore/assembler/X86Assembler.h
Source/JavaScriptCore/b3/B3Bank.h
Source/JavaScriptCore/b3/B3CheckSpecial.h
Source/JavaScriptCore/b3/B3DuplicateTails.cpp
Source/JavaScriptCore/b3/B3EliminateCommonSubexpressions.cpp
Source/JavaScriptCore/b3/B3FixSSA.cpp
Source/JavaScriptCore/b3/B3FoldPathConstants.cpp
Source/JavaScriptCore/b3/B3InferSwitches.cpp
Source/JavaScriptCore/b3/B3Kind.h
Source/JavaScriptCore/b3/B3LowerToAir.cpp
Source/JavaScriptCore/b3/B3NativeTraits.h
Source/JavaScriptCore/b3/B3ReduceDoubleToFloat.cpp
Source/JavaScriptCore/b3/B3ReduceLoopStrength.cpp
Source/JavaScriptCore/b3/B3ReduceStrength.cpp
Source/JavaScriptCore/b3/B3ValueKey.h
Source/JavaScriptCore/b3/air/AirAllocateRegistersByGraphColoring.cpp
Source/JavaScriptCore/b3/air/AirAllocateStackByGraphColoring.cpp
Source/JavaScriptCore/b3/air/AirArg.h
Source/JavaScriptCore/b3/air/AirCCallSpecial.h
Source/JavaScriptCore/b3/air/AirEmitShuffle.cpp
Source/JavaScriptCore/b3/air/AirFixObviousSpills.cpp
Source/JavaScriptCore/b3/air/AirFormTable.h
Source/JavaScriptCore/b3/air/AirLowerAfterRegAlloc.cpp
Source/JavaScriptCore/b3/air/AirPrintSpecial.h
Source/JavaScriptCore/b3/air/AirStackAllocation.cpp
Source/JavaScriptCore/b3/air/AirTmp.h
Source/JavaScriptCore/b3/testb3_6.cpp
Source/JavaScriptCore/bytecode/AccessCase.cpp
Source/JavaScriptCore/bytecode/CallLinkStatus.cpp
Source/JavaScriptCore/bytecode/CallVariant.h
Source/JavaScriptCore/bytecode/CodeBlock.h
Source/JavaScriptCore/bytecode/CodeOrigin.h
Source/JavaScriptCore/bytecode/DFGExitProfile.h
Source/JavaScriptCore/bytecode/DirectEvalCodeCache.h
Source/JavaScriptCore/bytecode/ExecutableToCodeBlockEdge.h
Source/JavaScriptCore/bytecode/GetterSetterAccessCase.cpp
Source/JavaScriptCore/bytecode/LazyOperandValueProfile.h
Source/JavaScriptCore/bytecode/ObjectPropertyCondition.h
Source/JavaScriptCore/bytecode/ObjectPropertyConditionSet.cpp
Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp
Source/JavaScriptCore/bytecode/PropertyCondition.h
Source/JavaScriptCore/bytecode/SpeculatedType.h
Source/JavaScriptCore/bytecode/StructureStubInfo.cpp
Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
Source/JavaScriptCore/bytecode/UnlinkedEvalCodeBlock.h
Source/JavaScriptCore/bytecode/UnlinkedFunctionCodeBlock.h
Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h
Source/JavaScriptCore/bytecode/UnlinkedModuleProgramCodeBlock.h
Source/JavaScriptCore/bytecode/UnlinkedProgramCodeBlock.h
Source/JavaScriptCore/bytecode/ValueProfile.h
Source/JavaScriptCore/bytecode/VirtualRegister.h
Source/JavaScriptCore/bytecode/Watchpoint.h
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
Source/JavaScriptCore/bytecompiler/Label.h
Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
Source/JavaScriptCore/bytecompiler/RegisterID.h
Source/JavaScriptCore/debugger/Breakpoint.h
Source/JavaScriptCore/debugger/DebuggerParseData.cpp
Source/JavaScriptCore/debugger/DebuggerPrimitives.h
Source/JavaScriptCore/debugger/DebuggerScope.h
Source/JavaScriptCore/dfg/DFGAbstractHeap.h
Source/JavaScriptCore/dfg/DFGAbstractValue.h
Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
Source/JavaScriptCore/dfg/DFGCSEPhase.cpp
Source/JavaScriptCore/dfg/DFGCommon.h
Source/JavaScriptCore/dfg/DFGCompilationKey.h
Source/JavaScriptCore/dfg/DFGDesiredGlobalProperty.h
Source/JavaScriptCore/dfg/DFGEdgeDominates.h
Source/JavaScriptCore/dfg/DFGEpoch.h
Source/JavaScriptCore/dfg/DFGForAllKills.h
Source/JavaScriptCore/dfg/DFGGraph.cpp
Source/JavaScriptCore/dfg/DFGHeapLocation.h
Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp
Source/JavaScriptCore/dfg/DFGIntegerCheckCombiningPhase.cpp
Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp
Source/JavaScriptCore/dfg/DFGInvalidationPointInjectionPhase.cpp
Source/JavaScriptCore/dfg/DFGLICMPhase.cpp
Source/JavaScriptCore/dfg/DFGLazyNode.h
Source/JavaScriptCore/dfg/DFGMinifiedID.h
Source/JavaScriptCore/dfg/DFGMovHintRemovalPhase.cpp
Source/JavaScriptCore/dfg/DFGNodeFlowProjection.h
Source/JavaScriptCore/dfg/DFGNodeType.h
Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp
Source/JavaScriptCore/dfg/DFGPhantomInsertionPhase.cpp
Source/JavaScriptCore/dfg/DFGPromotedHeapLocation.h
Source/JavaScriptCore/dfg/DFGPropertyTypeKey.h
Source/JavaScriptCore/dfg/DFGPureValue.h
Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp
Source/JavaScriptCore/dfg/DFGRegisterBank.h
Source/JavaScriptCore/dfg/DFGSSAConversionPhase.cpp
Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp
Source/JavaScriptCore/dfg/DFGStoreBarrierInsertionPhase.cpp
Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp
Source/JavaScriptCore/dfg/DFGStructureAbstractValue.h
Source/JavaScriptCore/dfg/DFGVarargsForwardingPhase.cpp
Source/JavaScriptCore/dfg/DFGVariableEventStream.cpp
Source/JavaScriptCore/dfg/DFGWatchpointCollectionPhase.cpp
Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h
Source/JavaScriptCore/ftl/FTLLocation.h
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
Source/JavaScriptCore/ftl/FTLSlowPathCall.cpp
Source/JavaScriptCore/ftl/FTLSlowPathCallKey.h
Source/JavaScriptCore/heap/CellContainer.h
Source/JavaScriptCore/heap/CellState.h
Source/JavaScriptCore/heap/ConservativeRoots.h
Source/JavaScriptCore/heap/GCSegmentedArray.h
Source/JavaScriptCore/heap/HandleBlock.h
Source/JavaScriptCore/heap/Heap.cpp
Source/JavaScriptCore/heap/Heap.h
Source/JavaScriptCore/heap/HeapSnapshot.h
Source/JavaScriptCore/heap/HeapUtil.h
Source/JavaScriptCore/heap/IncrementalSweeper.cpp
Source/JavaScriptCore/heap/LargeAllocation.h
Source/JavaScriptCore/heap/MarkedBlock.cpp
Source/JavaScriptCore/heap/Strong.h
Source/JavaScriptCore/heap/VisitRaceKey.h
Source/JavaScriptCore/heap/Weak.h
Source/JavaScriptCore/heap/WeakBlock.h
Source/JavaScriptCore/inspector/JSInjectedScriptHost.h
Source/JavaScriptCore/inspector/JSInjectedScriptHostPrototype.h
Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.h
Source/JavaScriptCore/inspector/JSJavaScriptCallFramePrototype.h
Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp
Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/version.json-result
Source/JavaScriptCore/interpreter/Interpreter.h
Source/JavaScriptCore/interpreter/ShadowChicken.cpp
Source/JavaScriptCore/jit/BinarySwitch.cpp
Source/JavaScriptCore/jit/CallFrameShuffler.h
Source/JavaScriptCore/jit/ExecutableAllocator.h
Source/JavaScriptCore/jit/FPRInfo.h
Source/JavaScriptCore/jit/GPRInfo.h
Source/JavaScriptCore/jit/ICStats.h
Source/JavaScriptCore/jit/JITThunks.h
Source/JavaScriptCore/jit/Reg.h
Source/JavaScriptCore/jit/RegisterSet.h
Source/JavaScriptCore/jit/TempRegisterSet.h
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/parser/ASTBuilder.h
Source/JavaScriptCore/parser/Nodes.h
Source/JavaScriptCore/parser/SourceCodeKey.h
Source/JavaScriptCore/parser/SyntaxChecker.h
Source/JavaScriptCore/parser/VariableEnvironment.h
Source/JavaScriptCore/profiler/ProfilerOrigin.h
Source/JavaScriptCore/profiler/ProfilerOriginStack.h
Source/JavaScriptCore/profiler/ProfilerUID.h
Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp
Source/JavaScriptCore/runtime/ArrayBufferNeuteringWatchpointSet.h
Source/JavaScriptCore/runtime/ArrayConstructor.h
Source/JavaScriptCore/runtime/ArrayConventions.h
Source/JavaScriptCore/runtime/ArrayIteratorPrototype.h
Source/JavaScriptCore/runtime/ArrayPrototype.cpp
Source/JavaScriptCore/runtime/AsyncFromSyncIteratorPrototype.h
Source/JavaScriptCore/runtime/AsyncGeneratorFunctionPrototype.h
Source/JavaScriptCore/runtime/AsyncGeneratorPrototype.h
Source/JavaScriptCore/runtime/AsyncIteratorPrototype.h
Source/JavaScriptCore/runtime/AtomicsObject.cpp
Source/JavaScriptCore/runtime/BigIntConstructor.h
Source/JavaScriptCore/runtime/BigIntPrototype.h
Source/JavaScriptCore/runtime/BooleanPrototype.h
Source/JavaScriptCore/runtime/ClonedArguments.h
Source/JavaScriptCore/runtime/CodeCache.h
Source/JavaScriptCore/runtime/ControlFlowProfiler.h
Source/JavaScriptCore/runtime/CustomGetterSetter.h
Source/JavaScriptCore/runtime/DateConstructor.h
Source/JavaScriptCore/runtime/DatePrototype.h
Source/JavaScriptCore/runtime/DefinePropertyAttributes.h
Source/JavaScriptCore/runtime/ErrorPrototype.h
Source/JavaScriptCore/runtime/EvalExecutable.h
Source/JavaScriptCore/runtime/Exception.h
Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
Source/JavaScriptCore/runtime/ExceptionHelpers.h
Source/JavaScriptCore/runtime/ExecutableBase.h
Source/JavaScriptCore/runtime/FunctionExecutable.h
Source/JavaScriptCore/runtime/FunctionRareData.h
Source/JavaScriptCore/runtime/GeneratorPrototype.h
Source/JavaScriptCore/runtime/GenericArguments.h
Source/JavaScriptCore/runtime/GenericOffset.h
Source/JavaScriptCore/runtime/GetPutInfo.h
Source/JavaScriptCore/runtime/GetterSetter.h
Source/JavaScriptCore/runtime/GlobalExecutable.h
Source/JavaScriptCore/runtime/Identifier.h
Source/JavaScriptCore/runtime/InspectorInstrumentationObject.h
Source/JavaScriptCore/runtime/InternalFunction.h
Source/JavaScriptCore/runtime/IntlCollatorConstructor.h
Source/JavaScriptCore/runtime/IntlCollatorPrototype.h
Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.h
Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.h
Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.h
Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.h
Source/JavaScriptCore/runtime/IntlObject.h
Source/JavaScriptCore/runtime/IntlPluralRulesConstructor.h
Source/JavaScriptCore/runtime/IntlPluralRulesPrototype.h
Source/JavaScriptCore/runtime/IteratorPrototype.h
Source/JavaScriptCore/runtime/JSArray.cpp
Source/JavaScriptCore/runtime/JSArray.h
Source/JavaScriptCore/runtime/JSArrayBuffer.h
Source/JavaScriptCore/runtime/JSArrayBufferView.h
Source/JavaScriptCore/runtime/JSBigInt.h
Source/JavaScriptCore/runtime/JSCJSValue.h
Source/JavaScriptCore/runtime/JSCell.h
Source/JavaScriptCore/runtime/JSCustomGetterSetterFunction.h
Source/JavaScriptCore/runtime/JSDataView.h
Source/JavaScriptCore/runtime/JSDataViewPrototype.h
Source/JavaScriptCore/runtime/JSDestructibleObject.h
Source/JavaScriptCore/runtime/JSFixedArray.h
Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
Source/JavaScriptCore/runtime/JSGlobalLexicalEnvironment.h
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/JSImmutableButterfly.h
Source/JavaScriptCore/runtime/JSInternalPromiseConstructor.h
Source/JavaScriptCore/runtime/JSInternalPromiseDeferred.h
Source/JavaScriptCore/runtime/JSInternalPromisePrototype.h
Source/JavaScriptCore/runtime/JSLexicalEnvironment.h
Source/JavaScriptCore/runtime/JSModuleEnvironment.h
Source/JavaScriptCore/runtime/JSModuleLoader.h
Source/JavaScriptCore/runtime/JSModuleNamespaceObject.h
Source/JavaScriptCore/runtime/JSNonDestructibleProxy.h
Source/JavaScriptCore/runtime/JSONObject.cpp
Source/JavaScriptCore/runtime/JSONObject.h
Source/JavaScriptCore/runtime/JSObject.h
Source/JavaScriptCore/runtime/JSPromiseConstructor.h
Source/JavaScriptCore/runtime/JSPromiseDeferred.h
Source/JavaScriptCore/runtime/JSPromisePrototype.h
Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.h
Source/JavaScriptCore/runtime/JSProxy.h
Source/JavaScriptCore/runtime/JSScope.h
Source/JavaScriptCore/runtime/JSScriptFetchParameters.h
Source/JavaScriptCore/runtime/JSScriptFetcher.h
Source/JavaScriptCore/runtime/JSSegmentedVariableObject.h
Source/JavaScriptCore/runtime/JSSourceCode.h
Source/JavaScriptCore/runtime/JSString.cpp
Source/JavaScriptCore/runtime/JSString.h
Source/JavaScriptCore/runtime/JSSymbolTableObject.h
Source/JavaScriptCore/runtime/JSTemplateObjectDescriptor.h
Source/JavaScriptCore/runtime/JSTypeInfo.h
Source/JavaScriptCore/runtime/MapPrototype.h
Source/JavaScriptCore/runtime/MinimumReservedZoneSize.h
Source/JavaScriptCore/runtime/ModuleProgramExecutable.h
Source/JavaScriptCore/runtime/NativeExecutable.h
Source/JavaScriptCore/runtime/NativeFunction.h
Source/JavaScriptCore/runtime/NativeStdFunctionCell.h
Source/JavaScriptCore/runtime/NumberConstructor.h
Source/JavaScriptCore/runtime/NumberPrototype.h
Source/JavaScriptCore/runtime/ObjectConstructor.h
Source/JavaScriptCore/runtime/ObjectPrototype.h
Source/JavaScriptCore/runtime/ProgramExecutable.h
Source/JavaScriptCore/runtime/PromiseDeferredTimer.cpp
Source/JavaScriptCore/runtime/PropertyMapHashTable.h
Source/JavaScriptCore/runtime/PropertyNameArray.h
Source/JavaScriptCore/runtime/PrototypeKey.h
Source/JavaScriptCore/runtime/ProxyConstructor.h
Source/JavaScriptCore/runtime/ProxyObject.cpp
Source/JavaScriptCore/runtime/ProxyRevoke.h
Source/JavaScriptCore/runtime/ReflectObject.h
Source/JavaScriptCore/runtime/RegExp.h
Source/JavaScriptCore/runtime/RegExpCache.h
Source/JavaScriptCore/runtime/RegExpConstructor.h
Source/JavaScriptCore/runtime/RegExpKey.h
Source/JavaScriptCore/runtime/RegExpObject.h
Source/JavaScriptCore/runtime/RegExpPrototype.h
Source/JavaScriptCore/runtime/RegExpStringIteratorPrototype.h
Source/JavaScriptCore/runtime/SamplingProfiler.cpp
Source/JavaScriptCore/runtime/ScopedArgumentsTable.h
Source/JavaScriptCore/runtime/ScriptExecutable.h
Source/JavaScriptCore/runtime/SetPrototype.h
Source/JavaScriptCore/runtime/SmallStrings.h
Source/JavaScriptCore/runtime/SparseArrayValueMap.h
Source/JavaScriptCore/runtime/StringConstructor.h
Source/JavaScriptCore/runtime/StringIteratorPrototype.h
Source/JavaScriptCore/runtime/StringObject.h
Source/JavaScriptCore/runtime/StringPrototype.h
Source/JavaScriptCore/runtime/Structure.h
Source/JavaScriptCore/runtime/StructureChain.h
Source/JavaScriptCore/runtime/StructureRareData.h
Source/JavaScriptCore/runtime/StructureTransitionTable.h
Source/JavaScriptCore/runtime/Symbol.h
Source/JavaScriptCore/runtime/SymbolConstructor.h
Source/JavaScriptCore/runtime/SymbolPrototype.h
Source/JavaScriptCore/runtime/SymbolTable.h
Source/JavaScriptCore/runtime/TemplateObjectDescriptor.h
Source/JavaScriptCore/runtime/TypeProfiler.cpp
Source/JavaScriptCore/runtime/TypeProfiler.h
Source/JavaScriptCore/runtime/TypeProfilerLog.cpp
Source/JavaScriptCore/runtime/VarOffset.h
Source/JavaScriptCore/testRegExp.cpp
Source/JavaScriptCore/tools/HeapVerifier.cpp
Source/JavaScriptCore/tools/JSDollarVM.cpp
Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp
Source/JavaScriptCore/wasm/WasmFunctionParser.h
Source/JavaScriptCore/wasm/WasmOMGForOSREntryPlan.cpp
Source/JavaScriptCore/wasm/WasmOMGPlan.cpp
Source/JavaScriptCore/wasm/WasmPlan.cpp
Source/JavaScriptCore/wasm/WasmSignature.cpp
Source/JavaScriptCore/wasm/WasmSignature.h
Source/JavaScriptCore/wasm/WasmWorklist.cpp
Source/JavaScriptCore/wasm/js/JSWebAssembly.h
Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlock.h
Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.h
Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorPrototype.h
Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h
Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.h
Source/JavaScriptCore/wasm/js/WebAssemblyInstancePrototype.h
Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.h
Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorPrototype.h
Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.h
Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.h
Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.h
Source/JavaScriptCore/wasm/js/WebAssemblyModulePrototype.h
Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.h
Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorPrototype.h
Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.h
Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.h
Source/JavaScriptCore/wasm/js/WebAssemblyToJSCallee.h
Source/JavaScriptCore/yarr/Yarr.h
Source/JavaScriptCore/yarr/YarrParser.h
Source/JavaScriptCore/yarr/generateYarrCanonicalizeUnicode
Source/WTF/ChangeLog
Source/WTF/wtf/Assertions.cpp
Source/WTF/wtf/AutomaticThread.cpp
Source/WTF/wtf/BitVector.h
Source/WTF/wtf/Bitmap.h
Source/WTF/wtf/BloomFilter.h
Source/WTF/wtf/Brigand.h
Source/WTF/wtf/CheckedArithmetic.h
Source/WTF/wtf/CrossThreadCopier.h
Source/WTF/wtf/CurrentTime.cpp
Source/WTF/wtf/DataLog.cpp
Source/WTF/wtf/DateMath.cpp
Source/WTF/wtf/DeferrableRefCounted.h
Source/WTF/wtf/GetPtr.h
Source/WTF/wtf/HashFunctions.h
Source/WTF/wtf/HashMap.h
Source/WTF/wtf/HashTable.h
Source/WTF/wtf/HashTraits.h
Source/WTF/wtf/JSONValues.cpp
Source/WTF/wtf/JSONValues.h
Source/WTF/wtf/ListHashSet.h
Source/WTF/wtf/Lock.h
Source/WTF/wtf/LockAlgorithm.h
Source/WTF/wtf/LockAlgorithmInlines.h
Source/WTF/wtf/Logger.h
Source/WTF/wtf/LoggerHelper.h
Source/WTF/wtf/MainThread.cpp
Source/WTF/wtf/MetaAllocatorPtr.h
Source/WTF/wtf/MonotonicTime.h
Source/WTF/wtf/NaturalLoops.h
Source/WTF/wtf/ObjectIdentifier.h
Source/WTF/wtf/RAMSize.cpp
Source/WTF/wtf/Ref.h
Source/WTF/wtf/RefPtr.h
Source/WTF/wtf/RetainPtr.h
Source/WTF/wtf/SchedulePair.h
Source/WTF/wtf/StackShot.h
Source/WTF/wtf/StdLibExtras.h
Source/WTF/wtf/TinyPtrSet.h
Source/WTF/wtf/URL.cpp
Source/WTF/wtf/URLHash.h
Source/WTF/wtf/URLParser.cpp
Source/WTF/wtf/Vector.h
Source/WTF/wtf/VectorTraits.h
Source/WTF/wtf/WallTime.h
Source/WTF/wtf/WeakHashSet.h
Source/WTF/wtf/WordLock.h
Source/WTF/wtf/cocoa/CPUTimeCocoa.cpp
Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm
Source/WTF/wtf/persistence/PersistentDecoder.h
Source/WTF/wtf/persistence/PersistentEncoder.h
Source/WTF/wtf/text/AtomStringHash.h
Source/WTF/wtf/text/CString.h
Source/WTF/wtf/text/StringBuilder.cpp
Source/WTF/wtf/text/StringHash.h
Source/WTF/wtf/text/StringImpl.h
Source/WTF/wtf/text/StringToIntegerConversion.h
Source/WTF/wtf/text/SymbolRegistry.h
Source/WTF/wtf/text/TextStream.cpp
Source/WTF/wtf/text/WTFString.h
Source/WTF/wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMConstructorBase.h
Source/WebCore/bindings/js/JSDOMWindowProperties.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h
Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.h
Source/WebCore/bindings/scripts/test/JS/JSTestEnabledForContext.h
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h
Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h
Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h
Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h
Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h
Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.h
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
Source/WebCore/bridge/objc/objc_runtime.h
Source/WebCore/bridge/runtime_array.h
Source/WebCore/bridge/runtime_method.h
Source/WebCore/bridge/runtime_object.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/Plugins/Netscape/JSNPObject.h
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/AvailableMemory.cpp
Source/bmalloc/bmalloc/IsoTLS.h
Source/bmalloc/bmalloc/Map.h
Source/bmalloc/bmalloc/Mutex.cpp
Source/bmalloc/bmalloc/PerThread.h
Source/bmalloc/bmalloc/Vector.h
Source/bmalloc/bmalloc/Zone.h

index aa26082..b2ae5cd 100644 (file)
@@ -33,7 +33,7 @@ class JSAPIValueWrapper final : public JSCell {
     friend JSValue jsAPIValueWrapper(ExecState*, JSValue);
 public:
     typedef JSCell Base;
-    static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
+    static constexpr unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
 
     JSValue value() const { return m_value.get(); }
 
index 3c31e07..305ac8c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -34,7 +34,7 @@ namespace JSC {
 class JSCallbackConstructor final : public JSDestructibleObject {
 public:
     typedef JSDestructibleObject Base;
-    static const unsigned StructureFlags = Base::StructureFlags | ImplementsHasInstance | ImplementsDefaultHasInstance;
+    static constexpr unsigned StructureFlags = Base::StructureFlags | ImplementsHasInstance | ImplementsDefaultHasInstance;
 
     static JSCallbackConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef classRef, JSObjectCallAsConstructorCallback callback) 
     {
index d0e6252..b83b133 100644 (file)
@@ -132,7 +132,7 @@ protected:
 
 public:
     typedef Parent Base;
-    static const unsigned StructureFlags = Base::StructureFlags | ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | ImplementsHasInstance | OverridesGetPropertyNames | OverridesGetCallData;
+    static constexpr unsigned StructureFlags = Base::StructureFlags | ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | ImplementsHasInstance | OverridesGetPropertyNames | OverridesGetCallData;
     static_assert(!(StructureFlags & ImplementsDefaultHasInstance), "using customHasInstance");
 
     ~JSCallbackObject();
index 291afa8..c37f127 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007, 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -56,7 +56,7 @@
 #if OS(DARWIN)
 #include <mach-o/dyld.h>
 
-static const int32_t webkitFirstVersionWithConcurrentGlobalContexts = 0x2100500; // 528.5.0
+static constexpr int32_t webkitFirstVersionWithConcurrentGlobalContexts = 0x2100500; // 528.5.0
 #endif
 
 using namespace JSC;
index 4b59907..a27bc15 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2015, 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 #if PLATFORM(APPLETV)
 #else
-static const int32_t firstJavaScriptCoreVersionWithInitConstructorSupport = 0x21A0400; // 538.4.0
+static constexpr int32_t firstJavaScriptCoreVersionWithInitConstructorSupport = 0x21A0400; // 538.4.0
 #if PLATFORM(IOS_FAMILY)
-static const uint32_t firstSDKVersionWithInitConstructorSupport = DYLD_IOS_VERSION_10_0;
+static constexpr uint32_t firstSDKVersionWithInitConstructorSupport = DYLD_IOS_VERSION_10_0;
 #elif PLATFORM(MAC)
-static const uint32_t firstSDKVersionWithInitConstructorSupport = 0xA0A00; // OSX 10.10.0
+static constexpr uint32_t firstSDKVersionWithInitConstructorSupport = 0xA0A00; // OSX 10.10.0
 #endif
 #endif
 
index 7c5b128..6d9b6a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,11 +40,11 @@ public:
     inline size_t numBits() const { return words * wordSize; }
 
 private:
-    static const size_t Size = 4096*10;
+    static constexpr size_t Size = 4096*10;
 
-    static const unsigned wordSize = sizeof(uint8_t) * 8;
-    static const unsigned words = (Size + wordSize - 1) / wordSize;
-    static const uint8_t one = 1;
+    static constexpr unsigned wordSize = sizeof(uint8_t) * 8;
+    static constexpr unsigned words = (Size + wordSize - 1) / wordSize;
+    static constexpr uint8_t one = 1;
 
     uint8_t bits[words];
 };
index b81b269..237bd46 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@ static void freePtr(void* ptr, void*)
     free(ptr);
 }
 
-static const unsigned numLengths = 3;
+static constexpr unsigned numLengths = 3;
 
 static const unsigned lengths[numLengths] =
 {
index f046cec..efaf30d 100644 (file)
@@ -1340,7 +1340,7 @@ static void testObjectiveCAPIMain()
     }
 
     @autoreleasepool {
-        static const unsigned count = 100;
+        static constexpr unsigned count = 100;
         NSMutableArray *array = [NSMutableArray arrayWithCapacity:count];
         JSContext *context = [[JSContext alloc] init];
         @autoreleasepool {
index 7b0369e..927d01c 100644 (file)
@@ -1,3 +1,389 @@
+2019-09-17  Mark Lam  <mark.lam@apple.com>
+
+        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.
+
+        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:
+
 2019-09-17  Yusuke Suzuki  <ysuzuki@apple.com>
 
         Follow-up after String.codePointAt optimization
index 776d7c8..4711909 100644 (file)
@@ -187,7 +187,7 @@ class Trie:
         print("static ALWAYS_INLINE bool isIdentPartIncludingEscape(const LChar* code, const LChar* codeEnd);")
         print("static ALWAYS_INLINE bool isIdentPartIncludingEscape(const UChar* code, const UChar* codeEnd);")
         # max length + 1 so we don't need to do any bounds checking at all
-        print("static const int maxTokenLength = %d;" % (self.maxLength() + 1))
+        print("static constexpr int maxTokenLength = %d;" % (self.maxLength() + 1))
         print("")
         print("template <>")
         print("template <bool shouldCreateIdentifier> ALWAYS_INLINE JSTokenType Lexer<UChar>::parseKeyword(JSTokenData* data)")
index 414cbd4..656bc2f 100644 (file)
@@ -103,9 +103,9 @@ class ARMThumbImmediate {
     friend class ARMv7Assembler;
 
     typedef uint8_t ThumbImmediateType;
-    static const ThumbImmediateType TypeInvalid = 0;
-    static const ThumbImmediateType TypeEncoded = 1;
-    static const ThumbImmediateType TypeUInt16 = 2;
+    static constexpr ThumbImmediateType TypeInvalid = 0;
+    static constexpr ThumbImmediateType TypeEncoded = 1;
+    static constexpr ThumbImmediateType TypeUInt16 = 2;
 
     typedef union {
         int16_t asInt;
index 5913132..c677c4f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008, 2012, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -68,7 +68,7 @@ namespace JSC {
 
     class AssemblerData {
         WTF_MAKE_NONCOPYABLE(AssemblerData);
-        static const size_t InlineCapacity = 128;
+        static constexpr size_t InlineCapacity = 128;
     public:
         AssemblerData()
             : m_buffer(m_inlineBuffer)
index 5f8fa4a..d39b403 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2014, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -282,7 +282,7 @@ private:
         return immN << 12 | immr << 6 | imms;
     }
 
-    static const int InvalidLogicalImmediate = -1;
+    static constexpr int InvalidLogicalImmediate = -1;
 
     int m_value;
 };
index 673fc90..845d5ee 100644 (file)
@@ -503,7 +503,7 @@ public:
     void retFloat(FPRegisterID) { ret(); }
     void retDouble(FPRegisterID) { ret(); }
 
-    static const unsigned BlindingModulus = 64;
+    static constexpr unsigned BlindingModulus = 64;
     bool shouldConsiderBlinding()
     {
         return !(random() & (BlindingModulus - 1));
index 559d8b7..d15d2df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,8 +38,8 @@ using Assembler = TARGET_ASSEMBLER;
 
 class MacroAssemblerARM64 : public AbstractMacroAssembler<Assembler> {
 public:
-    static const unsigned numGPRs = 32;
-    static const unsigned numFPRs = 32;
+    static constexpr unsigned numGPRs = 32;
+    static constexpr unsigned numFPRs = 32;
     
     static constexpr RegisterID dataTempRegister = ARM64Registers::ip0;
     static constexpr RegisterID memoryTempRegister = ARM64Registers::ip1;
@@ -51,11 +51,11 @@ public:
     }
 
 protected:
-    static const ARM64Registers::FPRegisterID fpTempRegister = ARM64Registers::q31;
-    static const Assembler::SetFlags S = Assembler::S;
-    static const int64_t maskHalfWord0 = 0xffffl;
-    static const int64_t maskHalfWord1 = 0xffff0000l;
-    static const int64_t maskUpperWord = 0xffffffff00000000l;
+    static constexpr ARM64Registers::FPRegisterID fpTempRegister = ARM64Registers::q31;
+    static constexpr Assembler::SetFlags S = Assembler::S;
+    static constexpr int64_t maskHalfWord0 = 0xffffl;
+    static constexpr int64_t maskHalfWord1 = 0xffff0000l;
+    static constexpr int64_t maskUpperWord = 0xffffffff00000000l;
 
     static constexpr size_t INSTRUCTION_SIZE = 4;
 
@@ -75,8 +75,8 @@ public:
     typedef Assembler::JumpLinkType JumpLinkType;
     typedef Assembler::Condition Condition;
 
-    static const Assembler::Condition DefaultCondition = Assembler::ConditionInvalid;
-    static const Assembler::JumpType DefaultJump = Assembler::JumpNoConditionFixedSize;
+    static constexpr Assembler::Condition DefaultCondition = Assembler::ConditionInvalid;
+    static constexpr Assembler::JumpType DefaultJump = Assembler::JumpNoConditionFixedSize;
 
     Vector<LinkRecord, 0, UnsafeVectorOverflow>& jumpsToLink() { return m_assembler.jumpsToLink(); }
     static bool canCompact(JumpType jumpType) { return Assembler::canCompact(jumpType); }
@@ -86,7 +86,7 @@ public:
     template <Assembler::CopyFunction copy>
     static void link(LinkRecord& record, uint8_t* from, const uint8_t* fromInstruction, uint8_t* to) { return Assembler::link<copy>(record, from, fromInstruction, to); }
 
-    static const Scale ScalePtr = TimesEight;
+    static constexpr Scale ScalePtr = TimesEight;
 
     static bool isCompactPtrAlignedAddressOffset(ptrdiff_t value)
     {
@@ -137,9 +137,9 @@ public:
         DoubleLessThanOrEqualOrUnordered = Assembler::ConditionLE,
     };
 
-    static const RegisterID stackPointerRegister = ARM64Registers::sp;
-    static const RegisterID framePointerRegister = ARM64Registers::fp;
-    static const RegisterID linkRegister = ARM64Registers::lr;
+    static constexpr RegisterID stackPointerRegister = ARM64Registers::sp;
+    static constexpr RegisterID framePointerRegister = ARM64Registers::fp;
+    static constexpr RegisterID linkRegister = ARM64Registers::lr;
 
     // FIXME: Get reasonable implementations for these
     static bool shouldBlindForSpecificArch(uint32_t value) { return value >= 0x00ffffff; }
index 3f1b1d0..aa97f38 100644 (file)
@@ -107,7 +107,7 @@ public:
         m_assembler.xpacd(target);
     }
 
-    static const RegisterID InvalidGPR  = static_cast<RegisterID>(-1);
+    static constexpr RegisterID InvalidGPR  = static_cast<RegisterID>(-1);
 
     enum class CallSignatureType {
         CFunctionCall,
index c7a76bb..95cd73f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2009-2019 Apple Inc. All rights reserved.
  * Copyright (C) 2010 University of Szeged
  *
  * Redistribution and use in source and binary forms, with or without
@@ -36,15 +36,15 @@ namespace JSC {
 using Assembler = TARGET_ASSEMBLER;
 
 class MacroAssemblerARMv7 : public AbstractMacroAssembler<Assembler> {
-    static const RegisterID dataTempRegister = ARMRegisters::ip;
-    static const RegisterID addressTempRegister = ARMRegisters::r6;
+    static constexpr RegisterID dataTempRegister = ARMRegisters::ip;
+    static constexpr RegisterID addressTempRegister = ARMRegisters::r6;
 
-    static const ARMRegisters::FPDoubleRegisterID fpTempRegister = ARMRegisters::d7;
+    static constexpr ARMRegisters::FPDoubleRegisterID fpTempRegister = ARMRegisters::d7;
     inline ARMRegisters::FPSingleRegisterID fpTempRegisterAsSingle() { return ARMRegisters::asSingle(fpTempRegister); }
 
 public:
-    static const unsigned numGPRs = 16;
-    static const unsigned numFPRs = 16;
+    static constexpr unsigned numGPRs = 16;
+    static constexpr unsigned numFPRs = 16;
     
     MacroAssemblerARMv7()
         : m_makeJumpPatchable(false)
@@ -56,8 +56,8 @@ public:
     typedef ARMv7Assembler::JumpLinkType JumpLinkType;
     typedef ARMv7Assembler::Condition Condition;
 
-    static const ARMv7Assembler::Condition DefaultCondition = ARMv7Assembler::ConditionInvalid;
-    static const ARMv7Assembler::JumpType DefaultJump = ARMv7Assembler::JumpNoConditionFixedSize;
+    static constexpr ARMv7Assembler::Condition DefaultCondition = ARMv7Assembler::ConditionInvalid;
+    static constexpr ARMv7Assembler::JumpType DefaultJump = ARMv7Assembler::JumpNoConditionFixedSize;
 
     static bool isCompactPtrAlignedAddressOffset(ptrdiff_t value)
     {
@@ -103,7 +103,7 @@ public:
     };
     
 public:
-    static const Scale ScalePtr = TimesFour;
+    static constexpr Scale ScalePtr = TimesFour;
 
     enum RelationalCondition {
         Equal = ARMv7Assembler::ConditionEQ,
@@ -143,9 +143,9 @@ public:
         DoubleLessThanOrEqualOrUnordered = ARMv7Assembler::ConditionLE,
     };
 
-    static const RegisterID stackPointerRegister = ARMRegisters::sp;
-    static const RegisterID framePointerRegister = ARMRegisters::fp;
-    static const RegisterID linkRegister = ARMRegisters::lr;
+    static constexpr RegisterID stackPointerRegister = ARMRegisters::sp;
+    static constexpr RegisterID framePointerRegister = ARMRegisters::fp;
+    static constexpr RegisterID linkRegister = ARMRegisters::lr;
 
     // Integer arithmetic operations:
     //
index d57bec0..56d8a07 100644 (file)
@@ -408,7 +408,7 @@ struct MacroAssemblerCodePtrHash {
     {
         return a == b;
     }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 // MacroAssemblerCodeRef:
index 4f9e261..d0cdf02 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
  * Copyright (C) 2010 MIPS Technologies, Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -38,8 +38,8 @@ using Assembler = TARGET_ASSEMBLER;
 class MacroAssemblerMIPS : public AbstractMacroAssembler<Assembler> {
 public:
     typedef MIPSRegisters::FPRegisterID FPRegisterID;
-    static const unsigned numGPRs = 32;
-    static const unsigned numFPRs = 32;
+    static constexpr unsigned numGPRs = 32;
+    static constexpr unsigned numFPRs = 32;
 
     MacroAssemblerMIPS()
         : m_fixedWidth(false)
@@ -61,21 +61,21 @@ public:
         return getLSBSet(v);
     }
 
-    static const Scale ScalePtr = TimesFour;
+    static constexpr Scale ScalePtr = TimesFour;
 
     // For storing immediate number
-    static const RegisterID immTempRegister = MIPSRegisters::t0;
+    static constexpr RegisterID immTempRegister = MIPSRegisters::t0;
     // For storing data loaded from the memory
-    static const RegisterID dataTempRegister = MIPSRegisters::t1;
+    static constexpr RegisterID dataTempRegister = MIPSRegisters::t1;
     // For storing address base
-    static const RegisterID addrTempRegister = MIPSRegisters::t7;
+    static constexpr RegisterID addrTempRegister = MIPSRegisters::t7;
     // For storing compare result
-    static const RegisterID cmpTempRegister = MIPSRegisters::t8;
+    static constexpr RegisterID cmpTempRegister = MIPSRegisters::t8;
 
     // FP temp register
-    static const FPRegisterID fpTempRegister = MIPSRegisters::f16;
+    static constexpr FPRegisterID fpTempRegister = MIPSRegisters::f16;
 
-    static const int MaximumCompactPtrAlignedAddressOffset = 0x7FFFFFFF;
+    static constexpr int MaximumCompactPtrAlignedAddressOffset = 0x7FFFFFFF;
 
     enum RelationalCondition {
         Equal,
@@ -118,9 +118,9 @@ public:
         Scale
     };
 
-    static const RegisterID stackPointerRegister = MIPSRegisters::sp;
-    static const RegisterID framePointerRegister = MIPSRegisters::fp;
-    static const RegisterID returnAddressRegister = MIPSRegisters::ra;
+    static constexpr RegisterID stackPointerRegister = MIPSRegisters::sp;
+    static constexpr RegisterID framePointerRegister = MIPSRegisters::fp;
+    static constexpr RegisterID returnAddressRegister = MIPSRegisters::ra;
 
     // Integer arithmetic operations:
     //
index 42a08fe..4afe817 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -33,10 +33,10 @@ namespace JSC {
 
 class MacroAssemblerX86 : public MacroAssemblerX86Common {
 public:
-    static const unsigned numGPRs = 8;
-    static const unsigned numFPRs = 8;
+    static constexpr unsigned numGPRs = 8;
+    static constexpr unsigned numFPRs = 8;
     
-    static const Scale ScalePtr = TimesFour;
+    static constexpr Scale ScalePtr = TimesFour;
 
     using MacroAssemblerX86Common::add32;
     using MacroAssemblerX86Common::and32;
index 0e33735..8cf5cc5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@ class MacroAssemblerX86Common : public AbstractMacroAssembler<Assembler> {
 public:
 #if CPU(X86_64)
     // Use this directly only if you're not generating code with it.
-    static const X86Registers::RegisterID s_scratchRegister = X86Registers::r11;
+    static constexpr X86Registers::RegisterID s_scratchRegister = X86Registers::r11;
 
     // Use this when generating code so that we get enforcement of the disallowing of scratch register
     // usage.
@@ -52,9 +52,9 @@ public:
 #endif
     
 protected:
-    static const int DoubleConditionBitInvert = 0x10;
-    static const int DoubleConditionBitSpecial = 0x20;
-    static const int DoubleConditionBits = DoubleConditionBitInvert | DoubleConditionBitSpecial;
+    static constexpr int DoubleConditionBitInvert = 0x10;
+    static constexpr int DoubleConditionBitSpecial = 0x20;
+    static constexpr int DoubleConditionBits = DoubleConditionBitInvert | DoubleConditionBitSpecial;
 
 public:
     typedef X86Assembler::XMMRegisterID XMMRegisterID;
@@ -106,8 +106,8 @@ public:
         !((X86Assembler::ConditionE | X86Assembler::ConditionNE | X86Assembler::ConditionA | X86Assembler::ConditionAE | X86Assembler::ConditionB | X86Assembler::ConditionBE) & DoubleConditionBits),
         DoubleConditionBits_should_not_interfere_with_X86Assembler_Condition_codes);
 
-    static const RegisterID stackPointerRegister = X86Registers::esp;
-    static const RegisterID framePointerRegister = X86Registers::ebp;
+    static constexpr RegisterID stackPointerRegister = X86Registers::esp;
+    static constexpr RegisterID framePointerRegister = X86Registers::ebp;
     
     static bool canBlind() { return true; }
     static bool shouldBlindForSpecificArch(uint32_t value) { return value >= 0x00ffffff; }
@@ -1103,7 +1103,7 @@ public:
     void absDouble(FPRegisterID src, FPRegisterID dst)
     {
         ASSERT(src != dst);
-        static const double negativeZeroConstant = -0.0;
+        static constexpr double negativeZeroConstant = -0.0;
         loadDouble(TrustedImmPtr(&negativeZeroConstant), dst);
         m_assembler.andnpd_rr(src, dst);
     }
@@ -1111,7 +1111,7 @@ public:
     void negateDouble(FPRegisterID src, FPRegisterID dst)
     {
         ASSERT(src != dst);
-        static const double negativeZeroConstant = -0.0;
+        static constexpr double negativeZeroConstant = -0.0;
         loadDouble(TrustedImmPtr(&negativeZeroConstant), dst);
         m_assembler.xorpd_rr(src, dst);
     }
index e607aae..bf9fe3f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -37,10 +37,10 @@ namespace JSC {
 
 class MacroAssemblerX86_64 : public MacroAssemblerX86Common {
 public:
-    static const unsigned numGPRs = 16;
-    static const unsigned numFPRs = 16;
+    static constexpr unsigned numGPRs = 16;
+    static constexpr unsigned numFPRs = 16;
     
-    static const Scale ScalePtr = TimesEight;
+    static constexpr Scale ScalePtr = TimesEight;
 
     using MacroAssemblerX86Common::add32;
     using MacroAssemblerX86Common::and32;
index 4ec5cc0..c100240 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -4029,7 +4029,7 @@ private:
     }
 
     class X86InstructionFormatter {
-        static const int maxInstructionSize = 16;
+        static constexpr int maxInstructionSize = 16;
 
     public:
         enum ModRmMode {
index d87e1e7..1e93bad 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -36,7 +36,7 @@ enum Bank : int8_t {
     FP
 };
 
-static const unsigned numBanks = 2;
+static constexpr unsigned numBanks = 2;
 
 template<typename Func>
 void forEachBank(const Func& func)
index 693e2ce..0656ad5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -143,7 +143,7 @@ private:
 struct CheckSpecialKeyHash {
     static unsigned hash(const CheckSpecial::Key& key) { return key.hash(); }
     static bool equal(const CheckSpecial::Key& a, const CheckSpecial::Key& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::B3
@@ -158,7 +158,7 @@ template<> struct DefaultHash<JSC::B3::CheckSpecial::Key> {
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::B3::CheckSpecial::Key> : SimpleClassHashTraits<JSC::B3::CheckSpecial::Key> {
     // I don't want to think about this very hard, it's not worth it. I'm a be conservative.
-    static const bool emptyValueIsZero = false;
+    static constexpr bool emptyValueIsZero = false;
 };
 
 } // namespace WTF
index cff44a4..7c0628d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -45,7 +45,7 @@ namespace JSC { namespace B3 {
 namespace {
 
 namespace B3DuplicateTailsInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 class DuplicateTails {
index 527faaa..b6fcdca 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -54,7 +54,7 @@ namespace JSC { namespace B3 {
 namespace {
 
 namespace B3EliminateCommonSubexpressionsInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 // FIXME: We could treat Patchpoints with a non-empty set of reads as a "memory value" and somehow
index af01aaf..c44073f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -49,7 +49,7 @@ namespace JSC { namespace B3 {
 namespace {
 
 namespace B3FixSSAInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 void killDeadVariables(Procedure& proc)
index 22250cb..e2c29af 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -42,7 +42,7 @@ namespace JSC { namespace B3 {
 namespace {
 
 namespace B3FoldPathConstantsInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 class FoldPathConstants {
index ee612fe..abd20b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,7 +43,7 @@ namespace JSC { namespace B3 {
 namespace {
 
 namespace B3InferSwitchesInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 class InferSwitches {
index 268c8e7..bd546db 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -211,7 +211,7 @@ inline Kind trapping(Kind kind)
 struct KindHash {
     static unsigned hash(const Kind& key) { return key.hash(); }
     static bool equal(const Kind& a, const Kind& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::B3
@@ -225,7 +225,7 @@ template<> struct DefaultHash<JSC::B3::Kind> {
 
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::B3::Kind> : public SimpleClassHashTraits<JSC::B3::Kind> {
-    static const bool emptyValueIsZero = false;
+    static constexpr bool emptyValueIsZero = false;
 };
 
 } // namespace WTF
index 7d6bbb2..727ef7b 100644 (file)
@@ -72,7 +72,7 @@ namespace JSC { namespace B3 {
 namespace {
 
 namespace B3LowerToAirInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 using Arg = Air::Arg;
@@ -531,7 +531,7 @@ private:
             return Arg::addr(tmp(address), offset);
         };
         
-        static const unsigned lotsOfUses = 10; // This is arbitrary and we should tune it eventually.
+        static constexpr unsigned lotsOfUses = 10; // This is arbitrary and we should tune it eventually.
 
         // Only match if the address value isn't used in some large number of places.
         if (m_useCounts.numUses(address) > lotsOfUses)
index a1bb2a7..4b08793 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -37,71 +37,71 @@ template<typename> struct NativeTraits;
 
 template<> struct NativeTraits<int8_t> {
     typedef int32_t CanonicalType;
-    static const Bank bank = GP;
-    static const Width width = Width8;
+    static constexpr Bank bank = GP;
+    static constexpr Width width = Width8;
     static constexpr Type type = Int32;
 };
 
 template<> struct NativeTraits<uint8_t> {
     typedef int32_t CanonicalType;
-    static const Bank bank = GP;
-    static const Width width = Width8;
+    static constexpr Bank bank = GP;
+    static constexpr Width width = Width8;
     static constexpr Type type = Int32;
 };
 
 template<> struct NativeTraits<int16_t> {
     typedef int32_t CanonicalType;
-    static const Bank bank = GP;
-    static const Width width = Width16;
+    static constexpr Bank bank = GP;
+    static constexpr Width width = Width16;
     static constexpr Type type = Int32;
 };
 
 template<> struct NativeTraits<uint16_t> {
     typedef int32_t CanonicalType;
-    static const Bank bank = GP;
-    static const Width width = Width16;
+    static constexpr Bank bank = GP;
+    static constexpr Width width = Width16;
     static constexpr Type type = Int32;
 };
 
 template<> struct NativeTraits<int32_t> {
     typedef int32_t CanonicalType;
-    static const Bank bank = GP;
-    static const Width width = Width32;
+    static constexpr Bank bank = GP;
+    static constexpr Width width = Width32;
     static constexpr Type type = Int32;
 };
 
 template<> struct NativeTraits<uint32_t> {
     typedef int32_t CanonicalType;
-    static const Bank bank = GP;
-    static const Width width = Width32;
+    static constexpr Bank bank = GP;
+    static constexpr Width width = Width32;
     static constexpr Type type = Int32;
 };
 
 template<> struct NativeTraits<int64_t> {
     typedef int64_t CanonicalType;
-    static const Bank bank = GP;
-    static const Width width = Width64;
+    static constexpr Bank bank = GP;
+    static constexpr Width width = Width64;
     static constexpr Type type = Int64;
 };
 
 template<> struct NativeTraits<uint64_t> {
     typedef int64_t CanonicalType;
-    static const Bank bank = GP;
-    static const Width width = Width64;
+    static constexpr Bank bank = GP;
+    static constexpr Width width = Width64;
     static constexpr Type type = Int64;
 };
 
 template<> struct NativeTraits<float> {
     typedef float CanonicalType;
-    static const Bank bank = FP;
-    static const Width width = Width32;
+    static constexpr Bank bank = FP;
+    static constexpr Width width = Width32;
     static constexpr Type type = Float;
 };
 
 template<> struct NativeTraits<double> {
     typedef double CanonicalType;
-    static const Bank bank = FP;
-    static const Width width = Width64;
+    static constexpr Bank bank = FP;
+    static constexpr Width width = Width64;
     static constexpr Type type = Double;
 };
 
index 6d31f7c..64d28e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@ namespace JSC { namespace B3 {
 namespace {
 
 namespace B3ReduceDoubleToFloatInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 bool printRemainingConversions = false;
 
index 7d8772a..e9338eb 100644 (file)
@@ -145,7 +145,7 @@ void fastForwardCopy32(uint32_t* dst, const uint32_t* src, size_t size)
 #endif
 
 class ReduceLoopStrength {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
 
     struct AddrInfo {
         Value* appendAddr(Procedure& proc, BasicBlock* block, Value* addr)
index 14fd9d4..9a8c9ab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -90,7 +90,7 @@ namespace {
 // canonical if x->index() <= y->index().
 
 namespace B3ReduceStrengthInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 // FIXME: This IntRange stuff should be refactored into a general constant propagator. It's weird
@@ -2102,7 +2102,7 @@ private:
             // blocks. This is pretty much guaranteed since one of those blocks will replace all
             // uses of the Select with a constant, and that constant will be transitively used
             // from the check.
-            static const unsigned selectSpecializationBound = 3;
+            static constexpr unsigned selectSpecializationBound = 3;
             Value* select = findRecentNodeMatching(
                 m_value->child(0), selectSpecializationBound,
                 [&] (Value* value) -> bool {
@@ -2286,7 +2286,7 @@ private:
         RELEASE_ASSERT(startIndex != UINT_MAX);
 
         // By BasicBlock convention, caseIndex == 0 => then, caseIndex == 1 => else.
-        static const unsigned numCases = 2;
+        static constexpr unsigned numCases = 2;
         BasicBlock* cases[numCases];
         for (unsigned i = 0; i < numCases; ++i)
             cases[i] = m_blockInsertionSet.insertBefore(m_block);
index a812b4e..b938513 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -178,7 +178,7 @@ private:
 struct ValueKeyHash {
     static unsigned hash(const ValueKey& key) { return key.hash(); }
     static bool equal(const ValueKey& a, const ValueKey& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::B3
@@ -192,7 +192,7 @@ template<> struct DefaultHash<JSC::B3::ValueKey> {
 
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::B3::ValueKey> : public SimpleClassHashTraits<JSC::B3::ValueKey> {
-    static const bool emptyValueIsZero = false;
+    static constexpr bool emptyValueIsZero = false;
 };
 
 } // namespace WTF
index 3e0272e..086068a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -516,7 +516,7 @@ protected:
     struct InterferenceEdgeHash {
         static unsigned hash(const InterferenceEdge& key) { return key.hash(); }
         static bool equal(const InterferenceEdge& a, const InterferenceEdge& b) { return a == b; }
-        static const bool safeToCompareToEmptyOrDeleted = true;
+        static constexpr bool safeToCompareToEmptyOrDeleted = true;
     };
     typedef SimpleClassHashTraits<InterferenceEdge> InterferenceEdgeHashTraits;
 
index ed67d1c..66ccf2f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,7 +43,7 @@ namespace JSC { namespace B3 { namespace Air {
 namespace {
 
 namespace AirAllocateStackByGraphColoringInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 struct CoalescableMove {
index 82413c8..517e4be 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -1467,7 +1467,7 @@ private:
 struct ArgHash {
     static unsigned hash(const Arg& key) { return key.hash(); }
     static bool equal(const Arg& a, const Arg& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } } // namespace JSC::B3::Air
@@ -1489,7 +1489,7 @@ template<> struct DefaultHash<JSC::B3::Air::Arg> {
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::B3::Air::Arg> : SimpleClassHashTraits<JSC::B3::Air::Arg> {
     // Because m_scale is 1 in the empty value.
-    static const bool emptyValueIsZero = false;
+    static constexpr bool emptyValueIsZero = false;
 };
 
 } // namespace WTF
index ad1d47f..c51a373 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -49,7 +49,7 @@ public:
     // You cannot use this register to pass arguments. It just so happens that this register is not
     // used for arguments in the C calling convention. By the way, this is the only thing that causes
     // this special to be specific to C calls.
-    static const GPRReg scratchRegister = GPRInfo::nonPreservedNonArgumentGPR0;
+    static constexpr GPRReg scratchRegister = GPRInfo::nonPreservedNonArgumentGPR0;
 
 protected:
     void forEachArg(Inst&, const ScopedLambda<Inst::EachArgCallback>&) final;
@@ -65,15 +65,15 @@ protected:
     void deepDumpImpl(PrintStream&) const final;
 
 private:
-    static const unsigned specialArgOffset = 0;
-    static const unsigned numSpecialArgs = 1;
-    static const unsigned calleeArgOffset = numSpecialArgs;
-    static const unsigned numCalleeArgs = 1;
-    static const unsigned returnGPArgOffset = numSpecialArgs + numCalleeArgs;
-    static const unsigned numReturnGPArgs = 2;
-    static const unsigned returnFPArgOffset = numSpecialArgs + numCalleeArgs + numReturnGPArgs;
-    static const unsigned numReturnFPArgs = 1;
-    static const unsigned argArgOffset =
+    static constexpr unsigned specialArgOffset = 0;
+    static constexpr unsigned numSpecialArgs = 1;
+    static constexpr unsigned calleeArgOffset = numSpecialArgs;
+    static constexpr unsigned numCalleeArgs = 1;
+    static constexpr unsigned returnGPArgOffset = numSpecialArgs + numCalleeArgs;
+    static constexpr unsigned numReturnGPArgs = 2;
+    static constexpr unsigned returnFPArgOffset = numSpecialArgs + numCalleeArgs + numReturnGPArgs;
+    static constexpr unsigned numReturnFPArgs = 1;
+    static constexpr unsigned argArgOffset =
         numSpecialArgs + numCalleeArgs + numReturnGPArgs + numReturnFPArgs;
     
     RegisterSet m_clobberedRegs;
index 7166ed8..b9697ec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,7 +38,7 @@ namespace JSC { namespace B3 { namespace Air {
 namespace {
 
 namespace AirEmitShuffleInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 template<typename Functor>
index 89a4563..c1b0317 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@ namespace JSC { namespace B3 { namespace Air {
 namespace {
 
 namespace AirFixObviousSpillsInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 class FixObviousSpills {
index 71492d3..6a42d2e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 namespace JSC { namespace B3 { namespace Air {
 
-static const uint8_t formRoleShift = 0;
-static const uint8_t formRoleMask = 15;
-static const uint8_t formBankShift = 4;
-static const uint8_t formBankMask = 1;
-static const uint8_t formWidthShift = 5;
-static const uint8_t formWidthMask = 3;
-static const uint8_t formInvalidShift = 7;
+static constexpr uint8_t formRoleShift = 0;
+static constexpr uint8_t formRoleMask = 15;
+static constexpr uint8_t formBankShift = 4;
+static constexpr uint8_t formBankMask = 1;
+static constexpr uint8_t formWidthShift = 5;
+static constexpr uint8_t formWidthMask = 3;
+static constexpr uint8_t formInvalidShift = 7;
 
 #define ENCODE_INST_FORM(role, bank, width) (static_cast<uint8_t>(role) << formRoleShift | static_cast<uint8_t>(bank) << formBankShift | static_cast<uint8_t>(width) << formWidthShift)
 
index 24c5c96..95a17ec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -48,7 +48,7 @@ namespace JSC { namespace B3 { namespace Air {
 namespace {
 
 namespace AirLowerAfterRegAllocInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
     
 } // anonymous namespace
index b9a4d7b..1a96278 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -97,7 +97,7 @@ public:
     // You cannot use this register to pass arguments. It just so happens that this register is not
     // used for arguments in the C calling convention. By the way, this is the only thing that causes
     // this special to be specific to C calls.
-    static const GPRReg scratchRegister = GPRInfo::nonArgGPR0;
+    static constexpr GPRReg scratchRegister = GPRInfo::nonArgGPR0;
     
 protected:
     void forEachArg(Inst&, const ScopedLambda<Inst::EachArgCallback>&) final;
@@ -113,14 +113,14 @@ protected:
     void deepDumpImpl(PrintStream&) const final;
     
 private:
-    static const unsigned specialArgOffset = 0;
-    static const unsigned numSpecialArgs = 1;
-    static const unsigned calleeArgOffset = numSpecialArgs;
-    static const unsigned numCalleeArgs = 1;
-    static const unsigned returnGPArgOffset = numSpecialArgs + numCalleeArgs;
-    static const unsigned numReturnGPArgs = 2;
-    static const unsigned returnFPArgOffset = numSpecialArgs + numCalleeArgs + numReturnGPArgs;
-    static const unsigned numReturnFPArgs = 1;
+    static constexpr unsigned specialArgOffset = 0;
+    static constexpr unsigned numSpecialArgs = 1;
+    static constexpr unsigned calleeArgOffset = numSpecialArgs;
+    static constexpr unsigned numCalleeArgs = 1;
+    static constexpr unsigned returnGPArgOffset = numSpecialArgs + numCalleeArgs;
+    static constexpr unsigned numReturnGPArgs = 2;
+    static constexpr unsigned returnFPArgOffset = numSpecialArgs + numCalleeArgs + numReturnGPArgs;
+    static constexpr unsigned numReturnFPArgs = 1;
     static constexpr unsigned argArgOffset =
     numSpecialArgs + numCalleeArgs + numReturnGPArgs + numReturnFPArgs;
     
index 6b6a26a..f860e17 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -39,7 +39,7 @@ namespace JSC { namespace B3 { namespace Air {
 namespace {
 
 namespace AirStackAllocationInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 template<typename Collection>
index 912455b..00e39df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -322,7 +322,7 @@ private:
 struct TmpHash {
     static unsigned hash(const Tmp& key) { return key.hash(); }
     static bool equal(const Tmp& a, const Tmp& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } } // namespace JSC::B3::Air
index 8d60f5c..e185d3f 100644 (file)
@@ -1662,11 +1662,11 @@ void testInterpreter()
     dispatch->appendSuccessor(FrequentedBlock(stop));
 
     // Our "opcodes".
-    static const intptr_t AddDP = 0;
-    static const intptr_t AddCP = 1;
-    static const intptr_t Add = 2;
-    static const intptr_t Print = 3;
-    static const intptr_t Stop = 4;
+    static constexpr intptr_t AddDP = 0;
+    static constexpr intptr_t AddCP = 1;
+    static constexpr intptr_t Add = 2;
+    static constexpr intptr_t Print = 3;
+    static constexpr intptr_t Stop = 4;
 
     polyJump->setGenerator(
         [&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
index 77fb65d..170c4dd 100644 (file)
@@ -51,7 +51,7 @@
 namespace JSC {
 
 namespace AccessCaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 AccessCase::AccessCase(VM& vm, JSCell* owner, AccessType type, PropertyOffset offset, Structure* structure, const ObjectPropertyConditionSet& conditionSet, std::unique_ptr<PolyProtoAccessChain> prototypeAccessChain)
index 3b7e193..fe29a9b 100644 (file)
@@ -40,7 +40,7 @@
 namespace JSC {
 
 namespace CallLinkStatusInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 CallLinkStatus::CallLinkStatus(JSValue value)
index bf3423b..4c101ef 100644 (file)
@@ -195,7 +195,7 @@ private:
 struct CallVariantHash {
     static unsigned hash(const CallVariant& key) { return key.hash(); }
     static bool equal(const CallVariant& a, const CallVariant& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 typedef Vector<CallVariant, 1> CallVariantList;
index 8de88ad..b1a82b3 100644 (file)
@@ -111,8 +111,8 @@ public:
 
     enum CopyParsedBlockTag { CopyParsedBlock };
 
-    static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
-    static const bool needsDestruction = true;
+    static constexpr unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
+    static constexpr bool needsDestruction = true;
 
     template<typename, SubspaceAccess>
     static IsoSubspace* subspaceFor(VM&) { return nullptr; }
index b6954e7..d5f30c2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -282,13 +282,13 @@ inline bool CodeOrigin::operator==(const CodeOrigin& other) const
 struct CodeOriginHash {
     static unsigned hash(const CodeOrigin& key) { return key.hash(); }
     static bool equal(const CodeOrigin& a, const CodeOrigin& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 struct CodeOriginApproximateHash {
     static unsigned hash(const CodeOrigin& key) { return key.approximateHash(); }
     static bool equal(const CodeOrigin& a, const CodeOrigin& b) { return a.isApproximatelyEqualTo(b); }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } // namespace JSC
@@ -302,7 +302,7 @@ template<> struct DefaultHash<JSC::CodeOrigin> {
 
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::CodeOrigin> : SimpleClassHashTraits<JSC::CodeOrigin> {
-    static const bool emptyValueIsZero = false;
+    static constexpr bool emptyValueIsZero = false;
 };
 
 } // namespace WTF
index 4b0d941..7f6019f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -146,7 +146,7 @@ private:
 struct FrequentExitSiteHash {
     static unsigned hash(const FrequentExitSite& key) { return key.hash(); }
     static bool equal(const FrequentExitSite& a, const FrequentExitSite& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::DFG
index 596f268..0d4846d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -74,7 +74,7 @@ namespace JSC {
                 {
                     return lhs == rhs;
                 }
-                static const bool safeToCompareToEmptyOrDeleted = false;
+                static constexpr bool safeToCompareToEmptyOrDeleted = false;
             };
 
             typedef SimpleClassHashTraits<CacheKey> HashTraits;
@@ -102,7 +102,7 @@ namespace JSC {
         void clear();
 
     private:
-        static const int maxCacheEntries = 64;
+        static constexpr int maxCacheEntries = 64;
 
         void setSlow(ExecState*, JSCell* owner, const String& evalSource, CallSiteIndex, DirectEvalExecutable*);
 
index feadd2b..e65b3d4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,7 +38,7 @@ class LLIntOffsetsExtractor;
 class ExecutableToCodeBlockEdge final : public JSCell {
 public:
     typedef JSCell Base;
-    static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
+    static constexpr unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
 
     template<typename CellType, SubspaceAccess>
     static IsoSubspace* subspaceFor(VM& vm)
index c9ed0aa..37d90e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -39,7 +39,7 @@
 namespace JSC {
 
 namespace GetterSetterAccessCaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 GetterSetterAccessCase::GetterSetterAccessCase(VM& vm, JSCell* owner, AccessType accessType, PropertyOffset offset, Structure* structure, const ObjectPropertyConditionSet& conditionSet, bool viaProxy, WatchpointSet* additionalSet, JSObject* customSlotBase, std::unique_ptr<PolyProtoAccessChain> prototypeAccessChain)
index 8f60eb0..01a3ee7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -99,7 +99,7 @@ struct LazyOperandValueProfileKeyHash {
     static bool equal(
         const LazyOperandValueProfileKey& a,
         const LazyOperandValueProfileKey& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } // namespace JSC
index 68934df..35a37e5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -267,7 +267,7 @@ struct ObjectPropertyConditionHash {
     {
         return a == b;
     }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } // namespace JSC
index 2c60d6b..9005b98 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -183,7 +183,7 @@ bool ObjectPropertyConditionSet::isValidAndWatchable() const
 namespace {
 
 namespace ObjectPropertyConditionSetInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 ObjectPropertyCondition generateCondition(
index 3b30233..6647eec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -45,7 +45,7 @@
 namespace JSC {
 
 namespace PolymorphicAccessInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 void AccessGenerationResult::dump(PrintStream& out) const
index db59de3..2e01ebc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -332,7 +332,7 @@ struct PropertyConditionHash {
     {
         return a == b;
     }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } // namespace JSC
index ee5e426..b929bc2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,78 +38,78 @@ namespace JSC {
 class Structure;
 
 typedef uint64_t SpeculatedType;
-static const SpeculatedType SpecNone                              = 0; // We don't know anything yet.
-static const SpeculatedType SpecFinalObject                       = 1ull << 0; // It's definitely a JSFinalObject.
-static const SpeculatedType SpecArray                             = 1ull << 1; // It's definitely a JSArray.
-static const SpeculatedType SpecFunctionWithDefaultHasInstance    = 1ull << 2; // It's definitely a JSFunction that has its ImplementsDefaultHasInstance type info flags bit set.
-static const SpeculatedType SpecFunctionWithNonDefaultHasInstance = 1ull << 3; // It's definitely a JSFunction that does not have its ImplementsDefaultHasInstance type info flags bit set.
-static const SpeculatedType SpecFunction                          = SpecFunctionWithDefaultHasInstance | SpecFunctionWithNonDefaultHasInstance; // It's definitely a JSFunction.
-static const SpeculatedType SpecInt8Array                         = 1ull << 4; // It's definitely an Int8Array or one of its subclasses.
-static const SpeculatedType SpecInt16Array                        = 1ull << 5; // It's definitely an Int16Array or one of its subclasses.
-static const SpeculatedType SpecInt32Array                        = 1ull << 6; // It's definitely an Int32Array or one of its subclasses.
-static const SpeculatedType SpecUint8Array                        = 1ull << 7; // It's definitely an Uint8Array or one of its subclasses.
-static const SpeculatedType SpecUint8ClampedArray                 = 1ull << 8; // It's definitely an Uint8ClampedArray or one of its subclasses.
-static const SpeculatedType SpecUint16Array                       = 1ull << 9; // It's definitely an Uint16Array or one of its subclasses.
-static const SpeculatedType SpecUint32Array                       = 1ull << 10; // It's definitely an Uint32Array or one of its subclasses.
-static const SpeculatedType SpecFloat32Array                      = 1ull << 11; // It's definitely an Uint16Array or one of its subclasses.
-static const SpeculatedType SpecFloat64Array                      = 1ull << 12; // It's definitely an Uint16Array or one of its subclasses.
-static const SpeculatedType SpecTypedArrayView                    = SpecInt8Array | SpecInt16Array | SpecInt32Array | SpecUint8Array | SpecUint8ClampedArray | SpecUint16Array | SpecUint32Array | SpecFloat32Array | SpecFloat64Array;
-static const SpeculatedType SpecDirectArguments                   = 1ull << 13; // It's definitely a DirectArguments object.
-static const SpeculatedType SpecScopedArguments                   = 1ull << 14; // It's definitely a ScopedArguments object.
-static const SpeculatedType SpecStringObject                      = 1ull << 15; // It's definitely a StringObject.
-static const SpeculatedType SpecRegExpObject                      = 1ull << 16; // It's definitely a RegExpObject (and not any subclass of RegExpObject).
-static const SpeculatedType SpecPromiseObject                     = 1ull << 17; // It's definitely a Promise object or one of its subclasses.
-static const SpeculatedType SpecMapObject                         = 1ull << 18; // It's definitely a Map object or one of its subclasses.
-static const SpeculatedType SpecSetObject                         = 1ull << 19; // It's definitely a Set object or one of its subclasses.
-static const SpeculatedType SpecWeakMapObject                     = 1ull << 20; // It's definitely a WeakMap object or one of its subclasses.
-static const SpeculatedType SpecWeakSetObject                     = 1ull << 21; // It's definitely a WeakSet object or one of its subclasses.
-static const SpeculatedType SpecProxyObject                       = 1ull << 22; // It's definitely a Proxy object or one of its subclasses.
-static const SpeculatedType SpecDerivedArray                      = 1ull << 23; // It's definitely a DerivedArray object.
-static const SpeculatedType SpecObjectOther                       = 1ull << 24; // It's definitely an object but not JSFinalObject, JSArray, or JSFunction.
-static const SpeculatedType SpecStringIdent                       = 1ull << 25; // It's definitely a JSString, and it's an identifier.
-static const SpeculatedType SpecStringVar                         = 1ull << 26; // It's definitely a JSString, and it's not an identifier.
-static const SpeculatedType SpecString                            = SpecStringIdent | SpecStringVar; // It's definitely a JSString.
-static const SpeculatedType SpecSymbol                            = 1ull << 27; // It's definitely a Symbol.
-static const SpeculatedType SpecCellOther                         = 1ull << 28; // It's definitely a JSCell but not a subclass of JSObject and definitely not a JSString, BigInt, or Symbol.
-static const SpeculatedType SpecBoolInt32                         = 1ull << 29; // It's definitely an Int32 with value 0 or 1.
-static const SpeculatedType SpecNonBoolInt32                      = 1ull << 30; // It's definitely an Int32 with value other than 0 or 1.
-static const SpeculatedType SpecInt32Only                         = SpecBoolInt32 | SpecNonBoolInt32; // It's definitely an Int32.
-
-static const SpeculatedType SpecInt32AsInt52                      = 1ull << 31; // It's an Int52 and it can fit in an int32.
-static const SpeculatedType SpecNonInt32AsInt52                   = 1ull << 32; // It's an Int52 and it can't fit in an int32.
-static const SpeculatedType SpecInt52Any                          = SpecInt32AsInt52 | SpecNonInt32AsInt52; // It's any kind of Int52.
-
-static const SpeculatedType SpecAnyIntAsDouble                    = 1ull << 33; // It's definitely an Int52 and it's inside a double.
-static const SpeculatedType SpecNonIntAsDouble                    = 1ull << 34; // It's definitely not an Int52 but it's a real number and it's a double.
-static const SpeculatedType SpecDoubleReal                        = SpecNonIntAsDouble | SpecAnyIntAsDouble; // It's definitely a non-NaN double.
-static const SpeculatedType SpecDoublePureNaN                     = 1ull << 35; // It's definitely a NaN that is safe to tag (i.e. pure).
-static const SpeculatedType SpecDoubleImpureNaN                   = 1ull << 36; // It's definitely a NaN that is unsafe to tag (i.e. impure).
-static const SpeculatedType SpecDoubleNaN                         = SpecDoublePureNaN | SpecDoubleImpureNaN; // It's definitely some kind of NaN.
-static const SpeculatedType SpecBytecodeDouble                    = SpecDoubleReal | SpecDoublePureNaN; // It's either a non-NaN or a NaN double, but it's definitely not impure NaN.
-static const SpeculatedType SpecFullDouble                        = SpecDoubleReal | SpecDoubleNaN; // It's either a non-NaN or a NaN double.
-static const SpeculatedType SpecBytecodeRealNumber                = SpecInt32Only | SpecDoubleReal; // It's either an Int32 or a DoubleReal.
-static const SpeculatedType SpecFullRealNumber                    = SpecInt32Only | SpecInt52Any | SpecDoubleReal; // It's either an Int32 or a DoubleReal, or an Int52.
-static const SpeculatedType SpecBytecodeNumber                    = SpecInt32Only | SpecBytecodeDouble; // It's either an Int32 or a Double, and the Double cannot be an impure NaN.
-static const SpeculatedType SpecIntAnyFormat                      = SpecInt52Any | SpecInt32Only | SpecAnyIntAsDouble;
-
-static const SpeculatedType SpecFullNumber                        = SpecIntAnyFormat | SpecFullDouble; // It's either an Int32, Int52, or a Double, and the Double can be impure NaN.
-static const SpeculatedType SpecBoolean                           = 1ull << 37; // It's definitely a Boolean.
-static const SpeculatedType SpecOther                             = 1ull << 38; // It's definitely either Null or Undefined.
-static const SpeculatedType SpecMisc                              = SpecBoolean | SpecOther; // It's definitely either a boolean, Null, or Undefined.
-static const SpeculatedType SpecEmpty                             = 1ull << 39; // It's definitely an empty value marker.
-static const SpeculatedType SpecBigInt                            = 1ull << 40; // It's definitely a BigInt.
-static const SpeculatedType SpecDataViewObject                    = 1ull << 41; // It's definitely a JSDataView.
-static const SpeculatedType SpecPrimitive                         = SpecString | SpecSymbol | SpecBytecodeNumber | SpecMisc | SpecBigInt; // It's any non-Object JSValue.
-static const SpeculatedType SpecObject                            = SpecFinalObject | SpecArray | SpecFunction | SpecTypedArrayView | SpecDirectArguments | SpecScopedArguments | SpecStringObject | SpecRegExpObject | SpecPromiseObject | SpecMapObject | SpecSetObject | SpecWeakMapObject | SpecWeakSetObject | SpecProxyObject | SpecDerivedArray | SpecObjectOther | SpecDataViewObject; // Bitmask used for testing for any kind of object prediction.
-static const SpeculatedType SpecCell                              = SpecObject | SpecString | SpecSymbol | SpecCellOther | SpecBigInt; // It's definitely a JSCell.
-static const SpeculatedType SpecHeapTop                           = SpecCell | SpecBytecodeNumber | SpecMisc; // It can be any of the above, except for SpecInt52Only and SpecDoubleImpureNaN.
-static const SpeculatedType SpecBytecodeTop                       = SpecHeapTop | SpecEmpty; // It can be any of the above, except for SpecInt52Only and SpecDoubleImpureNaN. Corresponds to what could be found in a bytecode local.
-static const SpeculatedType SpecFullTop                           = SpecBytecodeTop | SpecFullNumber; // It can be anything that bytecode could see plus exotic encodings of numbers.
+static constexpr SpeculatedType SpecNone                              = 0; // We don't know anything yet.
+static constexpr SpeculatedType SpecFinalObject                       = 1ull << 0; // It's definitely a JSFinalObject.
+static constexpr SpeculatedType SpecArray                             = 1ull << 1; // It's definitely a JSArray.
+static constexpr SpeculatedType SpecFunctionWithDefaultHasInstance    = 1ull << 2; // It's definitely a JSFunction that has its ImplementsDefaultHasInstance type info flags bit set.
+static constexpr SpeculatedType SpecFunctionWithNonDefaultHasInstance = 1ull << 3; // It's definitely a JSFunction that does not have its ImplementsDefaultHasInstance type info flags bit set.
+static constexpr SpeculatedType SpecFunction                          = SpecFunctionWithDefaultHasInstance | SpecFunctionWithNonDefaultHasInstance; // It's definitely a JSFunction.
+static constexpr SpeculatedType SpecInt8Array                         = 1ull << 4; // It's definitely an Int8Array or one of its subclasses.
+static constexpr SpeculatedType SpecInt16Array                        = 1ull << 5; // It's definitely an Int16Array or one of its subclasses.
+static constexpr SpeculatedType SpecInt32Array                        = 1ull << 6; // It's definitely an Int32Array or one of its subclasses.
+static constexpr SpeculatedType SpecUint8Array                        = 1ull << 7; // It's definitely an Uint8Array or one of its subclasses.
+static constexpr SpeculatedType SpecUint8ClampedArray                 = 1ull << 8; // It's definitely an Uint8ClampedArray or one of its subclasses.
+static constexpr SpeculatedType SpecUint16Array                       = 1ull << 9; // It's definitely an Uint16Array or one of its subclasses.
+static constexpr SpeculatedType SpecUint32Array                       = 1ull << 10; // It's definitely an Uint32Array or one of its subclasses.
+static constexpr SpeculatedType SpecFloat32Array                      = 1ull << 11; // It's definitely an Uint16Array or one of its subclasses.
+static constexpr SpeculatedType SpecFloat64Array                      = 1ull << 12; // It's definitely an Uint16Array or one of its subclasses.
+static constexpr SpeculatedType SpecTypedArrayView                    = SpecInt8Array | SpecInt16Array | SpecInt32Array | SpecUint8Array | SpecUint8ClampedArray | SpecUint16Array | SpecUint32Array | SpecFloat32Array | SpecFloat64Array;
+static constexpr SpeculatedType SpecDirectArguments                   = 1ull << 13; // It's definitely a DirectArguments object.
+static constexpr SpeculatedType SpecScopedArguments                   = 1ull << 14; // It's definitely a ScopedArguments object.
+static constexpr SpeculatedType SpecStringObject                      = 1ull << 15; // It's definitely a StringObject.
+static constexpr SpeculatedType SpecRegExpObject                      = 1ull << 16; // It's definitely a RegExpObject (and not any subclass of RegExpObject).
+static constexpr SpeculatedType SpecPromiseObject                     = 1ull << 17; // It's definitely a Promise object or one of its subclasses.
+static constexpr SpeculatedType SpecMapObject                         = 1ull << 18; // It's definitely a Map object or one of its subclasses.
+static constexpr SpeculatedType SpecSetObject                         = 1ull << 19; // It's definitely a Set object or one of its subclasses.
+static constexpr SpeculatedType SpecWeakMapObject                     = 1ull << 20; // It's definitely a WeakMap object or one of its subclasses.
+static constexpr SpeculatedType SpecWeakSetObject                     = 1ull << 21; // It's definitely a WeakSet object or one of its subclasses.
+static constexpr SpeculatedType SpecProxyObject                       = 1ull << 22; // It's definitely a Proxy object or one of its subclasses.
+static constexpr SpeculatedType SpecDerivedArray                      = 1ull << 23; // It's definitely a DerivedArray object.
+static constexpr SpeculatedType SpecObjectOther                       = 1ull << 24; // It's definitely an object but not JSFinalObject, JSArray, or JSFunction.
+static constexpr SpeculatedType SpecStringIdent                       = 1ull << 25; // It's definitely a JSString, and it's an identifier.
+static constexpr SpeculatedType SpecStringVar                         = 1ull << 26; // It's definitely a JSString, and it's not an identifier.
+static constexpr SpeculatedType SpecString                            = SpecStringIdent | SpecStringVar; // It's definitely a JSString.
+static constexpr SpeculatedType SpecSymbol                            = 1ull << 27; // It's definitely a Symbol.
+static constexpr SpeculatedType SpecCellOther                         = 1ull << 28; // It's definitely a JSCell but not a subclass of JSObject and definitely not a JSString, BigInt, or Symbol.
+static constexpr SpeculatedType SpecBoolInt32                         = 1ull << 29; // It's definitely an Int32 with value 0 or 1.
+static constexpr SpeculatedType SpecNonBoolInt32                      = 1ull << 30; // It's definitely an Int32 with value other than 0 or 1.
+static constexpr SpeculatedType SpecInt32Only                         = SpecBoolInt32 | SpecNonBoolInt32; // It's definitely an Int32.
+
+static constexpr SpeculatedType SpecInt32AsInt52                      = 1ull << 31; // It's an Int52 and it can fit in an int32.
+static constexpr SpeculatedType SpecNonInt32AsInt52                   = 1ull << 32; // It's an Int52 and it can't fit in an int32.
+static constexpr SpeculatedType SpecInt52Any                          = SpecInt32AsInt52 | SpecNonInt32AsInt52; // It's any kind of Int52.
+
+static constexpr SpeculatedType SpecAnyIntAsDouble                    = 1ull << 33; // It's definitely an Int52 and it's inside a double.
+static constexpr SpeculatedType SpecNonIntAsDouble                    = 1ull << 34; // It's definitely not an Int52 but it's a real number and it's a double.
+static constexpr SpeculatedType SpecDoubleReal                        = SpecNonIntAsDouble | SpecAnyIntAsDouble; // It's definitely a non-NaN double.
+static constexpr SpeculatedType SpecDoublePureNaN                     = 1ull << 35; // It's definitely a NaN that is safe to tag (i.e. pure).
+static constexpr SpeculatedType SpecDoubleImpureNaN                   = 1ull << 36; // It's definitely a NaN that is unsafe to tag (i.e. impure).
+static constexpr SpeculatedType SpecDoubleNaN                         = SpecDoublePureNaN | SpecDoubleImpureNaN; // It's definitely some kind of NaN.
+static constexpr SpeculatedType SpecBytecodeDouble                    = SpecDoubleReal | SpecDoublePureNaN; // It's either a non-NaN or a NaN double, but it's definitely not impure NaN.
+static constexpr SpeculatedType SpecFullDouble                        = SpecDoubleReal | SpecDoubleNaN; // It's either a non-NaN or a NaN double.
+static constexpr SpeculatedType SpecBytecodeRealNumber                = SpecInt32Only | SpecDoubleReal; // It's either an Int32 or a DoubleReal.
+static constexpr SpeculatedType SpecFullRealNumber                    = SpecInt32Only | SpecInt52Any | SpecDoubleReal; // It's either an Int32 or a DoubleReal, or an Int52.
+static constexpr SpeculatedType SpecBytecodeNumber                    = SpecInt32Only | SpecBytecodeDouble; // It's either an Int32 or a Double, and the Double cannot be an impure NaN.
+static constexpr SpeculatedType SpecIntAnyFormat                      = SpecInt52Any | SpecInt32Only | SpecAnyIntAsDouble;
+
+static constexpr SpeculatedType SpecFullNumber                        = SpecIntAnyFormat | SpecFullDouble; // It's either an Int32, Int52, or a Double, and the Double can be impure NaN.
+static constexpr SpeculatedType SpecBoolean                           = 1ull << 37; // It's definitely a Boolean.
+static constexpr SpeculatedType SpecOther                             = 1ull << 38; // It's definitely either Null or Undefined.
+static constexpr SpeculatedType SpecMisc                              = SpecBoolean | SpecOther; // It's definitely either a boolean, Null, or Undefined.
+static constexpr SpeculatedType SpecEmpty                             = 1ull << 39; // It's definitely an empty value marker.
+static constexpr SpeculatedType SpecBigInt                            = 1ull << 40; // It's definitely a BigInt.
+static constexpr SpeculatedType SpecDataViewObject                    = 1ull << 41; // It's definitely a JSDataView.
+static constexpr SpeculatedType SpecPrimitive                         = SpecString | SpecSymbol | SpecBytecodeNumber | SpecMisc | SpecBigInt; // It's any non-Object JSValue.
+static constexpr SpeculatedType SpecObject                            = SpecFinalObject | SpecArray | SpecFunction | SpecTypedArrayView | SpecDirectArguments | SpecScopedArguments | SpecStringObject | SpecRegExpObject | SpecPromiseObject | SpecMapObject | SpecSetObject | SpecWeakMapObject | SpecWeakSetObject | SpecProxyObject | SpecDerivedArray | SpecObjectOther | SpecDataViewObject; // Bitmask used for testing for any kind of object prediction.
+static constexpr SpeculatedType SpecCell                              = SpecObject | SpecString | SpecSymbol | SpecCellOther | SpecBigInt; // It's definitely a JSCell.
+static constexpr SpeculatedType SpecHeapTop                           = SpecCell | SpecBytecodeNumber | SpecMisc; // It can be any of the above, except for SpecInt52Only and SpecDoubleImpureNaN.
+static constexpr SpeculatedType SpecBytecodeTop                       = SpecHeapTop | SpecEmpty; // It can be any of the above, except for SpecInt52Only and SpecDoubleImpureNaN. Corresponds to what could be found in a bytecode local.
+static constexpr SpeculatedType SpecFullTop                           = SpecBytecodeTop | SpecFullNumber; // It can be anything that bytecode could see plus exotic encodings of numbers.
 
 // SpecCellCheck is the type set representing the values that can flow through a cell check.
 // On 64-bit platforms, the empty value passes a cell check. Also, ~SpecCellCheck is the type
 // set that representing the values that flow through when testing that something is not a cell.
-static const SpeculatedType SpecCellCheck          = is64Bit() ? (SpecCell | SpecEmpty) : SpecCell;
+static constexpr SpeculatedType SpecCellCheck          = is64Bit() ? (SpecCell | SpecEmpty) : SpecCell;
 
 typedef bool (*SpeculatedTypeChecker)(SpeculatedType);
 
index eab7a90..58264b1 100644 (file)
@@ -36,7 +36,7 @@ namespace JSC {
 #if ENABLE(JIT)
 
 namespace StructureStubInfoInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 StructureStubInfo::StructureStubInfo(AccessType accessType)
index 1163161..b2716bf 100644 (file)
@@ -271,7 +271,7 @@ void UnlinkedCodeBlock::addExpressionInfo(unsigned instructionOffset,
 
 bool UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset(unsigned bytecodeOffset, unsigned& startDivot, unsigned& endDivot)
 {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
     if (!m_rareData) {
         if (verbose)
             dataLogF("Don't have assignment info for offset:%u\n", bytecodeOffset);
index 5da9a2f..0002c3e 100644 (file)
@@ -109,9 +109,9 @@ struct UnlinkedSimpleJumpTable {
 class UnlinkedCodeBlock : public JSCell {
 public:
     typedef JSCell Base;
-    static const unsigned StructureFlags = Base::StructureFlags;
+    static constexpr unsigned StructureFlags = Base::StructureFlags;
 
-    static const bool needsDestruction = true;
+    static constexpr bool needsDestruction = true;
 
     enum { CallFunction, ApplyFunction };
 
index ec6f5a9..6740c3d 100644 (file)
@@ -34,7 +34,7 @@ class CachedEvalCodeBlock;
 class UnlinkedEvalCodeBlock final : public UnlinkedGlobalCodeBlock {
 public:
     typedef UnlinkedGlobalCodeBlock Base;
-    static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
+    static constexpr unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
 
     static UnlinkedEvalCodeBlock* create(VM& vm, const ExecutableInfo& info, OptionSet<CodeGenerationMode> codeGenerationMode)
     {
index bd3bd9e..f47d47b 100644 (file)
@@ -34,7 +34,7 @@ class CachedFunctionCodeBlock;
 class UnlinkedFunctionCodeBlock final : public UnlinkedCodeBlock {
 public:
     typedef UnlinkedCodeBlock Base;
-    static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
+    static constexpr unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
 
     static UnlinkedFunctionCodeBlock* create(VM& vm, CodeType codeType, const ExecutableInfo& info, OptionSet<CodeGenerationMode> codeGenerationMode)
     {
index 355d98e..0678053 100644 (file)
@@ -61,7 +61,7 @@ public:
     friend class CachedFunctionExecutable;
 
     typedef JSCell Base;
-    static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
+    static constexpr unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
 
     template<typename CellType, SubspaceAccess>
     static IsoSubspace* subspaceFor(VM& vm)
@@ -142,7 +142,7 @@ public:
     CodeFeatures features() const { return m_features; }
     bool hasCapturedVariables() const { return m_hasCapturedVariables; }
 
-    static const bool needsDestruction = true;
+    static constexpr bool needsDestruction = true;
     static void destroy(JSCell*);
 
     bool isBuiltinFunction() const { return m_isBuiltinFunction; }
index 08e40f0..025d2c4 100644 (file)
@@ -35,7 +35,7 @@ class CachedModuleCodeBlock;
 class UnlinkedModuleProgramCodeBlock final : public UnlinkedGlobalCodeBlock {
 public:
     typedef UnlinkedGlobalCodeBlock Base;
-    static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
+    static constexpr unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
 
     static UnlinkedModuleProgramCodeBlock* create(VM& vm, const ExecutableInfo& info, OptionSet<CodeGenerationMode> codeGenerationMode)
     {
index 224dcfc..f4e6add 100644 (file)
@@ -34,7 +34,7 @@ class CachedProgramCodeBlock;
 class UnlinkedProgramCodeBlock final : public UnlinkedGlobalCodeBlock {
 public:
     typedef UnlinkedGlobalCodeBlock Base;
-    static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
+    static constexpr unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
 
     static UnlinkedProgramCodeBlock* create(VM& vm, const ExecutableInfo& info, OptionSet<CodeGenerationMode> codeGenerationMode)
     {
index 07335a3..05b09be 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,10 +38,10 @@ namespace JSC {
 
 template<unsigned numberOfBucketsArgument>
 struct ValueProfileBase {
-    static const unsigned numberOfBuckets = numberOfBucketsArgument;
-    static const unsigned numberOfSpecFailBuckets = 1;
-    static const unsigned bucketIndexMask = numberOfBuckets - 1;
-    static const unsigned totalNumberOfBuckets = numberOfBuckets + numberOfSpecFailBuckets;
+    static constexpr unsigned numberOfBuckets = numberOfBucketsArgument;
+    static constexpr unsigned numberOfSpecFailBuckets = 1;
+    static constexpr unsigned bucketIndexMask = numberOfBuckets - 1;
+    static constexpr unsigned totalNumberOfBuckets = numberOfBuckets + numberOfSpecFailBuckets;
     
     ValueProfileBase()
     {
@@ -146,7 +146,7 @@ struct MinimalValueProfile : public ValueProfileBase<0> {
 
 template<unsigned logNumberOfBucketsArgument>
 struct ValueProfileWithLogNumberOfBuckets : public ValueProfileBase<1 << logNumberOfBucketsArgument> {
-    static const unsigned logNumberOfBuckets = logNumberOfBucketsArgument;
+    static constexpr unsigned logNumberOfBuckets = logNumberOfBucketsArgument;
     
     ValueProfileWithLogNumberOfBuckets()
         : ValueProfileBase<1 << logNumberOfBucketsArgument>()
index 16aa683..d95ed31 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2015-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -105,8 +105,8 @@ public:
     void dump(PrintStream& out) const;
 
 private:
-    static const int s_invalidVirtualRegister = 0x3fffffff;
-    static const int s_firstConstantRegisterIndex = FirstConstantRegisterIndex;
+    static constexpr int s_invalidVirtualRegister = 0x3fffffff;
+    static constexpr int s_firstConstantRegisterIndex = FirstConstantRegisterIndex;
 
     static int localToOperand(int local) { return -1 - local; }
     static int operandToLocal(int operand) { return -1 - operand; }
index 7bebc04..a4cd604 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -475,9 +475,9 @@ public:
     }
     
 private:
-    static const uintptr_t IsThinFlag        = 1;
-    static const uintptr_t StateMask         = 6;
-    static const uintptr_t StateShift        = 1;
+    static constexpr uintptr_t IsThinFlag        = 1;
+    static constexpr uintptr_t StateMask         = 6;
+    static constexpr uintptr_t StateShift        = 1;
     
     static bool isThin(uintptr_t data) { return data & IsThinFlag; }
     static bool isFat(uintptr_t data) { return !isThin(data); }
index 94eeb13..4f36a73 100644 (file)
@@ -897,8 +897,8 @@ namespace JSC {
         void emitOutOfLineFinallyHandler(RegisterID* exceptionRegister, RegisterID* completionTypeRegister, TryData*);
 
     private:
-        static const int CurrentLexicalScopeIndex = -2;
-        static const int OutermostLexicalScopeIndex = -1;
+        static constexpr int CurrentLexicalScopeIndex = -2;
+        static constexpr int OutermostLexicalScopeIndex = -1;
 
         int currentLexicalScopeIndex() const
         {
index cef487d..736768e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -133,7 +133,7 @@ namespace JSC {
 
         typedef Vector<int, 8> JumpVector;
 
-        static const unsigned invalidLocation = UINT_MAX;
+        static constexpr unsigned invalidLocation = UINT_MAX;
 
         int m_refCount { 0 };
         unsigned m_location { invalidLocation };
index 48909ef..2c65f50 100644 (file)
@@ -165,7 +165,7 @@ RegisterID* ThisNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst
         return 0;
 
     RegisterID* result = generator.move(dst, generator.thisRegister());
-    static const unsigned thisLength = 4;
+    static constexpr unsigned thisLength = 4;
     generator.emitProfileType(generator.thisRegister(), position(), JSTextPosition(-1, position().offset + thisLength, -1));
     return result;
 }
index d9adffc..35620a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -129,8 +129,8 @@ namespace JSC {
 namespace WTF {
 
     template<> struct VectorTraits<JSC::RegisterID> : VectorTraitsBase<true, JSC::RegisterID> {
-        static const bool needsInitialization = true;
-        static const bool canInitializeWithMemset = true; // Default initialization just sets everything to 0 or false, so this is safe.
+        static constexpr bool needsInitialization = true;
+        static constexpr bool canInitializeWithMemset = true; // Default initialization just sets everything to 0 or false, so this is safe.
     };
 
 } // namespace WTF
index e7dafa3..bb8f0dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -57,7 +57,7 @@ struct Breakpoint : public DoublyLinkedListNode<Breakpoint> {
     unsigned hitCount { 0 };
     bool resolved { false };
 
-    static const unsigned unspecifiedColumn = UINT_MAX;
+    static constexpr unsigned unspecifiedColumn = UINT_MAX;
 
 private:
     Breakpoint* m_prev;
index 60cd144..9c335a4 100644 (file)
@@ -133,16 +133,16 @@ template <DebuggerParseInfoTag T> struct DebuggerParseInfo { };
 
 template <> struct DebuggerParseInfo<Program> {
     typedef JSC::ProgramNode RootNode;
-    static const SourceParseMode parseMode = SourceParseMode::ProgramMode;
-    static const JSParserStrictMode strictMode = JSParserStrictMode::NotStrict;
-    static const JSParserScriptMode scriptMode = JSParserScriptMode::Classic;
+    static constexpr SourceParseMode parseMode = SourceParseMode::ProgramMode;
+    static constexpr JSParserStrictMode strictMode = JSParserStrictMode::NotStrict;
+    static constexpr JSParserScriptMode scriptMode = JSParserScriptMode::Classic;
 };
 
 template <> struct DebuggerParseInfo<Module> {
     typedef JSC::ModuleProgramNode RootNode;
-    static const SourceParseMode parseMode = SourceParseMode::ModuleEvaluateMode;
-    static const JSParserStrictMode strictMode = JSParserStrictMode::Strict;
-    static const JSParserScriptMode scriptMode = JSParserScriptMode::Module;
+    static constexpr SourceParseMode parseMode = SourceParseMode::ModuleEvaluateMode;
+    static constexpr JSParserStrictMode strictMode = JSParserStrictMode::Strict;
+    static constexpr JSParserScriptMode scriptMode = JSParserScriptMode::Module;
 };
 
 template <DebuggerParseInfoTag T>
index 959f8bd..5fb6e8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,9 +30,9 @@
 namespace JSC {
 
 typedef size_t SourceID;
-static const SourceID noSourceID = 0;
+static constexpr SourceID noSourceID = 0;
 
 typedef size_t BreakpointID;
-static const BreakpointID noBreakpointID = 0;
+static constexpr BreakpointID noBreakpointID = 0;
 
 } // namespace JSC
index c92d3d0..c76f3ec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2009, 2014, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -36,7 +36,7 @@ class JSScope;
 class DebuggerScope final : public JSNonFinalObject {
 public:
     typedef JSNonFinalObject Base;
-    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames;
+    static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames;
 
     JS_EXPORT_PRIVATE static DebuggerScope* create(VM& vm, JSScope* scope);
 
index 881d99f..bcc1998 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -304,8 +304,8 @@ public:
     void dump(PrintStream& out) const;
     
 private:
-    static const unsigned valueShift = 15;
-    static const unsigned topShift = 14;
+    static constexpr unsigned valueShift = 15;
+    static constexpr unsigned topShift = 14;
     
     Payload payloadImpl() const
     {
@@ -329,7 +329,7 @@ private:
 struct AbstractHeapHash {
     static unsigned hash(const AbstractHeap& key) { return key.hash(); }
     static bool equal(const AbstractHeap& a, const AbstractHeap& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::DFG
index 2ef3112..edc194b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -567,12 +567,12 @@ private:
 namespace WTF {
 template <>
 struct VectorTraits<JSC::DFG::AbstractValue> : VectorTraitsBase<false, JSC::DFG::AbstractValue> {
-    static const bool canInitializeWithMemset = true;
+    static constexpr bool canInitializeWithMemset = true;
 };
 
 template <>
 struct HashTraits<JSC::DFG::AbstractValue> : GenericHashTraits<JSC::DFG::AbstractValue> {
-    static const bool emptyValueIsZero = true;
+    static constexpr bool emptyValueIsZero = true;
 };
 };
 #endif // USE(JSVALUE64)
index 36b1e45..ef65a5f 100644 (file)
@@ -52,7 +52,7 @@ namespace JSC { namespace DFG {
 namespace {
 
 namespace DFGArgumentsEliminationPhaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 class ArgumentsEliminationPhase : public Phase {
index c0a3f76..b17cdf8 100644 (file)
@@ -80,9 +80,9 @@ namespace JSC { namespace DFG {
 
 namespace DFGByteCodeParserInternal {
 #ifdef NDEBUG
-static const bool verbose = false;
+static constexpr bool verbose = false;
 #else
-static const bool verbose = true;
+static constexpr bool verbose = true;
 #endif
 } // namespace DFGByteCodeParserInternal
 
index 9d9ae31..33b4751 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -48,7 +48,7 @@ namespace JSC { namespace DFG {
 namespace {
 
 namespace DFGCSEPhaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 class ImpureDataSlot {
@@ -353,7 +353,7 @@ private:
         // the overhead of HashMaps can be quite high currently: clearing them, or even removing
         // enough things from them, deletes (or resizes) their backing store eagerly. Hence
         // HashMaps induce a lot of malloc traffic.
-        static const unsigned capacity = 100;
+        static constexpr unsigned capacity = 100;
     
         SmallMaps()
             : m_pureLength(0)
index 5996b76..f272670 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,7 +38,7 @@ namespace JSC { namespace DFG {
 struct Node;
 
 typedef uint32_t BlockIndex;
-static const BlockIndex NoBlock = UINT_MAX;
+static constexpr BlockIndex NoBlock = UINT_MAX;
 
 // Use RefChildren if the child ref counts haven't already been adjusted using
 // other means and either of the following is true:
index 1fc4c0b..fd4085b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -89,7 +89,7 @@ private:
 struct CompilationKeyHash {
     static unsigned hash(const CompilationKey& key) { return key.hash(); }
     static bool equal(const CompilationKey& a, const CompilationKey& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::DFG
index b629a17..a639333 100644 (file)
@@ -94,7 +94,7 @@ private:
 struct DesiredGlobalPropertyHash {
     static unsigned hash(const DesiredGlobalProperty& key) { return key.hash(); }
     static bool equal(const DesiredGlobalProperty& a, const DesiredGlobalProperty& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::DFG
index 85f037d..20e67bf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -32,7 +32,7 @@
 namespace JSC { namespace DFG {
 
 class EdgeDominates {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
     
 public:
     EdgeDominates(Graph& graph, BasicBlock* block)
index aab4906..f809031 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -109,8 +109,8 @@ public:
     void dump(PrintStream&) const;
     
 private:
-    static const unsigned s_none = 0;
-    static const unsigned s_first = 1;
+    static constexpr unsigned s_none = 0;
+    static constexpr unsigned s_first = 1;
     
     unsigned m_epoch;
 };
index b660913..c37510c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -102,8 +102,8 @@ void forAllKilledNodesAtNodeIndex(
     Graph& graph, AvailabilityMap& availabilityMap, BasicBlock* block, unsigned nodeIndex,
     const Functor& functor)
 {
-    static const unsigned seenInClosureFlag = 1;
-    static const unsigned calledFunctorFlag = 2;
+    static constexpr unsigned seenInClosureFlag = 1;
+    static constexpr unsigned calledFunctorFlag = 2;
     HashMap<Node*, unsigned> flags;
     
     Node* node = block->at(nodeIndex);
index 2b531b2..ab8ab42 100644 (file)
@@ -1133,7 +1133,7 @@ BytecodeKills& Graph::killsFor(InlineCallFrame* inlineCallFrame)
 
 bool Graph::isLiveInBytecode(VirtualRegister operand, CodeOrigin codeOrigin)
 {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
     
     if (verbose)
         dataLog("Checking of operand is live: ", operand, "\n");
index e696c1e..0910064 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -149,7 +149,7 @@ private:
 struct HeapLocationHash {
     static unsigned hash(const HeapLocation& key) { return key.hash(); }
     static bool equal(const HeapLocation& a, const HeapLocation& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 LocationKind indexedPropertyLocForResultType(NodeFlags);
@@ -190,7 +190,7 @@ template<> struct DefaultHash<JSC::DFG::HeapLocation> {
 
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::DFG::HeapLocation> : SimpleClassHashTraits<JSC::DFG::HeapLocation> {
-    static const bool emptyValueIsZero = false;
+    static constexpr bool emptyValueIsZero = false;
 };
 
 } // namespace WTF
index d8fba2e..9a4a4b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -39,7 +39,7 @@
 namespace JSC { namespace DFG {
 
 namespace DFGInPlaceAbstractStateInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 InPlaceAbstractState::InPlaceAbstractState(Graph& graph)
index 5f7f8f1..9018fa9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@
 namespace JSC { namespace DFG {
 
 namespace DFGIntegerCheckCombiningPhaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 class IntegerCheckCombiningPhase : public Phase {
index 81181eb..46a7f61 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,7 +43,7 @@ namespace JSC { namespace DFG {
 namespace {
 
 namespace DFGIntegerRangeOptimizationPhaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 const unsigned giveUpThreshold = 50;
 
@@ -97,8 +97,8 @@ public:
         return 0;
     }
 
-    static const unsigned minVagueness = 0;
-    static const unsigned maxVagueness = 2;
+    static constexpr unsigned minVagueness = 0;
+    static constexpr unsigned maxVagueness = 2;
     
     static Kind flipped(Kind kind)
     {
index e9fbd35..4151907 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,7 +38,7 @@
 namespace JSC { namespace DFG {
 
 class InvalidationPointInjectionPhase : public Phase {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
     
 public:
     InvalidationPointInjectionPhase(Graph& graph)
index 465f472..139a64d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -46,7 +46,7 @@
 namespace JSC { namespace DFG {
 
 class LICMPhase : public Phase {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
 
     using NaturalLoop = SSANaturalLoop;
 
index 1d8fa7a..b3fff96 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -35,12 +35,12 @@ namespace JSC { namespace DFG {
 
 class LazyNode {
 public:
-    static const size_t jsConstantTag = 0;
-    static const size_t doubleConstantTag = 1;
-    static const size_t int52ConstantTag = 2;
+    static constexpr size_t jsConstantTag = 0;
+    static constexpr size_t doubleConstantTag = 1;
+    static constexpr size_t int52ConstantTag = 2;
 
-    static const uintptr_t tagMask = 0x3;
-    static const uintptr_t pointerMask = ~tagMask;
+    static constexpr uintptr_t tagMask = 0x3;
+    static constexpr uintptr_t pointerMask = ~tagMask;
 
     explicit LazyNode(Node* node = nullptr)
         : m_node(node)
@@ -177,7 +177,7 @@ namespace WTF {
 
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::DFG::LazyNode> : SimpleClassHashTraits<JSC::DFG::LazyNode> {
-    static const bool emptyValueIsZero = true;
+    static constexpr bool emptyValueIsZero = true;
 };
 
 } // namespace WTF
index f3250e7..cb71f1b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -79,7 +79,7 @@ private:
 struct MinifiedIDHash {
     static unsigned hash(const MinifiedID& key) { return key.hash(); }
     static bool equal(const MinifiedID& a, const MinifiedID& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::DFG
@@ -93,7 +93,7 @@ template<> struct DefaultHash<JSC::DFG::MinifiedID> {
 
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::DFG::MinifiedID> : SimpleClassHashTraits<JSC::DFG::MinifiedID> {
-    static const bool emptyValueIsZero = false;
+    static constexpr bool emptyValueIsZero = false;
 };
 
 } // namespace WTF
index 1aed2c1..73a3d75 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,7 +43,7 @@ namespace JSC { namespace DFG {
 namespace {
 
 namespace DFGMovHintRemovalPhaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 class MovHintRemovalPhase : public Phase {
index 21722b2..828e31b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -126,7 +126,7 @@ public:
     }
     
 public:
-    static const uintptr_t shadowBit = 1;
+    static constexpr uintptr_t shadowBit = 1;
     
     uintptr_t m_word { 0 };
 };
@@ -134,7 +134,7 @@ public:
 struct NodeFlowProjectionHash {
     static unsigned hash(NodeFlowProjection key) { return key.hash(); }
     static bool equal(NodeFlowProjection a, NodeFlowProjection b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::DFG
index 685628b..2618520 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -554,7 +554,7 @@ inline bool isAtomicsIntrinsic(NodeType op)
     }
 }
 
-static const unsigned maxNumExtraAtomicsArgs = 2;
+static constexpr unsigned maxNumExtraAtomicsArgs = 2;
 
 inline unsigned numExtraAtomicsArgs(NodeType op)
 {
index efd761a..de0ec63 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -48,7 +48,7 @@ namespace JSC { namespace DFG {
 namespace {
 
 namespace DFGObjectAllocationSinkingPhaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 // In order to sink object cycles, we use a points-to analysis coupled
index 96fa23d..92fb069 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ namespace JSC { namespace DFG {
 namespace {
 
 namespace DFGPhantomInsertionPhaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 class PhantomInsertionPhase : public Phase {
index 8917b95..07e6d89 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -138,7 +138,7 @@ private:
 struct PromotedLocationDescriptorHash {
     static unsigned hash(const PromotedLocationDescriptor& key) { return key.hash(); }
     static bool equal(const PromotedLocationDescriptor& a, const PromotedLocationDescriptor& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 class PromotedHeapLocation {
@@ -204,7 +204,7 @@ private:
 struct PromotedHeapLocationHash {
     static unsigned hash(const PromotedHeapLocation& key) { return key.hash(); }
     static bool equal(const PromotedHeapLocation& a, const PromotedHeapLocation& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::DFG
@@ -220,7 +220,7 @@ template<> struct DefaultHash<JSC::DFG::PromotedHeapLocation> {
 
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::DFG::PromotedHeapLocation> : SimpleClassHashTraits<JSC::DFG::PromotedHeapLocation> {
-    static const bool emptyValueIsZero = false;
+    static constexpr bool emptyValueIsZero = false;
 };
 
 template<typename T> struct DefaultHash;
@@ -230,7 +230,7 @@ template<> struct DefaultHash<JSC::DFG::PromotedLocationDescriptor> {
 
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::DFG::PromotedLocationDescriptor> : SimpleClassHashTraits<JSC::DFG::PromotedLocationDescriptor> {
-    static const bool emptyValueIsZero = false;
+    static constexpr bool emptyValueIsZero = false;
 };
 
 } // namespace WTF
index c2adc8e..1b79424 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -103,7 +103,7 @@ private:
 struct PropertyTypeKeyHash {
     static unsigned hash(const PropertyTypeKey& key) { return key.hash(); }
     static bool equal(const PropertyTypeKey& a, const PropertyTypeKey& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::DFG
@@ -117,7 +117,7 @@ template<> struct DefaultHash<JSC::DFG::PropertyTypeKey> {
 
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::DFG::PropertyTypeKey> : SimpleClassHashTraits<JSC::DFG::PropertyTypeKey> {
-    static const bool emptyValueIsZero = false;
+    static constexpr bool emptyValueIsZero = false;
 };
 
 } // namespace WTF
index 0a2171c..b5eebd7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -145,7 +145,7 @@ private:
 struct PureValueHash {
     static unsigned hash(const PureValue& key) { return key.hash(); }
     static bool equal(const PureValue& a, const PureValue& b) { return a == b; }
-    static const bool safeToCompareToEmptyOrDeleted = true;
+    static constexpr bool safeToCompareToEmptyOrDeleted = true;
 };
 
 } } // namespace JSC::DFG
@@ -159,7 +159,7 @@ template<> struct DefaultHash<JSC::DFG::PureValue> {
 
 template<typename T> struct HashTraits;
 template<> struct HashTraits<JSC::DFG::PureValue> : SimpleClassHashTraits<JSC::DFG::PureValue> {
-    static const bool emptyValueIsZero = false;
+    static constexpr bool emptyValueIsZero = false;
 };
 
 } // namespace WTF
index a59e7f1..8727760 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,7 +43,7 @@ namespace JSC { namespace DFG {
 namespace {
 
 namespace DFGPutStackSinkingPhaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 class PutStackSinkingPhase : public Phase {
index e04f3ca..be7a97d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -69,10 +69,10 @@ namespace JSC { namespace DFG {
 template<class BankInfo>
 class RegisterBank {
     typedef typename BankInfo::RegisterType RegID;
-    static const size_t NUM_REGS = BankInfo::numberOfRegisters;
+    static constexpr size_t NUM_REGS = BankInfo::numberOfRegisters;
 
     typedef uint32_t SpillHint;
-    static const SpillHint SpillHintInvalid = 0xffffffff;
+    static constexpr SpillHint SpillHintInvalid = 0xffffffff;
 
 public:
     RegisterBank()
index 534d64b..ce0faa2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -48,7 +48,7 @@
 namespace JSC { namespace DFG {
 
 class SSAConversionPhase : public Phase {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
     
 public:
     SSAConversionPhase(Graph& graph)
index d1fe996..8f50e68 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -37,7 +37,7 @@
 namespace JSC { namespace DFG {
 
 class SSALoweringPhase : public Phase {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
     
 public:
     SSALoweringPhase(Graph& graph)
index 567ad94..9b4246f 100644 (file)
@@ -2630,7 +2630,7 @@ void SpeculativeJIT::compileDoubleRep(Node* node)
             JITCompiler::Jump isNumber = m_jit.branchIfNumber(op1GPR);
             JITCompiler::Jump isUndefined = m_jit.branchIfUndefined(op1GPR);
 
-            static const double zero = 0;
+            static constexpr double zero = 0;
             m_jit.loadDouble(TrustedImmPtr(&zero), resultFPR);
 
             JITCompiler::Jump isNull = m_jit.branchIfNull(op1GPR);
@@ -2640,7 +2640,7 @@ void SpeculativeJIT::compileDoubleRep(Node* node)
                 m_jit.branchTest64(JITCompiler::Zero, op1GPR, TrustedImm32(static_cast<int32_t>(TagBitBool))));
 
             JITCompiler::Jump isFalse = m_jit.branch64(JITCompiler::Equal, op1GPR, TrustedImm64(ValueFalse));
-            static const double one = 1;
+            static constexpr double one = 1;
             m_jit.loadDouble(TrustedImmPtr(&one), resultFPR);
             done.append(m_jit.jump());
             done.append(isFalse);
@@ -2678,7 +2678,7 @@ void SpeculativeJIT::compileDoubleRep(Node* node)
             JITCompiler::Jump isNumber = m_jit.branch32(JITCompiler::Below, op1TagGPR, JITCompiler::TrustedImm32(JSValue::LowestTag + 1));
             JITCompiler::Jump isUndefined = m_jit.branchIfUndefined(op1TagGPR);
 
-            static const double zero = 0;
+            static constexpr double zero = 0;
             m_jit.loadDouble(TrustedImmPtr(&zero), resultFPR);
 
             JITCompiler::Jump isNull = m_jit.branchIfNull(op1TagGPR);
@@ -2687,7 +2687,7 @@ void SpeculativeJIT::compileDoubleRep(Node* node)
             DFG_TYPE_CHECK(JSValueRegs(op1TagGPR, op1PayloadGPR), node->child1(), ~SpecCell, m_jit.branchIfNotBoolean(op1TagGPR, InvalidGPRReg));
 
             JITCompiler::Jump isFalse = m_jit.branchTest32(JITCompiler::Zero, op1PayloadGPR, TrustedImm32(1));
-            static const double one = 1;
+            static constexpr double one = 1;
             m_jit.loadDouble(TrustedImmPtr(&one), resultFPR);
             done.append(m_jit.jump());
             done.append(isFalse);
@@ -2807,9 +2807,9 @@ static void compileClampIntegerToByte(JITCompiler& jit, GPRReg result)
 static void compileClampDoubleToByte(JITCompiler& jit, GPRReg result, FPRReg source, FPRReg scratch)
 {
     // Unordered compare so we pick up NaN
-    static const double zero = 0;
-    static const double byteMax = 255;
-    static const double half = 0.5;
+    static constexpr double zero = 0;
+    static constexpr double byteMax = 255;
+    static constexpr double half = 0.5;
     jit.loadDouble(JITCompiler::TrustedImmPtr(&zero), scratch);
     MacroAssembler::Jump tooSmall = jit.branchDouble(MacroAssembler::DoubleLessThanOrEqualOrUnordered, source, scratch);
     jit.loadDouble(JITCompiler::TrustedImmPtr(&byteMax), scratch);
@@ -5598,7 +5598,7 @@ void SpeculativeJIT::compileArithRounding(Node* node)
                 FPRTemporary result(this);
                 FPRReg resultFPR = result.fpr();
                 if (producesInteger(node->arithRoundingMode()) && !shouldCheckNegativeZero(node->arithRoundingMode())) {
-                    static const double halfConstant = 0.5;
+                    static constexpr double halfConstant = 0.5;
                     m_jit.loadDouble(TrustedImmPtr(&halfConstant), resultFPR);
                     m_jit.addDouble(valueFPR, resultFPR);
                     m_jit.floorDouble(resultFPR, resultFPR);
@@ -5607,12 +5607,12 @@ void SpeculativeJIT::compileArithRounding(Node* node)
 
                     FPRTemporary scratch(this);
                     FPRReg scratchFPR = scratch.fpr();
-                    static const double halfConstant = -0.5;
+                    static constexpr double halfConstant = -0.5;
                     m_jit.loadDouble(TrustedImmPtr(&halfConstant), scratchFPR);
                     m_jit.addDouble(resultFPR, scratchFPR);
 
                     JITCompiler::Jump shouldUseCeiled = m_jit.branchDouble(JITCompiler::DoubleLessThanOrEqual, scratchFPR, valueFPR);
-                    static const double oneConstant = -1.0;
+                    static constexpr double oneConstant = -1.0;
                     m_jit.loadDouble(TrustedImmPtr(&oneConstant), scratchFPR);
                     m_jit.addDouble(scratchFPR, resultFPR);
                     shouldUseCeiled.link(&m_jit);
@@ -5802,7 +5802,7 @@ static MacroAssembler::Jump compileArithPowIntegerFastPath(JITCompiler& assemble
     MacroAssembler::JumpList skipFastPath;
     skipFastPath.append(assembler.branch32(MacroAssembler::Above, yOperand, MacroAssembler::TrustedImm32(maxExponentForIntegerMathPow)));
 
-    static const double oneConstant = 1.0;
+    static constexpr double oneConstant = 1.0;
     assembler.loadDouble(MacroAssembler::TrustedImmPtr(&oneConstant), result);
 
     MacroAssembler::Label startLoop(assembler.label());
@@ -5893,8 +5893,8 @@ void SpeculativeJIT::compileArithPow(Node* node)
 
     if (node->child2()->isDoubleConstant()) {
         double exponent = node->child2()->asNumber();
-        static const double infinityConstant = std::numeric_limits<double>::infinity();
-        static const double minusInfinityConstant = -std::numeric_limits<double>::infinity();
+        static constexpr double infinityConstant = std::numeric_limits<double>::infinity();
+        static constexpr double minusInfinityConstant = -std::numeric_limits<double>::infinity();
         if (exponent == 0.5) {
             SpeculateDoubleOperand xOperand(this, node->child1());
             FPRTemporary result(this);
@@ -5934,7 +5934,7 @@ void SpeculativeJIT::compileArithPow(Node* node)
             m_jit.loadDouble(TrustedImmPtr(&minusInfinityConstant), resultFpr);
             MacroAssembler::Jump xIsMinusInfinity = m_jit.branchDouble(MacroAssembler::DoubleEqual, xOperandFpr, resultFpr);
 
-            static const double oneConstant = 1.;
+            static constexpr double oneConstant = 1.;
             m_jit.loadDouble(TrustedImmPtr(&oneConstant), resultFpr);
             m_jit.sqrtDouble(xOperandFpr, scratchFPR);
             m_jit.divDouble(resultFpr, scratchFPR, resultFpr);
@@ -10785,7 +10785,7 @@ void SpeculativeJIT::emitBinarySwitchStringRecurse(
     unsigned numChecked, unsigned begin, unsigned end, GPRReg buffer, GPRReg length,
     GPRReg temp, unsigned alreadyCheckedLength, bool checkedExactLength)
 {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
     
     if (verbose) {
         dataLog("We're down to the following cases, alreadyCheckedLength = ", alreadyCheckedLength, ":\n");
index e864d45..beec86a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -36,7 +36,7 @@
 namespace JSC { namespace DFG {
 
 class StackLayoutPhase : public Phase {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
     
 public:
     StackLayoutPhase(Graph& graph)
index 24b55e7..5d20c9e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ namespace JSC { namespace DFG {
 namespace {
 
 namespace DFGStoreBarrierInsertionPhaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 enum class PhaseMode {
index 3d9e805..3c0c596 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -45,7 +45,7 @@
 namespace JSC { namespace DFG {
 
 class StrengthReductionPhase : public Phase {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
     
 public:
     StrengthReductionPhase(Graph& graph)
index e885991..9107a8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -251,10 +251,10 @@ public:
     void validateReferences(const TrackedReferences&) const;
     
 private:
-    static const uintptr_t clobberedFlag = RegisteredStructureSet::reservedFlag;
-    static const uintptr_t topValue = RegisteredStructureSet::reservedValue;
-    static const unsigned polymorphismLimit = 10;
-    static const unsigned clobberedSupremacyThreshold = 2;
+    static constexpr uintptr_t clobberedFlag = RegisteredStructureSet::reservedFlag;
+    static constexpr uintptr_t topValue = RegisteredStructureSet::reservedValue;
+    static constexpr unsigned polymorphismLimit = 10;
+    static constexpr unsigned clobberedSupremacyThreshold = 2;
     
     void filterSlow(SpeculatedType type);
     void filterClassInfoSlow(const ClassInfo*);
index 3a37367..2762d99 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -42,7 +42,7 @@ namespace JSC { namespace DFG {
 namespace {
 
 namespace DFGVarargsForwardingPhaseInternal {
-static const bool verbose = false;
+static constexpr bool verbose = false;
 }
 
 class VarargsForwardingPhase : public Phase {
index 6f8af42..4526d39 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -123,7 +123,7 @@ unsigned VariableEventStream::reconstruct(
     CodeBlock* baselineCodeBlock = codeBlock->baselineVersion();
 
     unsigned numVariables;
-    static const unsigned invalidIndex = std::numeric_limits<unsigned>::max();
+    static constexpr unsigned invalidIndex = std::numeric_limits<unsigned>::max();
     unsigned firstUndefined = invalidIndex;
     bool firstUndefinedIsArgument = false;
 
index 3aa76db..49d84fd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -45,7 +45,7 @@
 namespace JSC { namespace DFG {
 
 class WatchpointCollectionPhase : public Phase {
-    static const bool verbose = false;
+    static constexpr bool verbose = false;
     
 public:
     WatchpointCollectionPhase(Graph& graph)
index 0851d56..1f4f765 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -195,7 +195,7 @@ protected:
         bufferPrintf("lsl #%u", 16 * amount);
     }
 
-    static const int bufferSize = 81;
+    static constexpr int bufferSize = 81;
 
     char m_formatBuffer[bufferSize];
     uint32_t* m_currentPC;
@@ -227,8 +227,8 @@ public:
 
 class A64DOpcodeAddSubtractImmediate : public A64DOpcodeAddSubtract {
 public:
-    static const uint32_t mask = 0x1f000000;
-    static const uint32_t pattern = 0x11000000;
+    static constexpr uint32_t mask = 0x1f000000;
+    static constexpr uint32_t pattern = 0x11000000;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeAddSubtractImmediate, thisObj);
 
@@ -241,8 +241,8 @@ public:
 
 class A64DOpcodeAddSubtractExtendedRegister : public A64DOpcodeAddSubtract {
 public:
-    static const uint32_t mask = 0x1fe00000;
-    static const uint32_t pattern = 0x0b200000;
+    static constexpr uint32_t mask = 0x1fe00000;
+    static constexpr uint32_t pattern = 0x0b200000;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeAddSubtractExtendedRegister, thisObj);
 
@@ -253,8 +253,8 @@ public:
 
 class A64DOpcodeAddSubtractShiftedRegister : public A64DOpcodeAddSubtract {
 public:
-    static const uint32_t mask = 0x1f200000;
-    static const uint32_t pattern = 0x0b000000;
+    static constexpr uint32_t mask = 0x1f200000;
+    static constexpr uint32_t pattern = 0x0b000000;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeAddSubtractShiftedRegister, thisObj);
 
@@ -274,8 +274,8 @@ private:
     static const char* const s_extractOpNames[3];
 
 public:
-    static const uint32_t mask = 0x1f800000;
-    static const uint32_t pattern = 0x13000000;
+    static constexpr uint32_t mask = 0x1f800000;
+    static constexpr uint32_t pattern = 0x13000000;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeBitfield, thisObj);
 
@@ -294,8 +294,8 @@ public:
 
 class A64DOpcodeCompareAndBranchImmediate : public A64DOpcode {
 public:
-    static const uint32_t mask = 0x7e000000;
-    static const uint32_t pattern = 0x34000000;
+    static constexpr uint32_t mask = 0x7e000000;
+    static constexpr uint32_t pattern = 0x34000000;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeCompareAndBranchImmediate, thisObj);
 
@@ -307,8 +307,8 @@ public:
 
 class A64DOpcodeConditionalBranchImmediate : public A64DOpcode {
 public:
-    static const uint32_t mask = 0xff000010;
-    static const uint32_t pattern = 0x54000000;
+    static constexpr uint32_t mask = 0xff000010;
+    static constexpr uint32_t pattern = 0x54000000;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeConditionalBranchImmediate, thisObj);
 
@@ -323,8 +323,8 @@ private:
     static const char* const s_opNames[4];
 
 public:
-    static const uint32_t mask = 0x1fe00000;
-    static const uint32_t pattern = 0x1a800000;
+    static constexpr uint32_t mask = 0x1fe00000;
+    static constexpr uint32_t pattern = 0x1a800000;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeConditionalSelect, thisObj);
 
@@ -344,8 +344,8 @@ private:
     static const char* const s_pacAutOpNames[18];
     
 public:
-    static const uint32_t mask = 0x5fe00000;
-    static const uint32_t pattern = 0x5ac00000;
+    static constexpr uint32_t mask = 0x5fe00000;
+    static constexpr uint32_t pattern = 0x5ac00000;
     
     DEFINE_STATIC_FORMAT(A64DOpcodeDataProcessing1Source, thisObj);
     
@@ -363,8 +363,8 @@ private:
     static const char* const s_opNames[16];
 
 public:
-    static const uint32_t mask = 0x5fe00000;
-    static const uint32_t pattern = 0x1ac00000;
+    static constexpr uint32_t mask = 0x5fe00000;
+    static constexpr uint32_t pattern = 0x1ac00000;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeDataProcessing2Source, thisObj);
 
@@ -382,8 +382,8 @@ private:
     static const char* const s_pseudoOpNames[16];
 
 public:
-    static const uint32_t mask = 0x1f000000;
-    static const uint32_t pattern = 0x1b000000;
+    static constexpr uint32_t mask = 0x1f000000;
+    static constexpr uint32_t pattern = 0x1b000000;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeDataProcessing3Source, thisObj);
 
@@ -399,8 +399,8 @@ public:
 
 class A64OpcodeExceptionGeneration : public A64DOpcode {
 public:
-    static const uint32_t mask = 0xff000000;
-    static const uint32_t pattern = 0xd4000000;
+    static constexpr uint32_t mask = 0xff000000;
+    static constexpr uint32_t pattern = 0xd4000000;
 
     DEFINE_STATIC_FORMAT(A64OpcodeExceptionGeneration, thisObj);
 
@@ -414,8 +414,8 @@ public:
 
 class A64DOpcodeExtract : public A64DOpcode {
 public:
-    static const uint32_t mask = 0x1f800000;
-    static const uint32_t pattern = 0x13800000;
+    static constexpr uint32_t mask = 0x1f800000;
+    static constexpr uint32_t pattern = 0x13800000;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeExtract, thisObj);
 
@@ -439,8 +439,8 @@ private:
     static const char* const s_opNames[16];
     
 public:
-    static const uint32_t mask = 0x5f203c00;
-    static const uint32_t pattern = 0x1e202000;
+    static constexpr uint32_t mask = 0x5f203c00;
+    static constexpr uint32_t pattern = 0x1e202000;
     
     DEFINE_STATIC_FORMAT(A64DOpcodeFloatingPointCompare, thisObj);
     
@@ -455,8 +455,8 @@ public:
 
 class A64DOpcodeFloatingPointConditionalSelect : public A64DOpcodeFloatingPointOps {
 public:
-    static const uint32_t mask = 0x5f200c00;
-    static const uint32_t pattern = 0x1e200c00;
+    static constexpr uint32_t mask = 0x5f200c00;
+    static constexpr uint32_t pattern = 0x1e200c00;
     
     DEFINE_STATIC_FORMAT(A64DOpcodeFloatingPointConditionalSelect, thisObj);
     
@@ -472,8 +472,8 @@ private:
     static const char* const s_opNames[16];
 
 public:
-    static const uint32_t mask = 0x5f207c00;
-    static const uint32_t pattern = 0x1e204000;
+    static constexpr uint32_t mask = 0x5f207c00;
+    static constexpr uint32_t pattern = 0x1e204000;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeFloatingPointDataProcessing1Source, thisObj);
 
@@ -489,8 +489,8 @@ private:
     static const char* const s_opNames[16];
 
 public:
-    static const uint32_t mask = 0x5f200800;
-    static const uint32_t pattern = 0x1e200800;
+    static constexpr uint32_t mask = 0x5f200800;
+    static constexpr uint32_t pattern = 0x1e200800;
 
     DEFINE_STATIC_FORMAT(A64DOpcodeFloatingPointDataProcessing2Source, thisObj);
 
@@ -506,8 +506,8 @@ private: