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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/testRegExp.cpp

    r260415 r261464  
    119119    static Structure* createStructure(VM& vm, JSValue prototype)
    120120    {
    121         return Structure::create(vm, 0, prototype, TypeInfo(GlobalObjectType, StructureFlags), info());
     121        return Structure::create(vm, nullptr, prototype, TypeInfo(GlobalObjectType, StructureFlags), info());
    122122    }
    123123
     
    321321
    322322    if (line[0] != '/')
    323         return 0;
     323        return nullptr;
    324324
    325325    int i = scanString(line + 1, lineLength - 1, pattern, '/') + 1;
    326326
    327327    if ((i >= lineLength) || (line[i] != '/'))
    328         return 0;
     328        return nullptr;
    329329
    330330    ++i;
     
    350350   
    351351    if ((line[0] != ' ') || (line[1] != '"'))
    352         return 0;
     352        return nullptr;
    353353
    354354    int i = scanString(line + 2, lineLength - 2, subjectString, '"') + 2;
    355355
    356356    if ((i >= (lineLength - 2)) || (line[i] != '"') || (line[i+1] != ',') || (line[i+2] != ' '))
    357         return 0;
     357        return nullptr;
    358358
    359359    i += 3;
     
    362362   
    363363    if (sscanf(line + i, "%d, ", &offset) != 1)
    364         return 0;
     364        return nullptr;
    365365
    366366    while (line[i] && line[i] != ' ')
     
    372372   
    373373    if (sscanf(line + i, "%d, ", &matchResult) != 1)
    374         return 0;
     374        return nullptr;
    375375   
    376376    while (line[i] && line[i] != ' ')
     
    380380   
    381381    if (line[i++] != '(')
    382         return 0;
     382        return nullptr;
    383383
    384384    int start, end;
     
    393393        if (sscanf(line + i, "%d, %d", &start, &end) != 2) {
    394394            delete result;
    395             return 0;
     395            return nullptr;
    396396        }
    397397
     
    409409        if (!line[i] || (line[i] != ',')) {
    410410            delete result;
    411             return 0;
     411            return nullptr;
    412412        }
    413413        i++;
     
    437437        }
    438438           
    439         RegExp* regexp = 0;
     439        RegExp* regexp = nullptr;
    440440        size_t lineLength = 0;
    441         char* linePtr = 0;
     441        char* linePtr = nullptr;
    442442        unsigned int lineNumber = 0;
    443443        const char* regexpError = nullptr;
     
    475475            } else if (linePtr[0] == '-') {
    476476                tests++;
    477                 regexp = 0; // Reset the live regexp to avoid confusing other subsequent tests
     477                regexp = nullptr; // Reset the live regexp to avoid confusing other subsequent tests
    478478                bool successfullyParsed = parseRegExpLine(vm, linePtr + 1, lineLength - 1, &regexpError);
    479479                if (successfullyParsed) {
Note: See TracChangeset for help on using the changeset viewer.