Ignore:
Timestamp:
May 10, 2020, 7:36:05 PM (5 years ago)
Author:
Ross Kirsling
Message:

[clang-tidy] Run modernize-use-nullptr over JSC
https://bugs.webkit.org/show_bug.cgi?id=211706

Reviewed by Darin Adler.

  • API/APICallbackFunction.h:
  • API/JSAPIGlobalObject.h:
  • API/JSBase.cpp:
  • API/JSCallbackObjectFunctions.h:
  • API/JSClassRef.cpp:
  • API/JSContextRef.cpp:
  • API/JSObjectRef.cpp:
  • API/JSScriptRef.cpp:
  • API/JSValueRef.cpp:
  • API/JSWeakObjectMapRefPrivate.cpp:
  • API/tests/ExecutionTimeLimitTest.cpp:
  • API/tests/PingPongStackOverflowTest.cpp:
  • assembler/AbstractMacroAssembler.h:
  • assembler/CPU.cpp:
  • bytecode/CodeBlock.cpp:
  • bytecode/DeleteByIdVariant.cpp:
  • bytecode/GetByIdVariant.cpp:
  • bytecode/InByIdVariant.cpp:
  • bytecode/InlineCallFrame.cpp:
  • bytecode/LazyOperandValueProfile.cpp:
  • bytecode/PutByIdVariant.cpp:
  • bytecode/ValueProfile.h:
  • bytecode/ValueRecovery.cpp:
  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:
  • debugger/DebuggerScope.h:
  • dfg/DFGAbstractValue.cpp:
  • dfg/DFGAdjacencyList.h:
  • dfg/DFGArgumentPosition.h:
  • dfg/DFGArrayifySlowPathGenerator.h:
  • dfg/DFGAvailability.h:
  • dfg/DFGByteCodeParser.cpp:
  • dfg/DFGCFGSimplificationPhase.cpp:
  • dfg/DFGCPSRethreadingPhase.cpp:
  • dfg/DFGCompilationKey.h:
  • dfg/DFGConstantFoldingPhase.cpp:
  • dfg/DFGDisassembler.cpp:
  • dfg/DFGDoubleFormatState.h:
  • dfg/DFGEdge.h:
  • dfg/DFGFixupPhase.cpp:
  • dfg/DFGFrozenValue.cpp:
  • dfg/DFGGenerationInfo.h:
  • dfg/DFGGraph.h:
  • dfg/DFGInPlaceAbstractState.cpp:
  • dfg/DFGIntegerCheckCombiningPhase.cpp:
  • dfg/DFGLazyJSValue.cpp:
  • dfg/DFGNode.h:
  • dfg/DFGOSREntrypointCreationPhase.cpp:
  • dfg/DFGOSRExit.cpp:
  • dfg/DFGOperations.cpp:
  • dfg/DFGSilentRegisterSavePlan.h:
  • dfg/DFGSpeculativeJIT.cpp:
  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT64.cpp:
  • dfg/DFGStructureAbstractValue.cpp:
  • dfg/DFGTransition.cpp:
  • dfg/DFGTypeCheckHoistingPhase.cpp:
  • dfg/DFGWorklist.cpp:
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLAvailableRecovery.h:
  • ftl/FTLExitValue.cpp:
  • ftl/FTLFormattedValue.h:
  • ftl/FTLJITCode.cpp:
  • ftl/FTLLink.cpp:
  • ftl/FTLLowerDFGToB3.cpp:
  • ftl/FTLLoweredNodeValue.h:
  • ftl/FTLOSREntry.cpp:
  • ftl/FTLOSRExitCompiler.cpp:
  • ftl/FTLTypedPointer.h:
  • ftl/FTLValueFromBlock.h:
  • ftl/FTLValueRange.h:
  • heap/GCSegmentedArray.h:
  • heap/Handle.h:
  • heap/HandleSet.h:
  • heap/HandleTypes.h:
  • heap/HeapSnapshotBuilder.cpp:
  • heap/MarkedBlockInlines.h:
  • heap/Strong.h:
  • heap/WeakImpl.h:
  • heap/WeakInlines.h:
  • heap/WeakSet.cpp:
  • heap/WeakSet.h:
  • interpreter/CallFrame.cpp:
  • interpreter/CallFrame.h:
  • interpreter/Interpreter.cpp:
  • interpreter/ProtoCallFrame.h:
  • interpreter/StackVisitor.cpp:
  • interpreter/StackVisitor.h:
  • jit/AssemblyHelpers.h:
  • jit/CCallHelpers.h:
  • jit/JITCode.cpp:
  • jit/JITOperations.cpp:
  • jit/Repatch.cpp:
  • jit/ThunkGenerators.cpp:
  • jsc.cpp:
  • llint/LLIntSlowPaths.cpp:
  • parser/ASTBuilder.h:
  • parser/Lexer.cpp:
  • parser/Lexer.h:
  • parser/Nodes.cpp:
  • parser/Nodes.h:
  • parser/Parser.cpp:
  • parser/Parser.h:
  • parser/ParserArena.cpp:
  • parser/ParserArena.h:
  • parser/ParserFunctionInfo.h:
  • parser/SyntaxChecker.h:
  • parser/UnlinkedSourceCode.h:
  • profiler/ProfilerBytecodeSequence.cpp:
  • profiler/ProfilerCompilation.cpp:
  • profiler/ProfilerDatabase.cpp:
  • profiler/ProfilerOSRExitSite.cpp:
  • profiler/ProfilerOriginStack.cpp:
  • runtime/ArgList.h:
  • runtime/ArrayPrototype.cpp:
  • runtime/ClonedArguments.cpp:
  • runtime/CommonSlowPaths.cpp:
  • runtime/Completion.h:
  • runtime/DataView.h:
  • runtime/DatePrototype.cpp:
  • runtime/DirectEvalExecutable.cpp:
  • runtime/DumpContext.cpp:
  • runtime/FunctionExecutable.cpp:
  • runtime/IndirectEvalExecutable.cpp:
  • runtime/JSArray.cpp:
  • runtime/JSArrayBufferView.cpp:
  • runtime/JSCJSValue.cpp:
  • runtime/JSCJSValueInlines.h:
  • runtime/JSCell.cpp:
  • runtime/JSDataView.cpp:
  • runtime/JSDestructibleObject.h:
  • runtime/JSFunction.cpp:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
  • runtime/JSONObject.cpp:
  • runtime/JSObject.cpp:
  • runtime/JSObject.h:
  • runtime/JSScope.cpp:
  • runtime/JSScope.h:
  • runtime/LiteralParser.cpp:
  • runtime/OptionsList.h:
  • runtime/PropertyDescriptor.cpp:
  • runtime/PropertyMapHashTable.h:
  • runtime/PropertySlot.h:
  • runtime/PutPropertySlot.h:
  • runtime/RegExpMatchesArray.h:
  • runtime/RegExpPrototype.cpp:
  • runtime/StringPrototype.cpp:
  • runtime/Structure.cpp:
  • runtime/Structure.h:
  • runtime/TestRunnerUtils.cpp:
  • runtime/TypedArrayType.cpp:
  • runtime/VM.cpp:
  • runtime/Watchdog.cpp:
  • runtime/Watchdog.h:
  • runtime/WriteBarrier.h:
  • testRegExp.cpp:
  • tools/JSDollarVM.cpp:
  • wasm/WasmSlowPaths.cpp:
  • yarr/RegularExpression.h:
  • yarr/YarrInterpreter.cpp:
  • yarr/YarrJIT.cpp:
  • yarr/YarrJIT.h:
  • yarr/YarrPattern.cpp:
  • yarr/YarrPattern.h:
Location:
trunk/Source/JavaScriptCore/profiler
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp

    r251425 r261464  
    8181    VM& vm = globalObject->vm();
    8282    auto scope = DECLARE_THROW_SCOPE(vm);
    83     JSArray* header = constructEmptyArray(globalObject, 0);
     83    JSArray* header = constructEmptyArray(globalObject, nullptr);
    8484    RETURN_IF_EXCEPTION(scope, void());
    8585    for (unsigned i = 0; i < m_header.size(); ++i) {
     
    8989    result->putDirect(vm, vm.propertyNames->header, header);
    9090   
    91     JSArray* sequence = constructEmptyArray(globalObject, 0);
     91    JSArray* sequence = constructEmptyArray(globalObject, nullptr);
    9292    RETURN_IF_EXCEPTION(scope, void());
    9393    for (unsigned i = 0; i < m_sequence.size(); ++i) {
  • trunk/Source/JavaScriptCore/profiler/ProfilerCompilation.cpp

    r251425 r261464  
    122122    result->putDirect(vm, vm.propertyNames->compilationKind, jsString(vm, String::fromUTF8(toCString(m_kind))));
    123123   
    124     JSArray* profiledBytecodes = constructEmptyArray(globalObject, 0);
     124    JSArray* profiledBytecodes = constructEmptyArray(globalObject, nullptr);
    125125    RETURN_IF_EXCEPTION(scope, { });
    126126    for (unsigned i = 0; i < m_profiledBytecodes.size(); ++i) {
     
    132132    result->putDirect(vm, vm.propertyNames->profiledBytecodes, profiledBytecodes);
    133133   
    134     JSArray* descriptions = constructEmptyArray(globalObject, 0);
     134    JSArray* descriptions = constructEmptyArray(globalObject, nullptr);
    135135    RETURN_IF_EXCEPTION(scope, { });
    136136    for (unsigned i = 0; i < m_descriptions.size(); ++i) {
     
    142142    result->putDirect(vm, vm.propertyNames->descriptions, descriptions);
    143143   
    144     JSArray* counters = constructEmptyArray(globalObject, 0);
     144    JSArray* counters = constructEmptyArray(globalObject, nullptr);
    145145    RETURN_IF_EXCEPTION(scope, { });
    146146    for (auto it = m_counters.begin(), end = m_counters.end(); it != end; ++it) {
     
    156156    result->putDirect(vm, vm.propertyNames->counters, counters);
    157157   
    158     JSArray* exitSites = constructEmptyArray(globalObject, 0);
     158    JSArray* exitSites = constructEmptyArray(globalObject, nullptr);
    159159    RETURN_IF_EXCEPTION(scope, { });
    160160    for (unsigned i = 0; i < m_osrExitSites.size(); ++i) {
     
    166166    result->putDirect(vm, vm.propertyNames->osrExitSites, exitSites);
    167167   
    168     JSArray* exits = constructEmptyArray(globalObject, 0);
     168    JSArray* exits = constructEmptyArray(globalObject, nullptr);
    169169    RETURN_IF_EXCEPTION(scope, { });
    170170    for (unsigned i = 0; i < m_osrExits.size(); ++i) {
  • trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp

    r251425 r261464  
    4646    , m_vm(vm)
    4747    , m_shouldSaveAtExit(false)
    48     , m_nextRegisteredDatabase(0)
     48    , m_nextRegisteredDatabase(nullptr)
    4949{
    5050}
     
    103103    JSObject* result = constructEmptyObject(globalObject);
    104104   
    105     JSArray* bytecodes = constructEmptyArray(globalObject, 0);
     105    JSArray* bytecodes = constructEmptyArray(globalObject, nullptr);
    106106    RETURN_IF_EXCEPTION(scope, { });
    107107    for (unsigned i = 0; i < m_bytecodes.size(); ++i) {
     
    113113    result->putDirect(vm, vm.propertyNames->bytecodes, bytecodes);
    114114   
    115     JSArray* compilations = constructEmptyArray(globalObject, 0);
     115    JSArray* compilations = constructEmptyArray(globalObject, nullptr);
    116116    RETURN_IF_EXCEPTION(scope, { });
    117117    for (unsigned i = 0; i < m_compilations.size(); ++i) {
     
    123123    result->putDirect(vm, vm.propertyNames->compilations, compilations);
    124124   
    125     JSArray* events = constructEmptyArray(globalObject, 0);
     125    JSArray* events = constructEmptyArray(globalObject, nullptr);
    126126    RETURN_IF_EXCEPTION(scope, { });
    127127    for (unsigned i = 0; i < m_events.size(); ++i) {
     
    200200            continue;
    201201        *current = m_nextRegisteredDatabase;
    202         m_nextRegisteredDatabase = 0;
     202        m_nextRegisteredDatabase = nullptr;
    203203        m_shouldSaveAtExit = false;
    204204        break;
     
    218218    if (result) {
    219219        firstDatabase = result->m_nextRegisteredDatabase;
    220         result->m_nextRegisteredDatabase = 0;
     220        result->m_nextRegisteredDatabase = nullptr;
    221221        result->m_shouldSaveAtExit = false;
    222222    }
  • trunk/Source/JavaScriptCore/profiler/ProfilerOSRExitSite.cpp

    r251425 r261464  
    3939    VM& vm = globalObject->vm();
    4040    auto scope = DECLARE_THROW_SCOPE(vm);
    41     JSArray* result = constructEmptyArray(globalObject, 0);
     41    JSArray* result = constructEmptyArray(globalObject, nullptr);
    4242    RETURN_IF_EXCEPTION(scope, { });
    4343    for (unsigned i = 0; i < m_codeAddresses.size(); ++i) {
  • trunk/Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp

    r251425 r261464  
    103103    VM& vm = globalObject->vm();
    104104    auto scope = DECLARE_THROW_SCOPE(vm);
    105     JSArray* result = constructEmptyArray(globalObject, 0);
     105    JSArray* result = constructEmptyArray(globalObject, nullptr);
    106106    RETURN_IF_EXCEPTION(scope, { });
    107107   
Note: See TracChangeset for help on using the changeset viewer.