[clang-tidy] Run modernize-use-nullptr over JSC
authorross.kirsling@sony.com <ross.kirsling@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 May 2020 02:36:05 +0000 (02:36 +0000)
committerross.kirsling@sony.com <ross.kirsling@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 May 2020 02:36:05 +0000 (02:36 +0000)
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:

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

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

index 41e8f3a..8cc3ceb 100644 (file)
@@ -56,7 +56,7 @@ EncodedJSValue JSC_HOST_CALL APICallbackFunction::call(JSGlobalObject* globalObj
     for (int i = 0; i < argumentCount; i++)
         arguments.uncheckedAppend(toRef(globalObject, callFrame->uncheckedArgument(i)));
 
-    JSValueRef exception = 0;
+    JSValueRef exception = nullptr;
     JSValueRef result;
     {
         JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -91,7 +91,7 @@ EncodedJSValue JSC_HOST_CALL APICallbackFunction::construct(JSGlobalObject* glob
         for (size_t i = 0; i < argumentCount; ++i)
             arguments.uncheckedAppend(toRef(globalObject, callFrame->uncheckedArgument(i)));
 
-        JSValueRef exception = 0;
+        JSValueRef exception = nullptr;
         JSObjectRef result;
         {
             JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -107,7 +107,7 @@ EncodedJSValue JSC_HOST_CALL APICallbackFunction::construct(JSGlobalObject* glob
         return JSValue::encode(toJS(result));
     }
     
-    return JSValue::encode(toJS(JSObjectMake(ctx, jsCast<JSCallbackConstructor*>(constructor)->classRef(), 0)));
+    return JSValue::encode(toJS(JSObjectMake(ctx, jsCast<JSCallbackConstructor*>(constructor)->classRef(), nullptr)));
 }
 
 } // namespace JSC
index aaee1c1..7397c6b 100644 (file)
@@ -54,7 +54,7 @@ public:
 
     static Structure* createStructure(VM& vm, JSValue prototype)
     {
-        auto* result = Structure::create(vm, 0, prototype, TypeInfo(GlobalObjectType, StructureFlags), info());
+        auto* result = Structure::create(vm, nullptr, prototype, TypeInfo(GlobalObjectType, StructureFlags), info());
         result->setTransitionWatchpointIsLikelyToBeFired(true);
         return result;
     }
index 083a7d3..4dfbbc1 100644 (file)
@@ -193,7 +193,7 @@ JSObjectRef JSGetMemoryUsageStatistics(JSContextRef ctx)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
 
     JSGlobalObject* globalObject = toJS(ctx);
index d9934c9..ad2d39e 100644 (file)
@@ -175,7 +175,7 @@ bool JSCallbackObject<Parent>::getOwnPropertySlot(JSObject* object, JSGlobalObje
             } else if (JSObjectGetPropertyCallback getProperty = jsClass->getProperty) {
                 if (!propertyNameRef)
                     propertyNameRef = OpaqueJSString::tryCreate(name);
-                JSValueRef exception = 0;
+                JSValueRef exception = nullptr;
                 JSValueRef value;
                 {
                     JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -234,7 +234,7 @@ JSValue JSCallbackObject<Parent>::defaultValue(const JSObject* object, JSGlobalO
 
     for (JSClassRef jsClass = thisObject->classRef(); jsClass; jsClass = jsClass->parentClass) {
         if (JSObjectConvertToTypeCallback convertToType = jsClass->convertToType) {
-            JSValueRef exception = 0;
+            JSValueRef exception = nullptr;
             JSValueRef result = convertToType(ctx, thisRef, jsHint, &exception);
             if (exception) {
                 throwException(globalObject, scope, toJS(globalObject, exception));
@@ -265,7 +265,7 @@ bool JSCallbackObject<Parent>::put(JSCell* cell, JSGlobalObject* globalObject, P
             if (JSObjectSetPropertyCallback setProperty = jsClass->setProperty) {
                 if (!propertyNameRef)
                     propertyNameRef = OpaqueJSString::tryCreate(name);
-                JSValueRef exception = 0;
+                JSValueRef exception = nullptr;
                 bool result;
                 {
                     JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -282,7 +282,7 @@ bool JSCallbackObject<Parent>::put(JSCell* cell, JSGlobalObject* globalObject, P
                     if (entry->attributes & kJSPropertyAttributeReadOnly)
                         return false;
                     if (JSObjectSetPropertyCallback setProperty = entry->setProperty) {
-                        JSValueRef exception = 0;
+                        JSValueRef exception = nullptr;
                         bool result;
                         {
                             JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -329,7 +329,7 @@ bool JSCallbackObject<Parent>::putByIndex(JSCell* cell, JSGlobalObject* globalOb
         if (JSObjectSetPropertyCallback setProperty = jsClass->setProperty) {
             if (!propertyNameRef)
                 propertyNameRef = OpaqueJSString::tryCreate(propertyName.impl());
-            JSValueRef exception = 0;
+            JSValueRef exception = nullptr;
             bool result;
             {
                 JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -346,7 +346,7 @@ bool JSCallbackObject<Parent>::putByIndex(JSCell* cell, JSGlobalObject* globalOb
                 if (entry->attributes & kJSPropertyAttributeReadOnly)
                     return false;
                 if (JSObjectSetPropertyCallback setProperty = entry->setProperty) {
-                    JSValueRef exception = 0;
+                    JSValueRef exception = nullptr;
                     bool result;
                     {
                         JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -388,7 +388,7 @@ bool JSCallbackObject<Parent>::deleteProperty(JSCell* cell, JSGlobalObject* glob
             if (JSObjectDeletePropertyCallback deleteProperty = jsClass->deleteProperty) {
                 if (!propertyNameRef)
                     propertyNameRef = OpaqueJSString::tryCreate(name);
-                JSValueRef exception = 0;
+                JSValueRef exception = nullptr;
                 bool result;
                 {
                     JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -461,7 +461,7 @@ EncodedJSValue JSCallbackObject<Parent>::construct(JSGlobalObject* globalObject,
             arguments.reserveInitialCapacity(argumentCount);
             for (size_t i = 0; i < argumentCount; ++i)
                 arguments.uncheckedAppend(toRef(globalObject, callFrame->uncheckedArgument(i)));
-            JSValueRef exception = 0;
+            JSValueRef exception = nullptr;
             JSObject* result;
             {
                 JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -492,7 +492,7 @@ bool JSCallbackObject<Parent>::customHasInstance(JSObject* object, JSGlobalObjec
     for (JSClassRef jsClass = thisObject->classRef(); jsClass; jsClass = jsClass->parentClass) {
         if (JSObjectHasInstanceCallback hasInstance = jsClass->hasInstance) {
             JSValueRef valueRef = toRef(globalObject, value);
-            JSValueRef exception = 0;
+            JSValueRef exception = nullptr;
             bool result;
             {
                 JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -538,7 +538,7 @@ EncodedJSValue JSCallbackObject<Parent>::call(JSGlobalObject* globalObject, Call
             arguments.reserveInitialCapacity(argumentCount);
             for (size_t i = 0; i < argumentCount; ++i)
                 arguments.uncheckedAppend(toRef(globalObject, callFrame->uncheckedArgument(i)));
-            JSValueRef exception = 0;
+            JSValueRef exception = nullptr;
             JSValue result;
             {
                 JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -635,7 +635,7 @@ JSValue JSCallbackObject<Parent>::getStaticValue(JSGlobalObject* globalObject, P
             if (OpaqueJSClassStaticValuesTable* staticValues = jsClass->staticValues(globalObject)) {
                 if (StaticValueEntry* entry = staticValues->get(name)) {
                     if (JSObjectGetPropertyCallback getProperty = entry->getProperty) {
-                        JSValueRef exception = 0;
+                        JSValueRef exception = nullptr;
                         JSValueRef value;
                         {
                             JSLock::DropAllLocks dropAllLocks(globalObject);
@@ -702,7 +702,7 @@ EncodedJSValue JSCallbackObject<Parent>::callbackGetter(JSGlobalObject* globalOb
             if (JSObjectGetPropertyCallback getProperty = jsClass->getProperty) {
                 if (!propertyNameRef)
                     propertyNameRef = OpaqueJSString::tryCreate(name);
-                JSValueRef exception = 0;
+                JSValueRef exception = nullptr;
                 JSValueRef value;
                 {
                     JSLock::DropAllLocks dropAllLocks(globalObject);
index 92df638..50f53e0 100644 (file)
 
 using namespace JSC;
 
-const JSClassDefinition kJSClassDefinitionEmpty = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+const JSClassDefinition kJSClassDefinitionEmpty = { 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
 
 OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* protoClass) 
     : parentClass(definition->parentClass)
-    , prototypeClass(0)
+    , prototypeClass(nullptr)
     , initialize(definition->initialize)
     , finalize(definition->finalize)
     , hasProperty(definition->hasProperty)
@@ -107,7 +107,7 @@ OpaqueJSClass::~OpaqueJSClass()
 
 Ref<OpaqueJSClass> OpaqueJSClass::createNoAutomaticPrototype(const JSClassDefinition* definition)
 {
-    return adoptRef(*new OpaqueJSClass(definition, 0));
+    return adoptRef(*new OpaqueJSClass(definition, nullptr));
 }
 
 Ref<OpaqueJSClass> OpaqueJSClass::create(const JSClassDefinition* clientDefinition)
@@ -115,12 +115,12 @@ Ref<OpaqueJSClass> OpaqueJSClass::create(const JSClassDefinition* clientDefiniti
     JSClassDefinition definition = *clientDefinition; // Avoid modifying client copy.
 
     JSClassDefinition protoDefinition = kJSClassDefinitionEmpty;
-    protoDefinition.finalize = 0;
+    protoDefinition.finalize = nullptr;
     std::swap(definition.staticFunctions, protoDefinition.staticFunctions); // Move static functions to the prototype.
     
     // We are supposed to use JSClassRetain/Release but since we know that we currently have
     // the only reference to this class object we cheat and use a RefPtr instead.
-    RefPtr<OpaqueJSClass> protoClass = adoptRef(new OpaqueJSClass(&protoDefinition, 0));
+    RefPtr<OpaqueJSClass> protoClass = adoptRef(new OpaqueJSClass(&protoDefinition, nullptr));
     return adoptRef(*new OpaqueJSClass(&definition, protoClass.get()));
 }
 
@@ -182,7 +182,7 @@ JSObject* OpaqueJSClass::prototype(JSGlobalObject* globalObject)
      */
 
     if (!prototypeClass)
-        return 0;
+        return nullptr;
 
     OpaqueJSClassContextData& jsClassData = contextData(globalObject);
 
index d69c332..a5dc1b4 100644 (file)
@@ -128,7 +128,7 @@ JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass)
     }
 #endif // OS(DARWIN)
 
-    return JSGlobalContextCreateInGroup(0, globalObjectClass);
+    return JSGlobalContextCreateInGroup(nullptr, globalObjectClass);
 }
 
 JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClassRef globalObjectClass)
@@ -148,7 +148,7 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass
         return JSGlobalContextRetain(toGlobalRef(globalObject));
     }
 
-    JSGlobalObject* globalObject = JSCallbackObject<JSGlobalObject>::create(vm.get(), globalObjectClass, JSCallbackObject<JSGlobalObject>::createStructure(vm.get(), 0, jsNull()));
+    JSGlobalObject* globalObject = JSCallbackObject<JSGlobalObject>::create(vm.get(), globalObjectClass, JSCallbackObject<JSGlobalObject>::createStructure(vm.get(), nullptr, jsNull()));
     JSValue prototype = globalObjectClass->prototype(globalObject);
     if (!prototype)
         prototype = jsNull();
@@ -187,7 +187,7 @@ JSObjectRef JSContextGetGlobalObject(JSContextRef ctx)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -200,7 +200,7 @@ JSContextGroupRef JSContextGetGroup(JSContextRef ctx)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     return toRef(&globalObject->vm());
@@ -210,7 +210,7 @@ JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     JSLockHolder locker(globalObject);
@@ -222,7 +222,7 @@ JSStringRef JSGlobalContextCopyName(JSGlobalContextRef ctx)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
 
     JSGlobalObject* globalObject = toJS(ctx);
@@ -231,7 +231,7 @@ JSStringRef JSGlobalContextCopyName(JSGlobalContextRef ctx)
 
     String name = globalObject->name();
     if (name.isNull())
-        return 0;
+        return nullptr;
 
     return OpaqueJSString::tryCreate(name).leakRef();
 }
@@ -324,7 +324,7 @@ JSStringRef JSContextCreateBacktrace(JSContextRef ctx, unsigned maxStackSize)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
index f72b0aa..faa188d 100644 (file)
@@ -87,7 +87,7 @@ JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -107,7 +107,7 @@ JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name,
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -119,13 +119,13 @@ JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObje
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
     JSLockHolder locker(vm);
 
-    JSValue jsPrototype = jsClass ? jsClass->prototype(globalObject) : 0;
+    JSValue jsPrototype = jsClass ? jsClass->prototype(globalObject) : nullptr;
     if (!jsPrototype)
         jsPrototype = globalObject->objectPrototype();
 
@@ -138,7 +138,7 @@ JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned pa
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -156,13 +156,13 @@ JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned pa
         auto throwScope = DECLARE_THROW_SCOPE(vm);
         throwOutOfMemoryError(globalObject, throwScope);
         handleExceptionIfNeeded(scope, ctx, exception);
-        return 0;
+        return nullptr;
     }
 
     auto sourceURLString = sourceURL ? sourceURL->string() : String();
     JSObject* result = constructFunction(globalObject, args, nameID, SourceOrigin { sourceURLString }, sourceURLString, TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber()));
     if (handleExceptionIfNeeded(scope, ctx, exception) == ExceptionStatus::DidThrow)
-        result = 0;
+        result = nullptr;
     return toRef(result);
 }
 
@@ -170,7 +170,7 @@ JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSVa
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -186,15 +186,15 @@ JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSVa
             auto throwScope = DECLARE_THROW_SCOPE(vm);
             throwOutOfMemoryError(globalObject, throwScope);
             handleExceptionIfNeeded(scope, ctx, exception);
-            return 0;
+            return nullptr;
         }
 
-        result = constructArray(globalObject, static_cast<ArrayAllocationProfile*>(0), argList);
+        result = constructArray(globalObject, static_cast<ArrayAllocationProfile*>(nullptr), argList);
     } else
-        result = constructEmptyArray(globalObject, 0);
+        result = constructEmptyArray(globalObject, nullptr);
 
     if (handleExceptionIfNeeded(scope, ctx, exception) == ExceptionStatus::DidThrow)
-        result = 0;
+        result = nullptr;
 
     return toRef(result);
 }
@@ -203,7 +203,7 @@ JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSVal
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -217,12 +217,12 @@ JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSVal
         auto throwScope = DECLARE_THROW_SCOPE(vm);
         throwOutOfMemoryError(globalObject, throwScope);
         handleExceptionIfNeeded(scope, ctx, exception);
-        return 0;
+        return nullptr;
     }
 
     JSObject* result = constructDate(globalObject, JSValue(), argList);
     if (handleExceptionIfNeeded(scope, ctx, exception) == ExceptionStatus::DidThrow)
-        result = 0;
+        result = nullptr;
 
     return toRef(result);
 }
@@ -231,7 +231,7 @@ JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSVa
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -243,7 +243,7 @@ JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSVa
     JSObject* result = ErrorInstance::create(globalObject, errorStructure, message);
 
     if (handleExceptionIfNeeded(scope, ctx, exception) == ExceptionStatus::DidThrow)
-        result = 0;
+        result = nullptr;
 
     return toRef(result);
 }
@@ -252,7 +252,7 @@ JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSV
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -266,12 +266,12 @@ JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSV
         auto throwScope = DECLARE_THROW_SCOPE(vm);
         throwOutOfMemoryError(globalObject, throwScope);
         handleExceptionIfNeeded(scope, ctx, exception);
-        return 0;
+        return nullptr;
     }
 
     JSObject* result = constructRegExp(globalObject, argList);
     if (handleExceptionIfNeeded(scope, ctx, exception) == ExceptionStatus::DidThrow)
-        result = 0;
+        result = nullptr;
     
     return toRef(result);
 }
@@ -303,7 +303,7 @@ JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     JSLockHolder locker(globalObject);
@@ -580,7 +580,7 @@ void* JSObjectGetPrivate(JSObjectRef object)
         return static_cast<JSCallbackObject<JSAPIWrapperObject>*>(jsObject)->getPrivate();
 #endif
     
-    return 0;
+    return nullptr;
 }
 
 bool JSObjectSetPrivate(JSObjectRef object, void* data)
@@ -717,7 +717,7 @@ JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObject
     auto scope = DECLARE_CATCH_SCOPE(vm);
 
     if (!object)
-        return 0;
+        return nullptr;
 
     JSObject* jsObject = toJS(object);
     JSObject* jsThisObject = toJS(thisObject);
@@ -732,16 +732,16 @@ JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObject
         auto throwScope = DECLARE_THROW_SCOPE(vm);
         throwOutOfMemoryError(globalObject, throwScope);
         handleExceptionIfNeeded(scope, ctx, exception);
-        return 0;
+        return nullptr;
     }
 
     auto callData = getCallData(vm, jsObject);
     if (callData.type == CallData::Type::None)
-        return 0;
+        return nullptr;
 
     JSValueRef result = toRef(globalObject, profiledCall(globalObject, ProfilingReason::API, jsObject, callData, jsThisObject, argList));
     if (handleExceptionIfNeeded(scope, ctx, exception) == ExceptionStatus::DidThrow)
-        result = 0;
+        result = nullptr;
     return result;
 }
 
@@ -763,13 +763,13 @@ JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size
     auto scope = DECLARE_CATCH_SCOPE(vm);
 
     if (!object)
-        return 0;
+        return nullptr;
 
     JSObject* jsObject = toJS(object);
 
     auto constructData = getConstructData(vm, jsObject);
     if (constructData.type == CallData::Type::None)
-        return 0;
+        return nullptr;
 
     MarkedArgumentBuffer argList;
     for (size_t i = 0; i < argumentCount; i++)
@@ -778,12 +778,12 @@ JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size
         auto throwScope = DECLARE_THROW_SCOPE(vm);
         throwOutOfMemoryError(globalObject, throwScope);
         handleExceptionIfNeeded(scope, ctx, exception);
-        return 0;
+        return nullptr;
     }
 
     JSObjectRef result = toRef(profiledConstruct(globalObject, ProfilingReason::API, jsObject, constructData, argList));
     if (handleExceptionIfNeeded(scope, ctx, exception) == ExceptionStatus::DidThrow)
-        result = 0;
+        result = nullptr;
     return result;
 }
 
@@ -806,7 +806,7 @@ JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef o
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     JSLockHolder locker(globalObject);
index b9c0c08..bb96ebc 100644 (file)
@@ -88,7 +88,7 @@ JSScriptRef JSScriptCreateReferencingImmortalASCIIText(JSContextGroupRef context
     JSLockHolder locker(&vm);
     for (size_t i = 0; i < length; i++) {
         if (!isASCII(source[i]))
-            return 0;
+            return nullptr;
     }
 
     startingLineNumber = std::max(1, startingLineNumber);
@@ -149,7 +149,7 @@ JSValueRef JSScriptEvaluate(JSContextRef context, JSScriptRef script, JSValueRef
     JSLockHolder locker(vm);
     if (&script->vm() != &vm) {
         RELEASE_ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     NakedPtr<Exception> internalException;
     JSValue thisValue = thisValueRef ? toJS(globalObject, thisValueRef) : jsUndefined();
@@ -157,7 +157,7 @@ JSValueRef JSScriptEvaluate(JSContextRef context, JSScriptRef script, JSValueRef
     if (internalException) {
         if (exception)
             *exception = toRef(globalObject, internalException->value());
-        return 0;
+        return nullptr;
     }
     ASSERT(result);
     return toRef(globalObject, result);
index 53b978c..2df051a 100644 (file)
@@ -282,7 +282,7 @@ JSValueRef JSValueMakeUndefined(JSContextRef ctx)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     JSLockHolder locker(globalObject);
@@ -294,7 +294,7 @@ JSValueRef JSValueMakeNull(JSContextRef ctx)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     JSLockHolder locker(globalObject);
@@ -306,7 +306,7 @@ JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool value)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     JSLockHolder locker(globalObject);
@@ -318,7 +318,7 @@ JSValueRef JSValueMakeNumber(JSContextRef ctx, double value)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     JSLockHolder locker(globalObject);
@@ -345,7 +345,7 @@ JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -358,7 +358,7 @@ JSValueRef JSValueMakeFromJSONString(JSContextRef ctx, JSStringRef string)
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     JSLockHolder locker(globalObject);
@@ -376,7 +376,7 @@ JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef apiValue, unsig
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -386,9 +386,9 @@ JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef apiValue, unsig
     JSValue value = toJS(globalObject, apiValue);
     String result = JSONStringify(globalObject, value, indent);
     if (exception)
-        *exception = 0;
+        *exception = nullptr;
     if (handleExceptionIfNeeded(scope, ctx, exception) == ExceptionStatus::DidThrow)
-        return 0;
+        return nullptr;
     return OpaqueJSString::tryCreate(result).leakRef();
 }
 
@@ -428,7 +428,7 @@ JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef*
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -447,7 +447,7 @@ JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exce
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     VM& vm = globalObject->vm();
@@ -458,7 +458,7 @@ JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exce
     
     JSObjectRef objectRef = toRef(jsValue.toObject(globalObject));
     if (handleExceptionIfNeeded(scope, ctx, exception) == ExceptionStatus::DidThrow)
-        objectRef = 0;
+        objectRef = nullptr;
     return objectRef;
 }
 
index 23e251f..e08438c 100644 (file)
@@ -72,7 +72,7 @@ JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* k
 {
     if (!ctx) {
         ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
     JSGlobalObject* globalObject = toJS(ctx);
     JSLockHolder locker(globalObject);
index 6e5b82f..fb3e565 100644 (file)
@@ -78,7 +78,7 @@ static bool extendTerminateCallback(JSContextRef ctx, void*)
     extendTerminateCallbackCalled++;
     if (extendTerminateCallbackCalled == 1) {
         JSContextGroupRef contextGroup = JSContextGetGroup(ctx);
-        JSContextGroupSetExecutionTimeLimit(contextGroup, .200f, extendTerminateCallback, 0);
+        JSContextGroupSetExecutionTimeLimit(contextGroup, .200f, extendTerminateCallback, nullptr);
         return false;
     }
     return true;
@@ -156,7 +156,7 @@ int testExecutionTimeLimit()
 
         /* Test script on another thread: */
         timeLimit = 100_ms + tierAdjustment;
-        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), shouldTerminateCallback, 0);
+        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), shouldTerminateCallback, nullptr);
         {
 #if OS(LINUX) && (CPU(MIPS) || CPU(ARM_THUMB2))
             Seconds timeAfterWatchdogShouldHaveFired = 500_ms + tierAdjustment;
@@ -194,7 +194,7 @@ int testExecutionTimeLimit()
 
         /* Test script timeout: */
         timeLimit = 100_ms + tierAdjustment;
-        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), shouldTerminateCallback, 0);
+        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), shouldTerminateCallback, nullptr);
         {
             Seconds timeAfterWatchdogShouldHaveFired = 300_ms + tierAdjustment;
 
@@ -237,7 +237,7 @@ int testExecutionTimeLimit()
 
         /* Test script timeout with tail calls: */
         timeLimit = 100_ms + tierAdjustment;
-        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), shouldTerminateCallback, 0);
+        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), shouldTerminateCallback, nullptr);
         {
             Seconds timeAfterWatchdogShouldHaveFired = 300_ms + tierAdjustment;
 
@@ -280,7 +280,7 @@ int testExecutionTimeLimit()
 
         /* Test the script timeout's TerminatedExecutionException should NOT be catchable: */
         timeLimit = 100_ms + tierAdjustment;
-        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), shouldTerminateCallback, 0);
+        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), shouldTerminateCallback, nullptr);
         {
             Seconds timeAfterWatchdogShouldHaveFired = 300_ms + tierAdjustment;
             
@@ -327,7 +327,7 @@ int testExecutionTimeLimit()
         
         /* Test script timeout with no callback: */
         timeLimit = 100_ms + tierAdjustment;
-        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), 0, 0);
+        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), nullptr, nullptr);
         {
             Seconds timeAfterWatchdogShouldHaveFired = 300_ms + tierAdjustment;
             
@@ -372,7 +372,7 @@ int testExecutionTimeLimit()
         
         /* Test script timeout cancellation: */
         timeLimit = 100_ms + tierAdjustment;
-        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), cancelTerminateCallback, 0);
+        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), cancelTerminateCallback, nullptr);
         {
             Seconds timeAfterWatchdogShouldHaveFired = 300_ms + tierAdjustment;
             
@@ -415,7 +415,7 @@ int testExecutionTimeLimit()
         
         /* Test script timeout extension: */
         timeLimit = 100_ms + tierAdjustment;
-        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), extendTerminateCallback, 0);
+        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), extendTerminateCallback, nullptr);
         {
             Seconds timeBeforeExtendedDeadline = 250_ms + tierAdjustment;
             Seconds timeAfterExtendedDeadline = 600_ms + tierAdjustment;
@@ -466,7 +466,7 @@ int testExecutionTimeLimit()
 #if HAVE(MACH_EXCEPTIONS)
         /* Test script timeout from dispatch queue: */
         timeLimit = 100_ms + tierAdjustment;
-        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), dispatchTermitateCallback, 0);
+        JSContextGroupSetExecutionTimeLimit(contextGroup, timeLimit.seconds(), dispatchTermitateCallback, nullptr);
         {
             Seconds timeAfterWatchdogShouldHaveFired = 300_ms + tierAdjustment;
 
index fbe4687..dafbbcc 100644 (file)
@@ -50,7 +50,7 @@ static bool PingPongStackOverflowObject_hasInstance(JSContextRef context, JSObje
 
     int countAtEntry = nativeRecursionCount++;
 
-    JSValueRef result = 0;
+    JSValueRef result = nullptr;
     if (nativeRecursionCount < 100) {
         JSObjectRef function = JSValueToObject(context, hasInstance, exception);
         result = JSObjectCallAsFunction(context, function, constructor, 1, &possibleValue, exception);
@@ -65,7 +65,7 @@ static bool PingPongStackOverflowObject_hasInstance(JSContextRef context, JSObje
         builder.appendLiteral(");");
 
         JSStringRef script = JSStringCreateWithUTF8CString(builder.toString().utf8().data());
-        result = JSEvaluateScript(context, script, NULL, NULL, 1, exception);
+        result = JSEvaluateScript(context, script, nullptr, nullptr, 1, exception);
         JSStringRelease(script);
     }
 
@@ -81,22 +81,22 @@ JSClassDefinition PingPongStackOverflowObject_definition = {
     kJSClassAttributeNone,
     
     "PingPongStackOverflowObject",
-    NULL,
+    nullptr,
     
-    NULL,
-    NULL,
+    nullptr,
+    nullptr,
     
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
+    nullptr,
+    nullptr,
+    nullptr,
+    nullptr,
+    nullptr,
+    nullptr,
+    nullptr,
+    nullptr,
+    nullptr,
     PingPongStackOverflowObject_hasInstance,
-    NULL,
+    nullptr,
 };
 
 static JSClassRef PingPongStackOverflowObject_class(JSContextRef context)
@@ -151,9 +151,9 @@ int testPingPongStackOverflow()
     JSObjectRef globalObject = JSContextGetGlobalObject(context);
     ASSERT(JSValueIsObject(context, globalObject));
 
-    JSObjectRef PingPongStackOverflowObject = JSObjectMake(context, PingPongStackOverflowObject_class(context), NULL);
+    JSObjectRef PingPongStackOverflowObject = JSObjectMake(context, PingPongStackOverflowObject_class(context), nullptr);
     JSStringRef PingPongStackOverflowObjectString = JSStringCreateWithUTF8CString("PingPongStackOverflowObject");
-    JSObjectSetProperty(context, globalObject, PingPongStackOverflowObjectString, PingPongStackOverflowObject, kJSPropertyAttributeNone, NULL);
+    JSObjectSetProperty(context, globalObject, PingPongStackOverflowObjectString, PingPongStackOverflowObject, kJSPropertyAttributeNone, nullptr);
     JSStringRelease(PingPongStackOverflowObjectString);
 
     unsigned stackSize = 32 * KB;
index e12924a..69cc862 100644 (file)
@@ -1,3 +1,176 @@
+2020-05-10  Ross Kirsling  <ross.kirsling@sony.com>
+
+        [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:
+
 2020-05-09  Ross Kirsling  <ross.kirsling@sony.com>
 
         Fix build errors and warnings for non-unified JSCOnly
index 0677cf7..a71d088 100644 (file)
@@ -295,7 +295,7 @@ public:
             return const_cast<void*>(m_value);
         }
 
-        const void* m_value { 0 };
+        const void* m_value { nullptr };
     };
 
     struct ImmPtr : private TrustedImmPtr
index d2226e9..dbd94de 100644 (file)
@@ -41,7 +41,7 @@ bool isKernTCSMAvailable()
 
     uint32_t val = 0;
     size_t valSize = sizeof(val);
-    int rc = sysctlbyname("kern.tcsm_available", &val, &valSize, NULL, 0);
+    int rc = sysctlbyname("kern.tcsm_available", &val, &valSize, nullptr, 0);
     if (rc < 0)
         return false;
     return !!val;
@@ -50,7 +50,7 @@ bool isKernTCSMAvailable()
 bool enableKernTCSM()
 {
     uint32_t val = 1;
-    int rc = sysctlbyname("kern.tcsm_enable", NULL, 0, &val, sizeof(val));
+    int rc = sysctlbyname("kern.tcsm_enable", nullptr, nullptr, &val, sizeof(val));
     if (rc < 0)
         return false;
     return true;
index 6974adb..834082d 100644 (file)
@@ -973,7 +973,7 @@ CodeBlock* CodeBlock::specialOSREntryBlockOrNull()
 {
 #if ENABLE(FTL_JIT)
     if (jitType() != JITType::DFGJIT)
-        return 0;
+        return nullptr;
     DFG::JITCode* jitCode = m_jitCode->dfg();
     return jitCode->osrEntryBlock();
 #else // ENABLE(FTL_JIT)
@@ -1870,7 +1870,7 @@ HandlerInfo* CodeBlock::handlerForBytecodeIndex(BytecodeIndex bytecodeIndex, Req
 HandlerInfo* CodeBlock::handlerForIndex(unsigned index, RequiredHandler requiredHandler)
 {
     if (!m_rareData)
-        return 0;
+        return nullptr;
     return HandlerInfo::handlerForIndex<HandlerInfo>(m_rareData->m_exceptionHandlers, index, requiredHandler);
 }
 
index dad42be..d941b3a 100644 (file)
@@ -105,7 +105,7 @@ void DeleteByIdVariant::markIfCheap(SlotVisitor& visitor)
 
 void DeleteByIdVariant::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 
 bool DeleteByIdVariant::finalize(VM& vm)
index 2633362..0e16561 100644 (file)
@@ -182,7 +182,7 @@ bool GetByIdVariant::finalize(VM& vm)
 
 void GetByIdVariant::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 
 void GetByIdVariant::dumpInContext(PrintStream& out, DumpContext* context) const
index 0b37f53..ca15057 100644 (file)
@@ -83,7 +83,7 @@ bool InByIdVariant::finalize(VM& vm)
 
 void InByIdVariant::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 
 void InByIdVariant::dumpInContext(PrintStream& out, DumpContext* context) const
index 7991ac2..833b9a1 100644 (file)
@@ -82,7 +82,7 @@ void InlineCallFrame::dumpInContext(PrintStream& out, DumpContext* context) cons
 
 void InlineCallFrame::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 
 } // namespace JSC
index 6eeb145..4a186d0 100644 (file)
@@ -81,7 +81,7 @@ LazyOperandValueProfile* LazyOperandValueProfileParser::getIfPresent(
         m_map.find(key);
     
     if (iter == m_map.end())
-        return 0;
+        return nullptr;
     
     return iter->value;
 }
index 72c6cac..630c9d3 100644 (file)
@@ -285,7 +285,7 @@ bool PutByIdVariant::finalize(VM& vm)
 
 void PutByIdVariant::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 
 void PutByIdVariant::dumpInContext(PrintStream& out, DumpContext* context) const
index 986ff77..28a7273 100644 (file)
@@ -60,10 +60,10 @@ struct ValueProfileBase {
         JSValue value = JSValue::decode(m_buckets[bucket]);
         if (!!value) {
             if (!value.isCell())
-                return 0;
+                return nullptr;
             return value.asCell()->structure()->classInfo();
         }
-        return 0;
+        return nullptr;
     }
     
     unsigned numberOfSamples() const
index b13947f..c53d6a3 100644 (file)
@@ -133,7 +133,7 @@ void ValueRecovery::dumpInContext(PrintStream& out, DumpContext* context) const
 
 void ValueRecovery::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 #endif // ENABLE(JIT)
 
index 397dddc..4bc760c 100644 (file)
@@ -471,7 +471,7 @@ namespace JSC {
         }
 
         // Returns the place to write the final output of an operation.
-        RegisterID* finalDestination(RegisterID* originalDst, RegisterID* tempDst = 0)
+        RegisterID* finalDestination(RegisterID* originalDst, RegisterID* tempDst = nullptr)
         {
             if (originalDst && originalDst != ignoredResult())
                 return originalDst;
@@ -485,7 +485,7 @@ namespace JSC {
         {
             if (dst && dst != ignoredResult())
                 return dst->isTemporary() ? dst : newTemporary();
-            return 0;
+            return nullptr;
         }
 
         // Moves src to dst if dst is not null and is different from src, otherwise just returns src.
@@ -494,7 +494,7 @@ namespace JSC {
             return dst == ignoredResult() ? nullptr : (dst && dst != src) ? emitMove(dst, src) : src;
         }
 
-        Ref<LabelScope> newLabelScope(LabelScope::Type, const Identifier* = 0);
+        Ref<LabelScope> newLabelScope(LabelScope::Type, const Identifier* = nullptr);
 
         void emitNode(RegisterID* dst, StatementNode* n)
         {
index 312492a..4aecf0b 100644 (file)
@@ -120,7 +120,7 @@ void ConstantNode::emitBytecodeInConditionContext(BytecodeGenerator& generator,
 RegisterID* ConstantNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
 {
     if (dst == generator.ignoredResult())
-        return 0;
+        return nullptr;
     JSValue constant = jsValue(generator);
     if (UNLIKELY(!constant)) {
         // This can happen if we try to parse a string or BigInt so enormous that we OOM.
@@ -173,7 +173,7 @@ RegisterID* ThisNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst
 {
     generator.ensureThis();
     if (dst == generator.ignoredResult())
-        return 0;
+        return nullptr;
 
     RegisterID* result = generator.move(dst, generator.thisRegister());
     static const unsigned thisLength = strlen("this");
@@ -464,7 +464,7 @@ RegisterID* ArrayNode::emitBytecode(BytecodeGenerator& generator, RegisterID* ds
     }
 
     if (m_elision) {
-        RegisterID* value = generator.emitLoad(0, jsNumber(m_elision + length));
+        RegisterID* value = generator.emitLoad(nullptr, jsNumber(m_elision + length));
         generator.emitPutById(array.get(), generator.propertyNames().length, value);
     }
 
@@ -479,7 +479,7 @@ handleSpread:
     });
     for (; n; n = n->next()) {
         if (n->elision())
-            generator.emitBinaryOp<OpAdd>(index.get(), index.get(), generator.emitLoad(0, jsNumber(n->elision())), OperandTypes(ResultType::numberTypeIsInt32(), ResultType::numberTypeIsInt32()));
+            generator.emitBinaryOp<OpAdd>(index.get(), index.get(), generator.emitLoad(nullptr, jsNumber(n->elision())), OperandTypes(ResultType::numberTypeIsInt32(), ResultType::numberTypeIsInt32()));
         if (n->value()->isSpreadExpression()) {
             SpreadExpressionNode* spread = static_cast<SpreadExpressionNode*>(n->value());
             generator.emitEnumeration(spread, spread->expression(), spreader);
@@ -490,7 +490,7 @@ handleSpread:
     }
     
     if (m_elision) {
-        generator.emitBinaryOp<OpAdd>(index.get(), index.get(), generator.emitLoad(0, jsNumber(m_elision)), OperandTypes(ResultType::numberTypeIsInt32(), ResultType::numberTypeIsInt32()));
+        generator.emitBinaryOp<OpAdd>(index.get(), index.get(), generator.emitLoad(nullptr, jsNumber(m_elision)), OperandTypes(ResultType::numberTypeIsInt32(), ResultType::numberTypeIsInt32()));
         generator.emitPutById(array.get(), generator.propertyNames().length, index.get());
     }
     return generator.move(dst, array.get());
@@ -514,7 +514,7 @@ ArgumentListNode* ArrayNode::toArgumentList(ParserArena& parserArena, int lineNu
     ASSERT(!m_elision && !m_optional);
     ElementNode* ptr = m_element;
     if (!ptr)
-        return 0;
+        return nullptr;
     JSTokenLocation location;
     location.line = lineNumber;
     location.startOffset = startPosition;
@@ -534,7 +534,7 @@ RegisterID* ObjectLiteralNode::emitBytecode(BytecodeGenerator& generator, Regist
 {
     if (!m_list) {
         if (dst == generator.ignoredResult())
-            return 0;
+            return nullptr;
         return generator.emitNewObject(generator.finalDestination(dst));
     }
     RefPtr<RegisterID> newObj = generator.emitNewObject(generator.tempDestination(dst));
@@ -1800,7 +1800,7 @@ RegisterID* CallFunctionCallDotNode::emitBytecode(BytecodeGenerator& generator,
             RefPtr<RegisterID> argumentsRegister;
             argumentsRegister = generator.emitNode(subject);
             generator.emitExpressionInfo(spread->divot(), spread->divotStart(), spread->divotEnd());
-            RefPtr<RegisterID> thisRegister = generator.emitGetByVal(generator.newTemporary(), argumentsRegister.get(), generator.emitLoad(0, jsNumber(0)));
+            RefPtr<RegisterID> thisRegister = generator.emitGetByVal(generator.newTemporary(), argumentsRegister.get(), generator.emitLoad(nullptr, jsNumber(0)));
             generator.emitCallVarargsInTailPosition(returnValue.get(), base.get(), thisRegister.get(), argumentsRegister.get(), generator.newTemporary(), 1, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
         } else if (m_args->m_listNode && m_args->m_listNode->m_expr) {
             ArgumentListNode* oldList = m_args->m_listNode;
@@ -1896,13 +1896,13 @@ RegisterID* ApplyFunctionCallDotNode::emitBytecode(BytecodeGenerator& generator,
                     Ref<Label> haveThis = generator.newLabel();
                     Ref<Label> end = generator.newLabel();
                     RefPtr<RegisterID> compareResult = generator.newTemporary();
-                    RefPtr<RegisterID> indexZeroCompareResult = generator.emitBinaryOp<OpEq>(compareResult.get(), index.get(), generator.emitLoad(0, jsNumber(0)), OperandTypes(ResultType::numberTypeIsInt32(), ResultType::numberTypeIsInt32()));
+                    RefPtr<RegisterID> indexZeroCompareResult = generator.emitBinaryOp<OpEq>(compareResult.get(), index.get(), generator.emitLoad(nullptr, jsNumber(0)), OperandTypes(ResultType::numberTypeIsInt32(), ResultType::numberTypeIsInt32()));
                     generator.emitJumpIfFalse(indexZeroCompareResult.get(), haveThis.get());
                     generator.move(thisRegister.get(), value);
                     generator.emitLoad(index.get(), jsNumber(1));
                     generator.emitJump(end.get());
                     generator.emitLabel(haveThis.get());
-                    RefPtr<RegisterID> indexOneCompareResult = generator.emitBinaryOp<OpEq>(compareResult.get(), index.get(), generator.emitLoad(0, jsNumber(1)), OperandTypes(ResultType::numberTypeIsInt32(), ResultType::numberTypeIsInt32()));
+                    RefPtr<RegisterID> indexOneCompareResult = generator.emitBinaryOp<OpEq>(compareResult.get(), index.get(), generator.emitLoad(nullptr, jsNumber(1)), OperandTypes(ResultType::numberTypeIsInt32(), ResultType::numberTypeIsInt32()));
                     generator.emitJumpIfFalse(indexOneCompareResult.get(), end.get());
                     generator.move(argumentsRegister.get(), value);
                     generator.emitLoad(index.get(), jsNumber(2));
@@ -2162,7 +2162,7 @@ RegisterID* VoidNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst
 {
     if (dst == generator.ignoredResult()) {
         generator.emitNode(generator.ignoredResult(), m_expr);
-        return 0;
+        return nullptr;
     }
     RefPtr<RegisterID> r0 = generator.emitNode(m_expr);
     return generator.emitLoad(dst, jsUndefined());
@@ -2176,7 +2176,7 @@ RegisterID* TypeOfResolveNode::emitBytecode(BytecodeGenerator& generator, Regist
     if (RegisterID* local = var.local()) {
         generator.emitTDZCheckIfNecessary(var, local, nullptr);
         if (dst == generator.ignoredResult())
-            return 0;
+            return nullptr;
         return generator.emitTypeOf(generator.finalDestination(dst), local);
     }
 
@@ -2184,7 +2184,7 @@ RegisterID* TypeOfResolveNode::emitBytecode(BytecodeGenerator& generator, Regist
     RefPtr<RegisterID> value = generator.emitGetFromScope(generator.newTemporary(), scope.get(), var, DoNotThrowIfNotFound);
     generator.emitTDZCheckIfNecessary(var, value.get(), nullptr);
     if (dst == generator.ignoredResult())
-        return 0;
+        return nullptr;
     return generator.emitTypeOf(generator.finalDestination(dst, scope.get()), value.get());
 }
 
@@ -2194,7 +2194,7 @@ RegisterID* TypeOfValueNode::emitBytecode(BytecodeGenerator& generator, Register
 {
     if (dst == generator.ignoredResult()) {
         generator.emitNode(generator.ignoredResult(), m_expr);
-        return 0;
+        return nullptr;
     }
     RefPtr<RegisterID> src = generator.emitNode(m_expr);
     return generator.emitTypeOf(generator.finalDestination(dst), src.get());
@@ -2435,7 +2435,7 @@ RegisterID* BinaryOpNode::emitStrcat(BytecodeGenerator& generator, RegisterID* d
     // immediate we can trivially determine that no conversion will be required.
     // If this is the case
     if (leftMostAddChild->isString())
-        leftMostAddChildTempRegister = 0;
+        leftMostAddChildTempRegister = nullptr;
 
     while (reverseExpressionList.size()) {
         ExpressionNode* node = reverseExpressionList.last();
@@ -2449,7 +2449,7 @@ RegisterID* BinaryOpNode::emitStrcat(BytecodeGenerator& generator, RegisterID* d
         // generated the second node, which means it is time to convert the leftmost operand.
         if (leftMostAddChildTempRegister) {
             generator.emitToPrimitive(leftMostAddChildTempRegister, leftMostAddChildTempRegister);
-            leftMostAddChildTempRegister = 0; // Only do this once.
+            leftMostAddChildTempRegister = nullptr; // Only do this once.
         }
         // Plant a conversion for this node, if necessary.
         if (!node->isString())
@@ -2505,9 +2505,9 @@ static inline bool canFoldToBranch(OpcodeID opcodeID, ExpressionNode* branchExpr
 void BinaryOpNode::tryFoldToBranch(BytecodeGenerator& generator, TriState& branchCondition, ExpressionNode*& branchExpression)
 {
     branchCondition = TriState::Indeterminate;
-    branchExpression = 0;
+    branchExpression = nullptr;
 
-    ConstantNode* constant = 0;
+    ConstantNode* constant = nullptr;
     if (m_expr1->isConstant()) {
         constant = static_cast<ConstantNode*>(m_expr1);
         branchExpression = m_expr2;
@@ -3100,7 +3100,7 @@ RegisterID* AssignResolveNode::emitBytecode(BytecodeGenerator& generator, Regist
     if (m_assignmentContext == AssignmentContext::AssignmentExpression)
         generator.emitTDZCheckIfNecessary(var, nullptr, scope.get());
     if (dst == generator.ignoredResult())
-        dst = 0;
+        dst = nullptr;
     RefPtr<RegisterID> result = generator.emitNode(dst, m_right); // Execute side effects first.
     if (isReadOnly) {
         bool threwException = generator.emitReadOnlyExceptionIfNeeded(var);
@@ -3980,7 +3980,7 @@ void ReturnNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
     ASSERT(generator.codeType() == FunctionCode);
 
     if (dst == generator.ignoredResult())
-        dst = 0;
+        dst = nullptr;
 
     RefPtr<RegisterID> returnRegister = m_value ? generator.emitNodeInTailPosition(dst, m_value) : generator.emitLoad(dst, jsUndefined());
 
@@ -4213,7 +4213,7 @@ void LabelNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
 void ThrowNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
 {
     if (dst == generator.ignoredResult())
-        dst = 0;
+        dst = nullptr;
     RefPtr<RegisterID> expr = generator.emitNode(m_expr);
     generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
     generator.emitThrow(expr.get());
@@ -4508,7 +4508,7 @@ void FunctionNode::emitBytecode(BytecodeGenerator& generator, RegisterID*)
         emitStatementsBytecode(generator, generator.ignoredResult());
 
         StatementNode* singleStatement = this->singleStatement();
-        ReturnNode* returnNode = 0;
+        ReturnNode* returnNode = nullptr;
 
         // Check for a return statement at the end of a function composed of a single block.
         if (singleStatement && singleStatement->isBlock()) {
@@ -4526,7 +4526,7 @@ void FunctionNode::emitBytecode(BytecodeGenerator& generator, RegisterID*)
             if (generator.isConstructor() && generator.constructorKind() != ConstructorKind::Naked)
                 r0 = generator.thisRegister();
             else
-                r0 = generator.emitLoad(0, jsUndefined());
+                r0 = generator.emitLoad(nullptr, jsUndefined());
             generator.emitProfileType(r0, ProfileTypeBytecodeFunctionReturnStatement); // Do not emit expression info for this profile because it's not in the user's source code.
             ASSERT(startOffset() >= lineStartOffset());
             generator.emitWillLeaveCallFrameDebugHook();
@@ -5210,7 +5210,7 @@ void RestParameterNode::emit(BytecodeGenerator& generator)
 RegisterID* SpreadExpressionNode::emitBytecode(BytecodeGenerator&, RegisterID*)
 {
     RELEASE_ASSERT_NOT_REACHED();
-    return 0;
+    return nullptr;
 }
 
 RegisterID* ObjectSpreadExpressionNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
index 4327c1f..9cffdba 100644 (file)
@@ -118,7 +118,7 @@ inline DebuggerScope::iterator DebuggerScope::begin()
 
 inline DebuggerScope::iterator DebuggerScope::end()
 { 
-    return iterator(0); 
+    return iterator(nullptr); 
 }
 
 } // namespace JSC
index 8c71a47..cdeebc4 100644 (file)
@@ -486,7 +486,7 @@ ResultType AbstractValue::resultType() const
 
 void AbstractValue::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 
 void AbstractValue::dumpInContext(PrintStream& out, DumpContext* context) const
index d6f2ddd..5bfd628 100644 (file)
@@ -107,7 +107,7 @@ public:
         child(2) = child3;
     }
     
-    void initialize(Node* child1 = 0, Node* child2 = 0, Node* child3 = 0)
+    void initialize(Node* child1 = nullptr, Node* child2 = nullptr, Node* child3 = nullptr)
     {
         initialize(Edge(child1), Edge(child2), Edge(child3));
     }
index 89c08fa..bd8b0e0 100644 (file)
@@ -53,7 +53,7 @@ public:
     VariableAccessData* someVariable() const
     {
         if (m_variables.isEmpty())
-            return 0;
+            return nullptr;
         return m_variables[0]->find();
     }
     
index 18741be..55a989d 100644 (file)
@@ -59,13 +59,13 @@ public:
             case Array::Int32:
             case Array::Double:
             case Array::Contiguous:
-                m_badPropertyJump = jit->speculationCheck(Uncountable, JSValueRegs(), 0);
+                m_badPropertyJump = jit->speculationCheck(Uncountable, JSValueRegs(), nullptr);
                 break;
             default:
                 break;
             }
         }
-        m_badIndexingTypeJump = jit->speculationCheck(BadIndexingType, JSValueSource::unboxedCell(m_baseGPR), 0);
+        m_badIndexingTypeJump = jit->speculationCheck(BadIndexingType, JSValueSource::unboxedCell(m_baseGPR), nullptr);
     }
     
 protected:
index 6d157f5..6abf4cd 100644 (file)
@@ -37,7 +37,7 @@ struct Node;
 class Availability {
 public:
     Availability()
-        : m_node(0)
+        : m_node(nullptr)
         , m_flushedAt(DeadFlush)
     {
     }
index 4ec15ec..130f6ae 100644 (file)
@@ -110,7 +110,7 @@ public:
         , m_codeBlock(graph.m_codeBlock)
         , m_profiledBlock(graph.m_profiledBlock)
         , m_graph(graph)
-        , m_currentBlock(0)
+        , m_currentBlock(nullptr)
         , m_currentIndex(0)
         , m_constantUndefined(graph.freeze(jsUndefined()))
         , m_constantNull(graph.freeze(jsNull()))
@@ -121,8 +121,8 @@ public:
         , m_numTmps(m_codeBlock->numTmps())
         , m_parameterSlots(0)
         , m_numPassedVarArgs(0)
-        , m_inlineStackTop(0)
-        , m_currentInstruction(0)
+        , m_inlineStackTop(nullptr)
+        , m_currentInstruction(nullptr)
         , m_hasDebuggerEnabled(graph.hasDebuggerEnabled())
     {
         ASSERT(m_profiledBlock);
@@ -774,7 +774,7 @@ private:
         return node;
     }
     
-    Node* addToGraph(NodeType op, Node* child1 = 0, Node* child2 = 0, Node* child3 = 0)
+    Node* addToGraph(NodeType op, Node* child1 = nullptr, Node* child2 = nullptr, Node* child3 = nullptr)
     {
         Node* result = m_graph.addNode(
             op, currentNodeOrigin(), Edge(child1), Edge(child2),
@@ -787,7 +787,7 @@ private:
             op, currentNodeOrigin(), child1, child2, child3);
         return addToGraph(result);
     }
-    Node* addToGraph(NodeType op, OpInfo info, Node* child1 = 0, Node* child2 = 0, Node* child3 = 0)
+    Node* addToGraph(NodeType op, OpInfo info, Node* child1 = nullptr, Node* child2 = nullptr, Node* child3 = nullptr)
     {
         Node* result = m_graph.addNode(
             op, currentNodeOrigin(), info, Edge(child1), Edge(child2),
@@ -799,7 +799,7 @@ private:
         Node* result = m_graph.addNode(op, currentNodeOrigin(), info, child1, child2, child3);
         return addToGraph(result);
     }
-    Node* addToGraph(NodeType op, OpInfo info1, OpInfo info2, Node* child1 = 0, Node* child2 = 0, Node* child3 = 0)
+    Node* addToGraph(NodeType op, OpInfo info1, OpInfo info2, Node* child1 = nullptr, Node* child2 = nullptr, Node* child3 = nullptr)
     {
         Node* result = m_graph.addNode(
             op, currentNodeOrigin(), info1, info2,
@@ -1811,7 +1811,7 @@ void ByteCodeParser::inlineCall(Node* callTargetNode, Operand result, CallVarian
     InlineVariableData inlineVariableData;
     inlineVariableData.inlineCallFrame = m_inlineStackTop->m_inlineCallFrame;
     inlineVariableData.argumentPositionStart = argumentPositionStart;
-    inlineVariableData.calleeVariable = 0;
+    inlineVariableData.calleeVariable = nullptr;
     
     RELEASE_ASSERT(
         m_inlineStackTop->m_inlineCallFrame->isClosureCall
@@ -5818,12 +5818,12 @@ void ByteCodeParser::parseBlock(unsigned limit)
             Node* operands[AdjacencyList::Size];
             unsigned indexInOperands = 0;
             for (unsigned i = 0; i < AdjacencyList::Size; ++i)
-                operands[i] = 0;
+                operands[i] = nullptr;
             for (int operandIdx = 0; operandIdx < numOperands; ++operandIdx) {
                 if (indexInOperands == maxArguments) {
                     operands[0] = addToGraph(StrCat, operands[0], operands[1], operands[2]);
                     for (unsigned i = 1; i < AdjacencyList::Size; ++i)
-                        operands[i] = 0;
+                        operands[i] = nullptr;
                     indexInOperands = 1;
                 }
                 
@@ -5978,7 +5978,7 @@ void ByteCodeParser::parseBlock(unsigned limit)
                 // https://bugs.webkit.org/show_bug.cgi?id=184192
                 addVarArgChild(base);
                 addVarArgChild(property);
-                addVarArgChild(0); // Leave room for property storage.
+                addVarArgChild(nullptr); // Leave room for property storage.
                 Node* getByVal = addToGraph(Node::VarArg, GetByVal, OpInfo(arrayMode.asWord()), OpInfo(prediction));
                 m_exitOK = false; // GetByVal must be treated as if it clobbers exit state, since FixupPhase may make it generic.
                 set(bytecode.m_dst, getByVal);
@@ -6947,7 +6947,7 @@ void ByteCodeParser::parseBlock(unsigned limit)
                     // https://bugs.webkit.org/show_bug.cgi?id=184192
                     addVarArgChild(get(bytecode.m_iterable));
                     addVarArgChild(index);
-                    addVarArgChild(0); // Leave room for property storage.
+                    addVarArgChild(nullptr); // Leave room for property storage.
                     Node* getByVal = addToGraph(Node::VarArg, GetByVal, OpInfo(arrayMode.asWord()), OpInfo(prediction));
                     set(bytecode.m_value, getByVal);
                     set(bytecode.m_done, falseNode);
@@ -7244,8 +7244,8 @@ void ByteCodeParser::parseBlock(unsigned limit)
 
             ResolveType resolveType;
             GetPutInfo getPutInfo(0);
-            Structure* structure = 0;
-            WatchpointSet* watchpoints = 0;
+            Structure* structure = nullptr;
+            WatchpointSet* watchpoints = nullptr;
             uintptr_t operand;
             {
                 ConcurrentJSLocker locker(m_inlineStackTop->m_profiledBlock->m_lock);
@@ -8048,7 +8048,7 @@ ByteCodeParser::InlineStackEntry::InlineStackEntry(
         ASSERT(!returnValue.isValid());
         ASSERT(!inlineCallFrameStart.isValid());
 
-        m_inlineCallFrame = 0;
+        m_inlineCallFrame = nullptr;
 
         m_identifierRemap.resize(codeBlock->numberOfIdentifiers());
         m_switchRemap.resize(codeBlock->numberOfSwitchJumpTables());
@@ -8219,8 +8219,8 @@ void ByteCodeParser::handlePutByVal(Bytecode bytecode, BytecodeIndex osrExitInde
         addVarArgChild(base);
         addVarArgChild(property);
         addVarArgChild(value);
-        addVarArgChild(0); // Leave room for property storage.
-        addVarArgChild(0); // Leave room for length.
+        addVarArgChild(nullptr); // Leave room for property storage.
+        addVarArgChild(nullptr); // Leave room for length.
         addToGraph(Node::VarArg, isDirect ? PutByValDirect : PutByVal, OpInfo(arrayMode.asWord()), OpInfo(bytecode.m_ecmaMode));
         m_exitOK = false; // PutByVal and PutByValDirect must be treated as if they clobber exit state, since FixupPhase may make them generic.
     }
@@ -8331,7 +8331,7 @@ void ByteCodeParser::parse()
     VERBOSE_LOG("Parsing ", *m_codeBlock, "\n");
     
     InlineStackEntry inlineStackEntry(
-        this, m_codeBlock, m_profiledBlock, 0, VirtualRegister(), VirtualRegister(),
+        this, m_codeBlock, m_profiledBlock, nullptr, VirtualRegister(), VirtualRegister(),
         m_codeBlock->numParameters(), InlineCallFrame::Call, nullptr);
     
     parseCodeBlock();
index 45790bf..bef688f 100644 (file)
@@ -171,7 +171,7 @@ public:
                     if (terminal->child1()->hasConstant()) {
                         FrozenValue* value = terminal->child1()->constant();
                         TriState found = TriState::False;
-                        BasicBlock* targetBlock = 0;
+                        BasicBlock* targetBlock = nullptr;
                         for (unsigned i = data->cases.size(); found == TriState::False && i--;) {
                             found = data->cases[i].value.strictEqual(value);
                             if (found == TriState::True)
index 873fa04..85b1583 100644 (file)
@@ -414,7 +414,7 @@ private:
         Vector<PhiStackEntry, 128>& phiStack = phiStackFor<operandKind>();
         
         // Ensure that attempts to use this fail instantly.
-        m_block = 0;
+        m_block = nullptr;
         
         while (!phiStack.isEmpty()) {
             PhiStackEntry entry = phiStack.last();
@@ -468,7 +468,7 @@ private:
                 
                 Node* newPhi = addPhiSilently(block, currentPhi->origin, variable);
                 newPhi->children = currentPhi->children;
-                currentPhi->children.initialize(newPhi, variableInPrevious, 0);
+                currentPhi->children.initialize(newPhi, variableInPrevious, nullptr);
             }
         }
     }
index fd4085b..5832f6c 100644 (file)
@@ -38,13 +38,13 @@ namespace DFG {
 class CompilationKey {
 public:
     CompilationKey()
-        : m_profiledBlock(0)
+        : m_profiledBlock(nullptr)
         , m_mode(InvalidCompilationMode)
     {
     }
     
     CompilationKey(WTF::HashTableDeletedValueType)
-        : m_profiledBlock(0)
+        : m_profiledBlock(nullptr)
         , m_mode(DFGMode)
     {
     }
index 90a3367..2dceeba 100644 (file)
@@ -1281,7 +1281,7 @@ private:
         node->child1().setUseKind(KnownCellUse);
         childEdge.setUseKind(KnownCellUse);
 
-        Transition* transition = 0;
+        Transition* transition = nullptr;
         if (variant.kind() == PutByIdVariant::Transition) {
             transition = m_graph.m_transitions.add(
                 m_graph.registerStructure(variant.oldStructureForTransition()), m_graph.registerStructure(variant.newStructure()));
index 727eb48..484fdc4 100644 (file)
@@ -101,7 +101,7 @@ Vector<Disassembler::DumpedOp> Disassembler::createDumpList(LinkBuffer& linkBuff
     const char* prefix = "    ";
     const char* disassemblyPrefix = "        ";
     
-    Node* lastNode = 0;
+    Node* lastNode = nullptr;
     MacroAssembler::Label previousLabel = m_startOfCode;
     for (size_t blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex) {
         BasicBlock* block = m_graph.block(blockIndex);
@@ -143,7 +143,7 @@ Vector<Disassembler::DumpedOp> Disassembler::createDumpList(LinkBuffer& linkBuff
     append(result, out, previousOrigin);
     out.print(prefix, "(End Of Main Path)\n");
     append(result, out, previousOrigin);
-    dumpDisassembly(out, disassemblyPrefix, linkBuffer, previousLabel, m_endOfCode, 0);
+    dumpDisassembly(out, disassemblyPrefix, linkBuffer, previousLabel, m_endOfCode, nullptr);
     append(result, out, previousOrigin);
     m_dumpContext.dump(out, prefix);
     append(result, out, previousOrigin);
index dcb2b8c..875afb5 100644 (file)
@@ -88,7 +88,7 @@ inline const char* doubleFormatStateToString(DoubleFormatState state)
         return "ForceValue";
     }
     RELEASE_ASSERT_NOT_REACHED();
-    return 0;
+    return nullptr;
 }
 
 } } // namespace JSC::DFG
index b78e18b..4a255b0 100644 (file)
@@ -36,7 +36,7 @@ class AdjacencyList;
 
 class Edge {
 public:
-    explicit Edge(Node* node = 0, UseKind useKind = UntypedUse, ProofStatus proofStatus = NeedsCheck, KillStatus killStatus = DoesNotKill)
+    explicit Edge(Node* node = nullptr, UseKind useKind = UntypedUse, ProofStatus proofStatus = NeedsCheck, KillStatus killStatus = DoesNotKill)
 #if USE(JSVALUE64)
         : m_encodedWord(makeWord(node, useKind, proofStatus, killStatus))
 #else
index 84d39e2..0f0aa44 100644 (file)
@@ -3857,7 +3857,7 @@ private:
         fixEdge<KnownCellUse>(node->child1());
         node->setArrayMode(arrayMode);
             
-        Node* storage = checkArray(arrayMode, node->origin, node->child1().node(), 0, lengthNeedsStorage);
+        Node* storage = checkArray(arrayMode, node->origin, node->child1().node(), nullptr, lengthNeedsStorage);
         if (!storage)
             return;
             
@@ -3866,7 +3866,7 @@ private:
     
     Node* prependGetArrayLength(NodeOrigin origin, Node* child, ArrayMode arrayMode)
     {
-        Node* storage = checkArray(arrayMode, origin, child, 0, lengthNeedsStorage);
+        Node* storage = checkArray(arrayMode, origin, child, nullptr, lengthNeedsStorage);
         return m_insertionSet.insertNode(
             m_indexInBlock, SpecInt32Only, GetArrayLength, origin,
             OpInfo(arrayMode.asWord()), Edge(child, KnownCellUse), Edge(storage));
index 39c09ad..362554a 100644 (file)
@@ -53,7 +53,7 @@ void FrozenValue::dumpInContext(PrintStream& out, DumpContext* context) const
 
 void FrozenValue::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 
 } } // namespace JSC::DFG
index adf2bda..4faf949 100644 (file)
@@ -46,7 +46,7 @@ namespace JSC { namespace DFG {
 class GenerationInfo {
 public:
     GenerationInfo()
-        : m_node(0)
+        : m_node(nullptr)
         , m_useCount(0)
         , m_registerFormat(DataFormatNone)
         , m_spillFormat(DataFormatNone)
index ec0f3b4..54fe552 100644 (file)
@@ -267,14 +267,14 @@ public:
     void assertIsRegistered(Structure* structure);
     
     // CodeBlock is optional, but may allow additional information to be dumped (e.g. Identifier names).
-    void dump(PrintStream& = WTF::dataFile(), DumpContext* = 0);
+    void dump(PrintStream& = WTF::dataFile(), DumpContext* = nullptr);
 
     bool terminalsAreValid();
     
     enum PhiNodeDumpMode { DumpLivePhisOnly, DumpAllPhis };
     void dumpBlockHeader(PrintStream&, const char* prefix, BasicBlock*, PhiNodeDumpMode, DumpContext*);
     void dump(PrintStream&, Edge);
-    void dump(PrintStream&, const char* prefix, Node*, DumpContext* = 0);
+    void dump(PrintStream&, const char* prefix, Node*, DumpContext* = nullptr);
     static int amountOfNodeWhiteSpace(Node*);
     static void printNodeWhiteSpace(PrintStream&, Node*);
 
index 7cc34ae..5b449be 100644 (file)
@@ -326,7 +326,7 @@ bool InPlaceAbstractState::endBasicBlock()
 
 void InPlaceAbstractState::reset()
 {
-    m_block = 0;
+    m_block = nullptr;
     m_isValid = false;
     m_branchDirection = InvalidBranchDirection;
     m_structureClobberState = StructuresAreWatched;
index 9018fa9..1ca9c51 100644 (file)
@@ -61,7 +61,7 @@ public:
             RangeKey result;
             result.m_kind = Addition;
             result.m_source = edge.sanitized();
-            result.m_key = 0;
+            result.m_key = nullptr;
             return result;
         }
         
index 01f42f8..2c4c611 100644 (file)
@@ -286,7 +286,7 @@ void LazyJSValue::dumpInContext(PrintStream& out, DumpContext* context) const
 
 void LazyJSValue::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 
 } } // namespace JSC::DFG
index ff38ced..d0aca01 100644 (file)
@@ -136,7 +136,7 @@ static_assert(sizeof(DataViewData) == sizeof(uint64_t), "");
 
 struct BranchTarget {
     BranchTarget()
-        : block(0)
+        : block(nullptr)
         , count(PNaN)
     {
     }
@@ -994,7 +994,7 @@ public:
     {
         VariableAccessData* result = m_opInfo.as<VariableAccessData*>();
         if (!result)
-            return 0;
+            return nullptr;
         return result->find();
     }
     
@@ -3306,7 +3306,7 @@ CString nodeListDump(const T& nodeList)
 }
 
 template<typename T>
-CString nodeMapDump(const T& nodeMap, DumpContext* context = 0)
+CString nodeMapDump(const T& nodeMap, DumpContext* context = nullptr)
 {
     Vector<typename T::KeyType> keys;
     for (
@@ -3322,7 +3322,7 @@ CString nodeMapDump(const T& nodeMap, DumpContext* context = 0)
 }
 
 template<typename T>
-CString nodeValuePairListDump(const T& nodeValuePairList, DumpContext* context = 0)
+CString nodeValuePairListDump(const T& nodeValuePairList, DumpContext* context = nullptr)
 {
     using V = typename T::ValueType;
     T sortedList = nodeValuePairList;
index 6096866..7dd6c51 100644 (file)
@@ -59,7 +59,7 @@ public:
         
         CodeBlock* baseline = m_graph.m_profiledBlock;
         
-        BasicBlock* target = 0;
+        BasicBlock* target = nullptr;
         for (unsigned blockIndex = m_graph.numBlocks(); blockIndex--;) {
             BasicBlock* block = m_graph.block(blockIndex);
             if (!block)
index 325f174..6df3562 100644 (file)
@@ -174,7 +174,7 @@ void JIT_OPERATION operationCompileOSRExit(CallFrame* callFrame)
     Operands<ValueRecovery> operands;
     codeBlock->jitCode()->dfg()->variableEventStream.reconstruct(codeBlock, exit.m_codeOrigin, codeBlock->jitCode()->dfg()->minifiedDFG, exit.m_streamIndex, operands);
 
-    SpeculationRecovery* recovery = 0;
+    SpeculationRecovery* recovery = nullptr;
     if (exit.m_recoveryIndex != UINT_MAX)
         recovery = &codeBlock->jitCode()->dfg()->speculationRecovery[exit.m_recoveryIndex];
 
@@ -457,7 +457,7 @@ void OSRExit::compileExit(CCallHelpers& jit, VM& vm, const OSRExit& exit, const
     // Save all state from GPRs into the scratch buffer.
 
     ScratchBuffer* scratchBuffer = vm.scratchBufferForSize(sizeof(EncodedJSValue) * operands.size());
-    EncodedJSValue* scratch = scratchBuffer ? static_cast<EncodedJSValue*>(scratchBuffer->dataBuffer()) : 0;
+    EncodedJSValue* scratch = scratchBuffer ? static_cast<EncodedJSValue*>(scratchBuffer->dataBuffer()) : nullptr;
 
     for (size_t index = 0; index < operands.size(); ++index) {
         const ValueRecovery& recovery = operands[index];
index 7b3e197..c16f1fc 100644 (file)
@@ -204,7 +204,7 @@ char* newTypedArrayWithSize(JSGlobalObject* globalObject, VM& vm, Structure* str
 
     if (size < 0) {
         throwException(globalObject, scope, createRangeError(globalObject, "Requested length is negative"_s));
-        return 0;
+        return nullptr;
     }
     
     if (vector)
@@ -2185,7 +2185,7 @@ char* JIT_OPERATION operationAllocateSimplePropertyStorageWithInitialCapacity(VM
     JITOperationPrologueCallFrameTracer tracer(vm, callFrame);
 
     return reinterpret_cast<char*>(
-        Butterfly::createUninitialized(vm, 0, 0, initialOutOfLineCapacity, false, 0));
+        Butterfly::createUninitialized(vm, nullptr, 0, initialOutOfLineCapacity, false, 0));
 }
 
 char* JIT_OPERATION operationAllocateSimplePropertyStorage(VM* vmPointer, size_t newSize)
@@ -2195,7 +2195,7 @@ char* JIT_OPERATION operationAllocateSimplePropertyStorage(VM* vmPointer, size_t
     JITOperationPrologueCallFrameTracer tracer(vm, callFrame);
 
     return reinterpret_cast<char*>(
-        Butterfly::createUninitialized(vm, 0, 0, newSize, false, 0));
+        Butterfly::createUninitialized(vm, nullptr, 0, newSize, false, 0));
 }
 
 char* JIT_OPERATION operationAllocateComplexPropertyStorageWithInitialCapacity(VM* vmPointer, JSObject* object)
@@ -2226,7 +2226,7 @@ char* JIT_OPERATION operationEnsureInt32(VM* vmPointer, JSCell* cell)
     JITOperationPrologueCallFrameTracer tracer(vm, callFrame);
     
     if (!cell->isObject())
-        return 0;
+        return nullptr;
 
     auto* result = reinterpret_cast<char*>(asObject(cell)->tryMakeWritableInt32(vm).data());
     ASSERT((!isCopyOnWrite(asObject(cell)->indexingMode()) && hasInt32(cell->indexingMode())) || !result);
@@ -2240,7 +2240,7 @@ char* JIT_OPERATION operationEnsureDouble(VM* vmPointer, JSCell* cell)
     JITOperationPrologueCallFrameTracer tracer(vm, callFrame);
     
     if (!cell->isObject())
-        return 0;
+        return nullptr;
 
     auto* result = reinterpret_cast<char*>(asObject(cell)->tryMakeWritableDouble(vm).data());
     ASSERT((!isCopyOnWrite(asObject(cell)->indexingMode()) && hasDouble(cell->indexingMode())) || !result);
@@ -2254,7 +2254,7 @@ char* JIT_OPERATION operationEnsureContiguous(VM* vmPointer, JSCell* cell)
     JITOperationPrologueCallFrameTracer tracer(vm, callFrame);
     
     if (!cell->isObject())
-        return 0;
+        return nullptr;
     
     auto* result = reinterpret_cast<char*>(asObject(cell)->tryMakeWritableContiguous(vm).data());
     ASSERT((!isCopyOnWrite(asObject(cell)->indexingMode()) && hasContiguous(cell->indexingMode())) || !result);
@@ -2268,7 +2268,7 @@ char* JIT_OPERATION operationEnsureArrayStorage(VM* vmPointer, JSCell* cell)
     JITOperationPrologueCallFrameTracer tracer(vm, callFrame);
     
     if (!cell->isObject())
-        return 0;
+        return nullptr;
 
     auto* result = reinterpret_cast<char*>(asObject(cell)->ensureArrayStorage(vm));
     ASSERT((!isCopyOnWrite(asObject(cell)->indexingMode()) && hasAnyArrayStorage(cell->indexingMode())) || !result);
index 800b573..fab0f87 100644 (file)
@@ -77,7 +77,7 @@ public:
         : m_spillAction(DoNothingForSpill)
         , m_fillAction(DoNothingForFill)
         , m_register(-1)
-        , m_node(0)
+        , m_node(nullptr)
     {
     }
     
index fa28f39..81ceefc 100644 (file)
@@ -80,7 +80,7 @@ DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(SpeculativeJIT);
 SpeculativeJIT::SpeculativeJIT(JITCompiler& jit)
     : m_jit(jit)
     , m_graph(m_jit.graph())
-    , m_currentNode(0)
+    , m_currentNode(nullptr)
     , m_lastGeneratedNode(LastNodeType)
     , m_indexInBlock(0)
     , m_generationInfo(m_jit.graph().frameRegisterCount())
@@ -884,7 +884,7 @@ void SpeculativeJIT::checkArray(Node* node)
     case Array::SlowPutArrayStorage: {
         m_jit.load8(MacroAssembler::Address(baseReg, JSCell::indexingTypeAndMiscOffset()), tempGPR.value());
         speculationCheck(
-            BadIndexingType, JSValueSource::unboxedCell(baseReg), 0,
+            BadIndexingType, JSValueSource::unboxedCell(baseReg), nullptr,
             jumpSlowForUnwantedArrayMode(tempGPR.value(), node->arrayMode()));
         break;
     }
@@ -1263,7 +1263,7 @@ void SpeculativeJIT::dump(const char* label)
 }
 
 GPRTemporary::GPRTemporary()
-    : m_jit(0)
+    : m_jit(nullptr)
     , m_gpr(InvalidGPRReg)
 {
 }
@@ -1369,7 +1369,7 @@ void GPRTemporary::adopt(GPRTemporary& other)
     ASSERT(other.m_gpr != InvalidGPRReg);
     m_jit = other.m_jit;
     m_gpr = other.m_gpr;
-    other.m_jit = 0;
+    other.m_jit = nullptr;
     other.m_gpr = InvalidGPRReg;
 }
 
@@ -2143,7 +2143,7 @@ void SpeculativeJIT::compileDoublePutByVal(Node* node, SpeculateCellOperand& bas
     
     if (arrayMode.isInBounds()) {
         speculationCheck(
-            OutOfBounds, JSValueRegs(), 0,
+            OutOfBounds, JSValueRegs(), nullptr,
             m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfPublicLength())));
     } else {
         MacroAssembler::Jump inBounds = m_jit.branch32(MacroAssembler::Below, propertyReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfPublicLength()));
@@ -2151,7 +2151,7 @@ void SpeculativeJIT::compileDoublePutByVal(Node* node, SpeculateCellOperand& bas
         slowCase = m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfVectorLength()));
         
         if (!arrayMode.isOutOfBounds())
-            speculationCheck(OutOfBounds, JSValueRegs(), 0, slowCase);
+            speculationCheck(OutOfBounds, JSValueRegs(), nullptr, slowCase);
         
         m_jit.add32(TrustedImm32(1), propertyReg, temporaryReg);
         m_jit.store32(temporaryReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfPublicLength()));
@@ -2197,7 +2197,7 @@ void SpeculativeJIT::compileGetCharCodeAt(Node* node)
     m_jit.loadPtr(MacroAssembler::Address(stringReg, JSString::offsetOfValue()), scratchReg);
     
     // unsigned comparison so we can filter out negative indices and indices that are too large
-    speculationCheck(Uncountable, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::AboveOrEqual, indexReg, CCallHelpers::Address(scratchReg, StringImpl::lengthMemoryOffset())));
+    speculationCheck(Uncountable, JSValueRegs(), nullptr, m_jit.branch32(MacroAssembler::AboveOrEqual, indexReg, CCallHelpers::Address(scratchReg, StringImpl::lengthMemoryOffset())));
 
     // Load the character into scratchReg
     JITCompiler::Jump is16Bit = m_jit.branchTest32(MacroAssembler::Zero, MacroAssembler::Address(scratchReg, StringImpl::flagsOffset()), TrustedImm32(StringImpl::flagIs8Bit()));
@@ -2243,7 +2243,7 @@ void SpeculativeJIT::compileGetByValOnString(Node* node)
         MacroAssembler::AboveOrEqual, propertyReg,
         MacroAssembler::Address(scratchReg, StringImpl::lengthMemoryOffset()));
     if (node->arrayMode().isInBounds())
-        speculationCheck(OutOfBounds, JSValueRegs(), 0, outOfBounds);
+        speculationCheck(OutOfBounds, JSValueRegs(), nullptr, outOfBounds);
 
     // Load the character into scratchReg
     JITCompiler::Jump is16Bit = m_jit.branchTest32(MacroAssembler::Zero, MacroAssembler::Address(scratchReg, StringImpl::flagsOffset()), TrustedImm32(StringImpl::flagIs8Bit()));
@@ -2365,7 +2365,7 @@ GeneratedOperandType SpeculativeJIT::checkGeneratedTypeForToInt32(Node* node)
 
     case DataFormatBoolean:
     case DataFormatCell:
-        terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
+        terminateSpeculativeExecution(Uncountable, JSValueRegs(), nullptr);
         return GeneratedOperandTypeUnknown;
 
     case DataFormatNone:
@@ -2594,7 +2594,7 @@ void SpeculativeJIT::compileUInt32ToNumber(Node* node)
 
     m_jit.move(op1.gpr(), result.gpr());
 
-    speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::LessThan, result.gpr(), TrustedImm32(0)));
+    speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branch32(MacroAssembler::LessThan, result.gpr(), TrustedImm32(0)));
 
     strictInt32Result(result.gpr(), node, op1.format());
 }
@@ -2614,7 +2614,7 @@ void SpeculativeJIT::compileDoubleAsInt32(Node* node)
     m_jit.branchConvertDoubleToInt32(
         valueFPR, resultGPR, failureCases, scratchFPR,
         shouldCheckNegativeZero(node->arithMode()));
-    speculationCheck(Overflow, JSValueRegs(), 0, failureCases);
+    speculationCheck(Overflow, JSValueRegs(), nullptr, failureCases);
 
     strictInt32Result(resultGPR, node);
 }
@@ -2907,7 +2907,7 @@ void SpeculativeJIT::emitTypedArrayBoundsCheck(Node* node, GPRReg baseGPR, GPRRe
     JITCompiler::Jump jump = jumpForTypedArrayOutOfBounds(node, baseGPR, indexGPR);
     if (!jump.isSet())
         return;
-    speculationCheck(OutOfBounds, JSValueRegs(), 0, jump);
+    speculationCheck(OutOfBounds, JSValueRegs(), nullptr, jump);
 }
 
 JITCompiler::Jump SpeculativeJIT::jumpForTypedArrayIsNeuteredIfOutOfBounds(Node* node, GPRReg base, JITCompiler::Jump outOfBounds)
@@ -2916,7 +2916,7 @@ JITCompiler::Jump SpeculativeJIT::jumpForTypedArrayIsNeuteredIfOutOfBounds(Node*
     if (outOfBounds.isSet()) {
         done = m_jit.jump();
         if (node->arrayMode().isInBounds())
-            speculationCheck(OutOfBounds, JSValueSource(), 0, outOfBounds);
+            speculationCheck(OutOfBounds, JSValueSource(), nullptr, outOfBounds);
         else {
             outOfBounds.link(&m_jit);
 
@@ -2979,7 +2979,7 @@ void SpeculativeJIT::setIntTypedArrayLoadResult(Node* node, GPRReg resultReg, Ty
     
     ASSERT(elementSize(type) == 4 && !isSigned(type));
     if (node->shouldSpeculateInt32() && canSpeculate) {
-        speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::LessThan, resultReg, TrustedImm32(0)));
+        speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branch32(MacroAssembler::LessThan, resultReg, TrustedImm32(0)));
         strictInt32Result(resultReg, node);
         return;
     }
@@ -3042,7 +3042,7 @@ bool SpeculativeJIT::getIntTypedArrayStoreOperand(
     if (isAppropriateConstant) {
         JSValue jsValue = valueUse->asJSValue();
         if (!jsValue.isNumber()) {
-            terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
+            terminateSpeculativeExecution(Uncountable, JSValueRegs(), nullptr);
             return false;
         }
         double d = jsValue.asNumber();
@@ -3407,7 +3407,7 @@ void SpeculativeJIT::compileCheckTypeInfoFlags(Node* node)
     // FIXME: This only works for checking if a single bit is set. If we want to check more
     // than one bit at once, we'll need to fix this:
     // https://bugs.webkit.org/show_bug.cgi?id=185705
-    speculationCheck(BadTypeInfoFlags, JSValueRegs(), 0, m_jit.branchTest8(MacroAssembler::Zero, MacroAssembler::Address(baseGPR, JSCell::typeInfoFlagsOffset()), MacroAssembler::TrustedImm32(node->typeInfoOperand())));
+    speculationCheck(BadTypeInfoFlags, JSValueRegs(), nullptr, m_jit.branchTest8(MacroAssembler::Zero, MacroAssembler::Address(baseGPR, JSCell::typeInfoFlagsOffset()), MacroAssembler::TrustedImm32(node->typeInfoOperand())));
 
     noResult(node);
 }
@@ -4088,7 +4088,7 @@ void SpeculativeJIT::compileValueAdd(Node* node)
 
         MacroAssembler::Jump check = m_jit.branchAdd32(MacroAssembler::Overflow, resultGPR, tempGPR, resultGPR);
 
-        speculationCheck(BigInt32Overflow, JSValueRegs(), 0, check);
+        speculationCheck(BigInt32Overflow, JSValueRegs(), nullptr, check);
 
         m_jit.boxBigInt32(resultGPR);
         jsValueResult(resultGPR, node);
@@ -4195,7 +4195,7 @@ void SpeculativeJIT::compileValueSub(Node* node)
 
         MacroAssembler::Jump check = m_jit.branchSub32(MacroAssembler::Overflow, resultGPR, tempGPR, resultGPR);
 
-        speculationCheck(BigInt32Overflow, JSValueRegs(), 0, check);
+        speculationCheck(BigInt32Overflow, JSValueRegs(), nullptr, check);
 
         m_jit.boxBigInt32(resultGPR);
         jsValueResult(resultGPR, node);
@@ -4554,10 +4554,10 @@ void SpeculativeJIT::compileArithAdd(Node* node)
 
             MacroAssembler::Jump check = m_jit.branchAdd32(MacroAssembler::Overflow, gpr1, Imm32(imm2), gprResult);
             if (gpr1 == gprResult) {
-                speculationCheck(Overflow, JSValueRegs(), 0, check,
+                speculationCheck(Overflow, JSValueRegs(), nullptr, check,
                     SpeculationRecovery(SpeculativeAddImmediate, gpr1, imm2));
             } else
-                speculationCheck(Overflow, JSValueRegs(), 0, check);
+                speculationCheck(Overflow, JSValueRegs(), nullptr, check);
 
             strictInt32Result(gprResult, node);
             return;
@@ -4577,13 +4577,13 @@ void SpeculativeJIT::compileArithAdd(Node* node)
             MacroAssembler::Jump check = m_jit.branchAdd32(MacroAssembler::Overflow, gpr1, gpr2, gprResult);
                 
             if (gpr1 == gprResult && gpr2 == gprResult)
-                speculationCheck(Overflow, JSValueRegs(), 0, check, SpeculationRecovery(SpeculativeAddSelf, gprResult, gpr2));
+                speculationCheck(Overflow, JSValueRegs(), nullptr, check, SpeculationRecovery(SpeculativeAddSelf, gprResult, gpr2));
             else if (gpr1 == gprResult)
-                speculationCheck(Overflow, JSValueRegs(), 0, check, SpeculationRecovery(SpeculativeAdd, gprResult, gpr2));
+                speculationCheck(Overflow, JSValueRegs(), nullptr, check, SpeculationRecovery(SpeculativeAdd, gprResult, gpr2));
             else if (gpr2 == gprResult)
-                speculationCheck(Overflow, JSValueRegs(), 0, check, SpeculationRecovery(SpeculativeAdd, gprResult, gpr1));
+                speculationCheck(Overflow, JSValueRegs(), nullptr, check, SpeculationRecovery(SpeculativeAdd, gprResult, gpr1));
             else
-                speculationCheck(Overflow, JSValueRegs(), 0, check);
+                speculationCheck(Overflow, JSValueRegs(), nullptr, check);
         }
 
         strictInt32Result(gprResult, node);
@@ -4612,7 +4612,7 @@ void SpeculativeJIT::compileArithAdd(Node* node)
         GPRTemporary result(this);
         m_jit.move(op1.gpr(), result.gpr());
         speculationCheck(
-            Int52Overflow, JSValueRegs(), 0,
+            Int52Overflow, JSValueRegs(), nullptr,
             m_jit.branchAdd64(MacroAssembler::Overflow, op2.gpr(), result.gpr()));
         int52Result(result.gpr(), node);
         return;
@@ -4651,7 +4651,7 @@ void SpeculativeJIT::compileArithAbs(Node* node)
         m_jit.add32(scratch.gpr(), result.gpr());
         m_jit.xor32(scratch.gpr(), result.gpr());
         if (shouldCheckOverflow(node->arithMode()))
-            speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branchTest32(MacroAssembler::Signed, result.gpr()));
+            speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branchTest32(MacroAssembler::Signed, result.gpr()));
         strictInt32Result(result.gpr(), node);
         break;
     }
@@ -4740,7 +4740,7 @@ void SpeculativeJIT::compileArithSub(Node* node)
                 m_jit.sub32(Imm32(imm2), result.gpr());
             } else {
                 GPRTemporary scratch(this);
-                speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branchSub32(MacroAssembler::Overflow, op1.gpr(), Imm32(imm2), result.gpr(), scratch.gpr()));
+                speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branchSub32(MacroAssembler::Overflow, op1.gpr(), Imm32(imm2), result.gpr(), scratch.gpr()));
             }
 
             strictInt32Result(result.gpr(), node);
@@ -4756,7 +4756,7 @@ void SpeculativeJIT::compileArithSub(Node* node)
             if (!shouldCheckOverflow(node->arithMode()))
                 m_jit.sub32(op2.gpr(), result.gpr());
             else
-                speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branchSub32(MacroAssembler::Overflow, op2.gpr(), result.gpr()));
+                speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branchSub32(MacroAssembler::Overflow, op2.gpr(), result.gpr()));
                 
             strictInt32Result(result.gpr(), node);
             return;
@@ -4770,7 +4770,7 @@ void SpeculativeJIT::compileArithSub(Node* node)
             m_jit.move(op1.gpr(), result.gpr());
             m_jit.sub32(op2.gpr(), result.gpr());
         } else
-            speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branchSub32(MacroAssembler::Overflow, op1.gpr(), op2.gpr(), result.gpr()));
+            speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branchSub32(MacroAssembler::Overflow, op1.gpr(), op2.gpr(), result.gpr()));
 
         strictInt32Result(result.gpr(), node);
         return;
@@ -4799,7 +4799,7 @@ void SpeculativeJIT::compileArithSub(Node* node)
         GPRTemporary result(this);
         m_jit.move(op1.gpr(), result.gpr());
         speculationCheck(
-            Int52Overflow, JSValueRegs(), 0,
+            Int52Overflow, JSValueRegs(), nullptr,
             m_jit.branchSub64(MacroAssembler::Overflow, op2.gpr(), result.gpr()));
         int52Result(result.gpr(), node);
         return;
@@ -4869,9 +4869,9 @@ void SpeculativeJIT::compileArithNegate(Node* node)
         if (!shouldCheckOverflow(node->arithMode()))
             m_jit.neg32(result.gpr());
         else if (!shouldCheckNegativeZero(node->arithMode()))
-            speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branchNeg32(MacroAssembler::Overflow, result.gpr()));
+            speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branchNeg32(MacroAssembler::Overflow, result.gpr()));
         else {
-            speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branchTest32(MacroAssembler::Zero, result.gpr(), TrustedImm32(0x7fffffff)));
+            speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branchTest32(MacroAssembler::Zero, result.gpr(), TrustedImm32(0x7fffffff)));
             m_jit.neg32(result.gpr());
         }
 
@@ -4892,7 +4892,7 @@ void SpeculativeJIT::compileArithNegate(Node* node)
             m_jit.neg64(resultGPR);
             if (shouldCheckNegativeZero(node->arithMode())) {
                 speculationCheck(
-                    NegativeZero, JSValueRegs(), 0,
+                    NegativeZero, JSValueRegs(), nullptr,
                     m_jit.branchTest64(MacroAssembler::Zero, resultGPR));
             }
             int52Result(resultGPR, node, op1.format());
@@ -4905,11 +4905,11 @@ void SpeculativeJIT::compileArithNegate(Node* node)
         GPRReg resultGPR = result.gpr();
         m_jit.move(op1GPR, resultGPR);
         speculationCheck(
-            Int52Overflow, JSValueRegs(), 0,
+            Int52Overflow, JSValueRegs(), nullptr,
             m_jit.branchNeg64(MacroAssembler::Overflow, resultGPR));
         if (shouldCheckNegativeZero(node->arithMode())) {
             speculationCheck(
-                NegativeZero, JSValueRegs(), 0,
+                NegativeZero, JSValueRegs(), nullptr,
                 m_jit.branchTest64(MacroAssembler::Zero, resultGPR));
         }
         int52Result(resultGPR, node);
@@ -5046,7 +5046,7 @@ void SpeculativeJIT::compileValueMul(Node* node)
 
         MacroAssembler::Jump check = m_jit.branchMul32(MacroAssembler::Overflow, resultGPR, tempGPR, resultGPR);
 
-        speculationCheck(BigInt32Overflow, JSValueRegs(), 0, check);
+        speculationCheck(BigInt32Overflow, JSValueRegs(), nullptr, check);
 
         m_jit.boxBigInt32(resultGPR);
         jsValueResult(resultGPR, node);
@@ -5125,7 +5125,7 @@ void SpeculativeJIT::compileArithMul(Node* node)
             if (!shouldCheckOverflow(node->arithMode()))
                 m_jit.mul32(Imm32(imm), op1GPR, resultGPR);
             else {
-                speculationCheck(Overflow, JSValueRegs(), 0,
+                speculationCheck(Overflow, JSValueRegs(), nullptr,
                     m_jit.branchMul32(MacroAssembler::Overflow, op1GPR, Imm32(imm), resultGPR));
             }
 
@@ -5134,12 +5134,12 @@ void SpeculativeJIT::compileArithMul(Node* node)
             // -zero-op1 * negative constant.
             if (shouldCheckNegativeZero(node->arithMode())) {
                 if (!imm)
-                    speculationCheck(NegativeZero, JSValueRegs(), 0, m_jit.branchTest32(MacroAssembler::Signed, op1GPR));
+                    speculationCheck(NegativeZero, JSValueRegs(), nullptr, m_jit.branchTest32(MacroAssembler::Signed, op1GPR));
                 else if (imm < 0) {
                     if (shouldCheckOverflow(node->arithMode()))
-                        speculationCheck(NegativeZero, JSValueRegs(), 0, m_jit.branchTest32(MacroAssembler::Zero, resultGPR));
+                        speculationCheck(NegativeZero, JSValueRegs(), nullptr, m_jit.branchTest32(MacroAssembler::Zero, resultGPR));
                     else
-                        speculationCheck(NegativeZero, JSValueRegs(), 0, m_jit.branchTest32(MacroAssembler::Zero, op1GPR));
+                        speculationCheck(NegativeZero, JSValueRegs(), nullptr, m_jit.branchTest32(MacroAssembler::Zero, op1GPR));
                 }
             }
 
@@ -5160,15 +5160,15 @@ void SpeculativeJIT::compileArithMul(Node* node)
             m_jit.mul32(reg1, reg2, result.gpr());
         else {
             speculationCheck(
-                Overflow, JSValueRegs(), 0,
+                Overflow, JSValueRegs(), nullptr,
                 m_jit.branchMul32(MacroAssembler::Overflow, reg1, reg2, result.gpr()));
         }
             
         // Check for negative zero, if the users of this node care about such things.
         if (shouldCheckNegativeZero(node->arithMode())) {
             MacroAssembler::Jump resultNonZero = m_jit.branchTest32(MacroAssembler::NonZero, result.gpr());
-            speculationCheck(NegativeZero, JSValueRegs(), 0, m_jit.branchTest32(MacroAssembler::Signed, reg1));
-            speculationCheck(NegativeZero, JSValueRegs(), 0, m_jit.branchTest32(MacroAssembler::Signed, reg2));
+            speculationCheck(NegativeZero, JSValueRegs(), nullptr, m_jit.branchTest32(MacroAssembler::Signed, reg1));
+            speculationCheck(NegativeZero, JSValueRegs(), nullptr, m_jit.branchTest32(MacroAssembler::Signed, reg2));
             resultNonZero.link(&m_jit);
         }
 
@@ -5214,17 +5214,17 @@ void SpeculativeJIT::compileArithMul(Node* node)
         
         m_jit.move(op1GPR, resultGPR);
         speculationCheck(
-            Int52Overflow, JSValueRegs(), 0,
+            Int52Overflow, JSValueRegs(), nullptr,
             m_jit.branchMul64(MacroAssembler::Overflow, op2GPR, resultGPR));
         
         if (shouldCheckNegativeZero(node->arithMode())) {
             MacroAssembler::Jump resultNonZero = m_jit.branchTest64(
                 MacroAssembler::NonZero, resultGPR);
             speculationCheck(
-                NegativeZero, JSValueRegs(), 0,
+                NegativeZero, JSValueRegs(), nullptr,
                 m_jit.branch64(MacroAssembler::LessThan, op1GPR, TrustedImm32(0)));
             speculationCheck(
-                NegativeZero, JSValueRegs(), 0,
+                NegativeZero, JSValueRegs(), nullptr,
                 m_jit.branch64(MacroAssembler::LessThan, op2GPR, TrustedImm32(0)));
             resultNonZero.link(&m_jit);
         }
@@ -5420,8 +5420,8 @@ void SpeculativeJIT::compileArithDiv(Node* node)
     
         JITCompiler::JumpList done;
         if (shouldCheckOverflow(node->arithMode())) {
-            speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branchTest32(JITCompiler::Zero, op2GPR));
-            speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branch32(JITCompiler::Equal, op1GPR, TrustedImm32(-2147483647-1)));
+            speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branchTest32(JITCompiler::Zero, op2GPR));
+            speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branch32(JITCompiler::Equal, op1GPR, TrustedImm32(-2147483647-1)));
         } else {
             // This is the case where we convert the result to an int after we're done, and we
             // already know that the denominator is either -1 or 0. So, if the denominator is
@@ -5449,7 +5449,7 @@ void SpeculativeJIT::compileArithDiv(Node* node)
         // to produce negative zero.
         if (shouldCheckNegativeZero(node->arithMode())) {
             MacroAssembler::Jump numeratorNonZero = m_jit.branchTest32(MacroAssembler::NonZero, op1GPR);
-            speculationCheck(NegativeZero, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::LessThan, op2GPR, TrustedImm32(0)));
+            speculationCheck(NegativeZero, JSValueRegs(), nullptr, m_jit.branch32(MacroAssembler::LessThan, op2GPR, TrustedImm32(0)));
             numeratorNonZero.link(&m_jit);
         }
     
@@ -5468,7 +5468,7 @@ void SpeculativeJIT::compileArithDiv(Node* node)
         // Check that there was no remainder. If there had been, then we'd be obligated to
         // produce a double result instead.
         if (shouldCheckOverflow(node->arithMode()))
-            speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branchTest32(JITCompiler::NonZero, edx.gpr()));
+            speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branchTest32(JITCompiler::NonZero, edx.gpr()));
         
         done.link(&m_jit);
         strictInt32Result(eax.gpr(), node);
@@ -5648,7 +5648,7 @@ void SpeculativeJIT::compileArithMod(Node* node)
                 if (shouldCheckNegativeZero(node->arithMode())) {
                     // Check that we're not about to create negative zero.
                     JITCompiler::Jump numeratorPositive = m_jit.branch32(JITCompiler::GreaterThanOrEqual, dividendGPR, TrustedImm32(0));
-                    speculationCheck(NegativeZero, JSValueRegs(), 0, m_jit.branchTest32(JITCompiler::Zero, resultGPR));
+                    speculationCheck(NegativeZero, JSValueRegs(), nullptr, m_jit.branchTest32(JITCompiler::Zero, resultGPR));
                     numeratorPositive.link(&m_jit);
                 }
 
@@ -5684,7 +5684,7 @@ void SpeculativeJIT::compileArithMod(Node* node)
                 m_jit.x86Div32(scratchGPR);
                 if (shouldCheckNegativeZero(node->arithMode())) {
                     JITCompiler::Jump numeratorPositive = m_jit.branch32(JITCompiler::GreaterThanOrEqual, op1SaveGPR, TrustedImm32(0));
-                    speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branchTest32(JITCompiler::Zero, edx.gpr()));
+                    speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branchTest32(JITCompiler::Zero, edx.gpr()));
                     numeratorPositive.link(&m_jit);
                 }
             
@@ -5740,8 +5740,8 @@ void SpeculativeJIT::compileArithMod(Node* node)
         // FIXME: -2^31 / -1 will actually yield negative zero, so we could have a
         // separate case for that. But it probably doesn't matter so much.
         if (shouldCheckOverflow(node->arithMode())) {
-            speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branchTest32(JITCompiler::Zero, op2GPR));
-            speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branch32(JITCompiler::Equal, op1GPR, TrustedImm32(-2147483647-1)));
+            speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branchTest32(JITCompiler::Zero, op2GPR));
+            speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branch32(JITCompiler::Equal, op1GPR, TrustedImm32(-2147483647-1)));
         } else {
             // This is the case where we convert the result to an int after we're done, and we
             // already know that the denominator is either -1 or 0. So, if the denominator is
@@ -5780,7 +5780,7 @@ void SpeculativeJIT::compileArithMod(Node* node)
         // Check that we're not about to create negative zero.
         if (shouldCheckNegativeZero(node->arithMode())) {
             JITCompiler::Jump numeratorPositive = m_jit.branch32(JITCompiler::GreaterThanOrEqual, op1SaveGPR, TrustedImm32(0));
-            speculationCheck(Overflow, JSValueRegs(), 0, m_jit.branchTest32(JITCompiler::Zero, edx.gpr()));
+            speculationCheck(Overflow, JSValueRegs(), nullptr, m_jit.branchTest32(JITCompiler::Zero, edx.gpr()));
             numeratorPositive.link(&m_jit);
         }
     
@@ -7246,7 +7246,7 @@ void SpeculativeJIT::compileGetByValOnDirectArguments(Node* node)
     ASSERT(ArrayMode(Array::DirectArguments, Array::Read).alreadyChecked(m_jit.graph(), node, m_state.forNode(m_graph.varArgChild(node, 0))));
     
     speculationCheck(
-        ExoticObjectMode, JSValueSource(), 0,
+        ExoticObjectMode, JSValueSource(), nullptr,
         m_jit.branchTestPtr(
             MacroAssembler::NonZero,
             MacroAssembler::Address(baseReg, DirectArguments::offsetOfMappedArguments())));
@@ -7254,7 +7254,7 @@ void SpeculativeJIT::compileGetByValOnDirectArguments(Node* node)
     m_jit.load32(CCallHelpers::Address(baseReg, DirectArguments::offsetOfLength()), scratchReg);
     auto isOutOfBounds = m_jit.branch32(CCallHelpers::AboveOrEqual, propertyReg, scratchReg);
     if (node->arrayMode().isInBounds())
-        speculationCheck(OutOfBounds, JSValueSource(), 0, isOutOfBounds);
+        speculationCheck(OutOfBounds, JSValueSource(), nullptr, isOutOfBounds);
     
     m_jit.loadValue(
         MacroAssembler::BaseIndex(
@@ -7413,7 +7413,7 @@ void SpeculativeJIT::compileGetArrayLength(Node* node)
         GPRReg resultReg = result.gpr();
         m_jit.load32(MacroAssembler::Address(storageReg, Butterfly::offsetOfPublicLength()), resultReg);
             
-        speculationCheck(Uncountable, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::LessThan, resultReg, MacroAssembler::TrustedImm32(0)));
+        speculationCheck(Uncountable, JSValueRegs(), nullptr, m_jit.branch32(MacroAssembler::LessThan, resultReg, MacroAssembler::TrustedImm32(0)));
             
         strictInt32Result(resultReg, node);
         break;
@@ -7457,7 +7457,7 @@ void SpeculativeJIT::compileGetArrayLength(Node* node)
         ASSERT(ArrayMode(Array::DirectArguments, Array::Read).alreadyChecked(m_jit.graph(), node, m_state.forNode(node->child1())));
         
         speculationCheck(
-            ExoticObjectMode, JSValueSource(), 0,
+            ExoticObjectMode, JSValueSource(), nullptr,
             m_jit.branchTestPtr(
                 MacroAssembler::NonZero,
                 MacroAssembler::Address(baseReg, DirectArguments::offsetOfMappedArguments())));
@@ -7481,7 +7481,7 @@ void SpeculativeJIT::compileGetArrayLength(Node* node)
         ASSERT(ArrayMode(Array::ScopedArguments, Array::Read).alreadyChecked(m_jit.graph(), node, m_state.forNode(node->child1())));
         
         speculationCheck(
-            ExoticObjectMode, JSValueSource(), 0,
+            ExoticObjectMode, JSValueSource(), nullptr,
             m_jit.branchTest8(
                 MacroAssembler::NonZero,
                 MacroAssembler::Address(baseReg, ScopedArguments::offsetOfOverrodeThings())));
@@ -9259,7 +9259,7 @@ void SpeculativeJIT::compileArrayPush(Node* node)
             m_jit.load32(MacroAssembler::Address(storageGPR, ArrayStorage::lengthOffset()), storageLengthGPR);
 
             // Refuse to handle bizarre lengths.
-            speculationCheck(Uncountable, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::Above, storageLengthGPR, TrustedImm32(largestPositiveInt32Length)));
+            speculationCheck(Uncountable, JSValueRegs(), nullptr, m_jit.branch32(MacroAssembler::Above, storageLengthGPR, TrustedImm32(largestPositiveInt32Length)));
 
             MacroAssembler::Jump slowPath = m_jit.branch32(MacroAssembler::AboveOrEqual, storageLengthGPR, MacroAssembler::Address(storageGPR, ArrayStorage::vectorLengthOffset()));
 
@@ -9283,7 +9283,7 @@ void SpeculativeJIT::compileArrayPush(Node* node)
         m_jit.load32(MacroAssembler::Address(storageGPR, ArrayStorage::lengthOffset()), storageLengthGPR);
 
         // Refuse to handle bizarre lengths.
-        speculationCheck(Uncountable, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::Above, storageLengthGPR, TrustedImm32(largestPositiveInt32Length)));
+        speculationCheck(Uncountable, JSValueRegs(), nullptr, m_jit.branch32(MacroAssembler::Above, storageLengthGPR, TrustedImm32(largestPositiveInt32Length)));
 
         m_jit.move(storageLengthGPR, bufferGPR);
         m_jit.add32(TrustedImm32(elementCount), bufferGPR);
@@ -9491,7 +9491,7 @@ void SpeculativeJIT::emitStructureCheck(Node* node, GPRReg cellGPR, GPRReg tempG
     
     if (node->structureSet().size() == 1) {
         speculationCheck(
-            BadCache, JSValueSource::unboxedCell(cellGPR), 0,
+            BadCache, JSValueSource::unboxedCell(cellGPR), nullptr,
             m_jit.branchWeakStructure(
                 JITCompiler::NotEqual,
                 JITCompiler::Address(cellGPR, JSCell::structureIDOffset()),
@@ -9516,7 +9516,7 @@ void SpeculativeJIT::emitStructureCheck(Node* node, GPRReg cellGPR, GPRReg tempG
         }
         
         speculationCheck(
-            BadCache, JSValueSource::unboxedCell(cellGPR), 0,
+            BadCache, JSValueSource::unboxedCell(cellGPR), nullptr,
             m_jit.branchWeakStructure(
                 JITCompiler::NotEqual, structureGPR, node->structureSet().last()));
         
index 3199481..e88259a 100644 (file)
@@ -170,7 +170,7 @@ public:
     {
         for (BlockIndex resultIndex = m_block->index + 1; ; resultIndex++) {
             if (resultIndex >= m_jit.graph().numBlocks())
-                return 0;
+                return nullptr;
             if (BasicBlock* result = m_jit.graph().block(resultIndex))
                 return result;
         }
@@ -1135,7 +1135,7 @@ public:
 
     void linkBranches();
 
-    void dump(const char* label = 0);
+    void dump(const char* label = nullptr);
 
     bool betterUseStrictInt52(Node* node)
     {
index 88e8e20..1f25905 100644 (file)
@@ -949,7 +949,7 @@ GPRReg SpeculativeJIT::fillSpeculateInt32Internal(Edge edge, DataFormat& returnF
     m_interpreter.filter(value, SpecInt32Only);
     if (value.isClear()) {
         if (mayHaveTypeCheck(edge.useKind()))
-            terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
+            terminateSpeculativeExecution(Uncountable, JSValueRegs(), nullptr);
         returnFormat = DataFormatInt32;
         return allocate();
     }
@@ -1094,7 +1094,7 @@ GPRReg SpeculativeJIT::fillSpeculateInt52(Edge edge, DataFormat desiredFormat)
     m_interpreter.filter(value, SpecInt52Any);
     if (value.isClear()) {
         if (mayHaveTypeCheck(edge.useKind()))
-            terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
+            terminateSpeculativeExecution(Uncountable, JSValueRegs(), nullptr);
         return allocate();
     }
 
@@ -1202,7 +1202,7 @@ FPRReg SpeculativeJIT::fillSpeculateDouble(Edge edge)
                 return fpr;
             }
             if (mayHaveTypeCheck(edge.useKind()))
-                terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
+                terminateSpeculativeExecution(Uncountable, JSValueRegs(), nullptr);
             return fprAllocate();
         }
         
@@ -1236,7 +1236,7 @@ GPRReg SpeculativeJIT::fillSpeculateCell(Edge edge)
     m_interpreter.filter(value, SpecCellCheck);
     if (value.isClear()) {
         if (mayHaveTypeCheck(edge.useKind()))
-            terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
+            terminateSpeculativeExecution(Uncountable, JSValueRegs(), nullptr);
         return allocate();
     }
 
@@ -1316,7 +1316,7 @@ GPRReg SpeculativeJIT::fillSpeculateBoolean(Edge edge)
     m_interpreter.filter(value, SpecBoolean);
     if (value.isClear()) {
         if (mayHaveTypeCheck(edge.useKind()))
-            terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
+            terminateSpeculativeExecution(Uncountable, JSValueRegs(), nullptr);
         return allocate();
     }
 
@@ -1422,7 +1422,7 @@ GPRReg SpeculativeJIT::fillSpeculateBigInt32(Edge edge)
     m_interpreter.filter(value, SpecBigInt32);
     if (value.isClear()) {
         if (mayHaveTypeCheck(edge.useKind()))
-            terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
+            terminateSpeculativeExecution(Uncountable, JSValueRegs(), nullptr);
         return allocate();
     }
 
@@ -2741,7 +2741,7 @@ void SpeculativeJIT::compile(Node* node)
                 if (!m_compileOkay)
                     return;
                 
-                speculationCheck(OutOfBounds, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfPublicLength())));
+                speculationCheck(OutOfBounds, JSValueRegs(), nullptr, m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfPublicLength())));
                 
                 GPRTemporary result(this);
 
@@ -2753,7 +2753,7 @@ void SpeculativeJIT::compile(Node* node)
                     notHole.link(&m_jit);
                 } else {
                     speculationCheck(
-                        LoadFromHole, JSValueRegs(), 0,
+                        LoadFromHole, JSValueRegs(), nullptr,
                         m_jit.branchIfEmpty(result.gpr()));
                 }
                 jsValueResult(result.gpr(), node, node->arrayMode().type() == Array::Int32 ? DataFormatJSInt32 : DataFormatJS);
@@ -2804,11 +2804,11 @@ void SpeculativeJIT::compile(Node* node)
                 FPRTemporary result(this);
                 FPRReg resultReg = result.fpr();
 
-                speculationCheck(OutOfBounds, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfPublicLength())));
+                speculationCheck(OutOfBounds, JSValueRegs(), nullptr, m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfPublicLength())));
 
                 m_jit.loadDouble(MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesEight), resultReg);
                 if (!node->arrayMode().isSaneChain())
-                    speculationCheck(LoadFromHole, JSValueRegs(), 0, m_jit.branchIfNaN(resultReg));
+                    speculationCheck(LoadFromHole, JSValueRegs(), nullptr, m_jit.branchIfNaN(resultReg));
                 doubleResult(resultReg, node);
                 break;
             }
@@ -2858,11 +2858,11 @@ void SpeculativeJIT::compile(Node* node)
                 if (!m_compileOkay)
                     return;
             
-                speculationCheck(OutOfBounds, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(storageReg, ArrayStorage::vectorLengthOffset())));
+                speculationCheck(OutOfBounds, JSValueRegs(), nullptr, m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(storageReg, ArrayStorage::vectorLengthOffset())));
             
                 GPRTemporary result(this);
                 m_jit.load64(MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesEight, ArrayStorage::vectorOffset()), result.gpr());
-                speculationCheck(LoadFromHole, JSValueRegs(), 0, m_jit.branchIfEmpty(result.gpr()));
+                speculationCheck(LoadFromHole, JSValueRegs(), nullptr, m_jit.branchIfEmpty(result.gpr()));
             
                 jsValueResult(result.gpr(), node);
                 break;
@@ -3028,7 +3028,7 @@ void SpeculativeJIT::compile(Node* node)
             
             if (arrayMode.isInBounds()) {
                 speculationCheck(
-                    OutOfBounds, JSValueRegs(), 0,
+                    OutOfBounds, JSValueRegs(), nullptr,
                     m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfPublicLength())));
             } else {
                 MacroAssembler::Jump inBounds = m_jit.branch32(MacroAssembler::Below, propertyReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfPublicLength()));
@@ -3036,7 +3036,7 @@ void SpeculativeJIT::compile(Node* node)
                 slowCase = m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfVectorLength()));
                 
                 if (!arrayMode.isOutOfBounds())
-                    speculationCheck(OutOfBounds, JSValueRegs(), 0, slowCase);
+                    speculationCheck(OutOfBounds, JSValueRegs(), nullptr, slowCase);
                 
                 m_jit.add32(TrustedImm32(1), propertyReg, temporaryReg);
                 m_jit.store32(temporaryReg, MacroAssembler::Address(storageReg, Butterfly::offsetOfPublicLength()));
@@ -3098,14 +3098,14 @@ void SpeculativeJIT::compile(Node* node)
 
             MacroAssembler::Jump beyondArrayBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(storageReg, ArrayStorage::vectorLengthOffset()));
             if (!arrayMode.isOutOfBounds())
-                speculationCheck(OutOfBounds, JSValueRegs(), 0, beyondArrayBounds);
+                speculationCheck(OutOfBounds, JSValueRegs(), nullptr, beyondArrayBounds);
             else
                 slowCases.append(beyondArrayBounds);
 
             // Check if we're writing to a hole; if so increment m_numValuesInVector.
             if (arrayMode.isInBounds()) {
                 speculationCheck(
-                    StoreToHole, JSValueRegs(), 0,
+                    StoreToHole, JSValueRegs(), nullptr,
                     m_jit.branchTest64(MacroAssembler::Zero, MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesEight, ArrayStorage::vectorOffset())));
             } else {
                 MacroAssembler::Jump notHoleValue = m_jit.branchTest64(MacroAssembler::NonZero, MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesEight, ArrayStorage::vectorOffset()));
@@ -4948,7 +4948,7 @@ void SpeculativeJIT::compile(Node* node)
         break;
 
     case ForceOSRExit: {
-        terminateSpeculativeExecution(InadequateCoverage, JSValueRegs(), 0);
+        terminateSpeculativeExecution(InadequateCoverage, JSValueRegs(), nullptr);
         break;
     }
         
@@ -5683,7 +5683,7 @@ void SpeculativeJIT::compileStringCodePointAt(Node* node)
     m_jit.load32(CCallHelpers::Address(scratch1GPR, StringImpl::lengthMemoryOffset()), scratch2GPR);
 
     // unsigned comparison so we can filter out negative indices and indices that are too large
-    speculationCheck(Uncountable, JSValueRegs(), 0, m_jit.branch32(CCallHelpers::AboveOrEqual, indexGPR, scratch2GPR));
+    speculationCheck(Uncountable, JSValueRegs(), nullptr, m_jit.branch32(CCallHelpers::AboveOrEqual, indexGPR, scratch2GPR));
 
     // Load the character into scratch1GPR
     auto is16Bit = m_jit.branchTest32(CCallHelpers::Zero, CCallHelpers::Address(scratch1GPR, StringImpl::flagsOffset()), TrustedImm32(StringImpl::flagIs8Bit()));
index 1243321..fe9cd3c 100644 (file)
@@ -372,7 +372,7 @@ void StructureAbstractValue::dumpInContext(PrintStream& out, DumpContext* contex
 
 void StructureAbstractValue::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 
 void StructureAbstractValue::validateReferences(const TrackedReferences& trackedReferences) const
index a54ec34..1a00025 100644 (file)
@@ -39,7 +39,7 @@ void Transition::dumpInContext(PrintStream& out, DumpContext* context) const
 
 void Transition::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 
 } } // namespace JSC::DFG
index 92d0c8f..7cae569 100644 (file)
@@ -50,7 +50,7 @@ struct CheckData {
     bool m_arrayModeHoistingOkay;
     
     CheckData()
-        : m_structure(0)
+        : m_structure(nullptr)
         , m_arrayModeIsValid(false)
         , m_arrayModeHoistingOkay(false)
     {
@@ -64,7 +64,7 @@ struct CheckData {
     }
 
     CheckData(ArrayMode arrayMode)
-        : m_structure(0)
+        : m_structure(nullptr)
         , m_arrayMode(arrayMode)
         , m_arrayModeIsValid(true)
         , m_arrayModeHoistingOkay(true)
@@ -503,7 +503,7 @@ private:
             return;
         if (result.iterator->value.m_structure == structure.get())
             return;
-        result.iterator->value.m_structure = 0;
+        result.iterator->value.m_structure = nullptr;
     }
     
     void noticeStructureCheck(VariableAccessData* variable, RegisteredStructureSet set)
@@ -594,7 +594,7 @@ struct StructureTypeCheck {
 
     static void disableHoisting(CheckData& checkData)
     {
-        checkData.m_structure = 0;
+        checkData.m_structure = nullptr;
     }
 
     static bool isContravenedByValue(CheckData& checkData, JSValue value)
index 74e7b04..6720e23 100644 (file)
@@ -634,7 +634,7 @@ Worklist* existingWorklistForIndexOrNull(unsigned index)
         return existingGlobalFTLWorklistOrNull();
     default:
         RELEASE_ASSERT_NOT_REACHED();
-        return 0;
+        return nullptr;
     }
 }
 
index 2f49a8e..92fc408 100644 (file)
@@ -221,7 +221,7 @@ public:
         switch (indexingType) {
         case ALL_BLANK_INDEXING_TYPES:
         case ALL_UNDECIDED_INDEXING_TYPES:
-            return 0;
+            return nullptr;
             
         case ALL_INT32_INDEXING_TYPES:
             return &indexedInt32Properties;
@@ -237,7 +237,7 @@ public:
             
         default:
             RELEASE_ASSERT_NOT_REACHED();
-            return 0;
+            return nullptr;
         }
     }
     
index 1f36c3b..7aa53e7 100644 (file)
@@ -37,11 +37,11 @@ namespace JSC { namespace FTL {
 class AvailableRecovery {
 public:
     AvailableRecovery()
-        : m_node(0)
+        : m_node(nullptr)
         , m_format(DataFormatNone)
         , m_opcode(AddRecovery)
-        , m_left(0)
-        , m_right(0)
+        , m_left(nullptr)
+        , m_right(nullptr)
     {
     }
     
index 0cacf09..1b57da0 100644 (file)
@@ -119,7 +119,7 @@ void ExitValue::dumpInContext(PrintStream& out, DumpContext* context) const
 
 void ExitValue::dump(PrintStream& out) const
 {
-    dumpInContext(out, 0);
+    dumpInContext(out, nullptr);
 }
 
 void ExitValue::validateReferences(const TrackedReferences& trackedReferences) const
index ee0a070..db64f01 100644 (file)
@@ -40,7 +40,7 @@ class FormattedValue {
 public:
     FormattedValue()
         : m_format(DataFormatNone)
-        , m_value(0)
+        , m_value(nullptr)
     {
     }
     
index edbb39d..739a64d 100644 (file)
@@ -101,7 +101,7 @@ void* JITCode::dataAddressAtOffset(size_t)
     // We can't patch FTL code, yet. Even if we did, it's not clear that we would do so
     // through this API.
     RELEASE_ASSERT_NOT_REACHED();
-    return 0;
+    return nullptr;
 }
 
 unsigned JITCode::offsetOf(void*)
index 3e0d58f..5b0b333 100644 (file)
@@ -80,7 +80,7 @@ void link(State& state)
         
         DumpContext dumpContext;
         StringPrintStream out;
-        Node* lastNode = 0;
+        Node* lastNode = nullptr;
         for (size_t blockIndex = 0; blockIndex < graph.numBlocks(); ++blockIndex) {
             BasicBlock* block = graph.block(blockIndex);
             if (!block)
index 52a699f..d4711a9 100644 (file)
@@ -484,13 +484,13 @@ private:
         
         LBasicBlock lowBlock = m_blocks.get(m_highBlock);
         
-        m_nextHighBlock = 0;
+        m_nextHighBlock = nullptr;
         for (BlockIndex nextBlockIndex = m_highBlock->index + 1; nextBlockIndex < m_graph.numBlocks(); ++nextBlockIndex) {
             m_nextHighBlock = m_graph.block(nextBlockIndex);
             if (m_nextHighBlock)
                 break;
         }
-        m_nextLowBlock = m_nextHighBlock ? m_blocks.get(m_nextHighBlock) : 0;
+        m_nextLowBlock = m_nextHighBlock ? m_blocks.get(m_nextHighBlock) : nullptr;
         
         // All of this effort to find the next block gives us the ability to keep the
         // generated IR in roughly program order. This ought not affect the performance
@@ -2714,7 +2714,7 @@ private:
                 LBasicBlock innerLastNext = m_out.appendTo(zeroNumerator, numeratorContinuation);
 
                 speculate(
-                    NegativeZero, noValue(), 0, m_out.lessThan(denominator, m_out.int32Zero));
+                    NegativeZero, noValue(), nullptr, m_out.lessThan(denominator, m_out.int32Zero));
 
                 m_out.jump(numeratorContinuation);
 
@@ -2739,7 +2739,7 @@ private:
                 m_out.appendTo(continuation, lastNext);
                 LValue result = m_out.div(numerator, denominator);
                 speculate(
-                    Overflow, noValue(), 0,
+                    Overflow, noValue(), nullptr,
                     m_out.notEqual(m_out.mul(result, denominator), numerator));
                 setInt32(result);
             } else
@@ -2821,7 +2821,7 @@ private:
 
                 LBasicBlock innerLastNext = m_out.appendTo(negativeNumerator, numeratorContinuation);
 
-                speculate(NegativeZero, noValue(), 0, m_out.isZero32(remainder));
+                speculate(NegativeZero, noValue(), nullptr, m_out.isZero32(remainder));
 
                 m_out.jump(numeratorContinuation);
 
@@ -2906,7 +2906,7 @@ private:
             LValue result = m_out.bitXor(mask, m_out.add(mask, value));
 
             if (shouldCheckOverflow(m_node->arithMode()))
-                speculate(Overflow, noValue(), 0, m_out.lessThan(result, m_out.int32Zero));
+                speculate(Overflow, noValue(), nullptr, m_out.lessThan(result, m_out.int32Zero));
 
             setInt32(result);
             break;
@@ -3295,7 +3295,7 @@ private:
                 blessSpeculation(check, Overflow, noValue(), nullptr, m_origin);
                 result = check;
             } else {
-                speculate(Overflow, noValue(), 0, m_out.testIsZero32(value, m_out.constInt32(0x7fffffff)));
+                speculate(Overflow, noValue(), nullptr, m_out.testIsZero32(value, m_out.constInt32(0x7fffffff)));
                 result = m_out.neg(value);
             }
 
@@ -3309,7 +3309,7 @@ private:
                 LValue value = lowWhicheverInt52(m_node->child1(), kind);
                 LValue result = m_out.neg(value);
                 if (shouldCheckNegativeZero(m_node->arithMode()))
-                    speculate(NegativeZero, noValue(), 0, m_out.isZero64(result));
+                    speculate(NegativeZero, noValue(), nullptr, m_out.isZero64(result));
                 setInt52(result, kind);
                 break;
             }
@@ -3318,7 +3318,7 @@ private:
             CheckValue* result = m_out.speculateSub(m_out.int64Zero, value);
             blessSpeculation(result, Int52Overflow, noValue(), nullptr, m_origin);
             if (shouldCheckNegativeZero(m_node->arithMode()))
-                speculate(NegativeZero, noValue(), 0, m_out.isZero64(result));
+                speculate(NegativeZero, noValue(), nullptr, m_out.isZero64(result));
             setInt52(result);
             break;
         }
@@ -3551,7 +3551,7 @@ private:
             return;
         }
 
-        speculate(Overflow, noValue(), 0, m_out.lessThan(value, m_out.int32Zero));
+        speculate(Overflow, noValue(), nullptr, m_out.lessThan(value, m_out.int32Zero));
         setInt32(value);
     }
     
@@ -3724,7 +3724,7 @@ private:
     void compileArrayify()
     {
         LValue cell = lowCell(m_node->child1());
-        LValue property = !!m_node->child2() ? lowInt32(m_node->child2()) : 0;
+        LValue property = !!m_node->child2() ? lowInt32(m_node->child2()) : nullptr;
         
         LBasicBlock unexpectedStructure = m_out.newBlock();
         LBasicBlock continuation = m_out.newBlock();
@@ -3747,7 +3747,7 @@ private:
             case Array::Double:
             case Array::Contiguous:
                 speculate(
-                    Uncountable, noValue(), 0,
+                    Uncountable, noValue(), nullptr,
                     m_out.aboveOrEqual(property, m_out.constInt32(MIN_SPARSE_ARRAY_INDEX)));
                 break;
             default:
@@ -3774,7 +3774,7 @@ private:
             break;
         }
         
-        speculate(BadIndexingType, jsValueValue(cell), 0, isUnexpectedArray(cell));
+        speculate(BadIndexingType, jsValueValue(cell), nullptr, isUnexpectedArray(cell));
         m_out.jump(continuation);
         
         m_out.appendTo(continuation, lastNext);
@@ -4284,7 +4284,7 @@ private:
             return;
         
         speculate(
-            BadIndexingType, jsValueValue(cell), 0,
+            BadIndexingType, jsValueValue(cell), nullptr,
             m_out.logicalNot(isArrayTypeForCheckArray(cell, m_node->arrayMode())));
     }
 
@@ -4310,7 +4310,7 @@ private:
         }
 
         speculate(
-            BadIndexingType, jsValueValue(cell), 0,
+            BadIndexingType, jsValueValue(cell), nullptr,
             m_out.logicalNot(isArrayTypeForCheckArray(cell, m_node->arrayMode())));
 
         if (maySeeEmptyValue) {
@@ -4530,7 +4530,7 @@ private:
     void compileCheckInBounds()
     {
         speculate(
-            OutOfBounds, noValue(), 0,
+            OutOfBounds, noValue(), nullptr,
             m_out.aboveOrEqual(lowInt32(m_node->child1()), lowInt32(m_node->child2())));
 
         // Even though we claim to have JSValue result, no user of us should
@@ -4561,7 +4561,7 @@ private:
                     result = m_out.select(
                         isHole, m_out.constInt64(JSValue::encode(jsUndefined())), result);
                 } else
-                    speculate(LoadFromHole, noValue(), 0, isHole);
+                    speculate(LoadFromHole, noValue(), nullptr, isHole);
                 // We have to keep base alive to keep content in storage alive.
                 if (m_node->arrayMode().type() == Array::Contiguous)
                     ensureStillAliveHere(base);
@@ -4610,7 +4610,7 @@ private:
                 
                 if (!m_node->arrayMode().isSaneChain()) {
                     speculate(
-                        LoadFromHole, noValue(), 0,
+                        LoadFromHole, noValue(), nullptr,
                         m_out.doubleNotEqualOrUnordered(result, result));
                 }
                 setDouble(result);
@@ -4870,7 +4870,7 @@ private:
 
             if (m_node->arrayMode().isInBounds()) {
                 LValue result = m_out.load64(baseIndex(heap, storage, index, m_graph.varArgChild(m_node, 1)));
-                speculate(LoadFromHole, noValue(), 0, m_out.isZero64(result));
+                speculate(LoadFromHole, noValue(), nullptr, m_out.isZero64(result));
                 // We have to keep base alive to keep content in storage alive.
                 ensureStillAliveHere(base);
                 setJSValue(result);
@@ -5192,7 +5192,7 @@ private:
             }
 
             if (arrayMode.isInBounds()) {
-                speculate(StoreToHole, noValue(), 0, m_out.isZero64(m_out.load64(elementPointer)));
+                speculate(StoreToHole, noValue(), nullptr, m_out.isZero64(m_out.load64(elementPointer)));
                 m_out.store64(value, elementPointer);
                 return;
             }
@@ -5204,7 +5204,7 @@ private:
                 ? (m_node->op() == PutByValDirect ? operationPutByValDirectBeyondArrayBoundsStrict : operationPutByValBeyondArrayBoundsStrict)
                 : (m_node->op() == PutByValDirect ? operationPutByValDirectBeyondArrayBoundsNonStrict : operationPutByValBeyondArrayBoundsNonStrict);
             if (!arrayMode.isOutOfBounds()) {
-                speculate(OutOfBounds, noValue(), 0, isOutOfBounds);
+                speculate(OutOfBounds, noValue(), nullptr, isOutOfBounds);
                 isOutOfBounds = m_out.booleanFalse;
             }
 
@@ -7857,7 +7857,7 @@ private:
             kids[2] = lowCell(edges[2]);
             numKids = 3;
         } else {
-            kids[2] = 0;
+            kids[2] = nullptr;
             numKids = 2;
         }
         
@@ -8043,7 +8043,7 @@ private:
         m_out.appendTo(slowPath, continuation);
             
         if (m_node->arrayMode().isInBounds()) {
-            speculate(OutOfBounds, noValue(), 0, m_out.booleanTrue);
+            speculate(OutOfBounds, noValue(), nullptr, m_out.booleanTrue);
             results.append(m_out.anchor(m_out.intPtrZero));
         } else {
             // FIXME: Revisit JSGlobalObject.
@@ -8096,7 +8096,7 @@ private:
         LValue stringImpl = m_out.loadPtr(base, m_heaps.JSString_value);
 
         speculate(
-            Uncountable, noValue(), 0,
+            Uncountable, noValue(), nullptr,
             m_out.aboveOrEqual(
                 index, m_out.load32NonNegative(stringImpl, m_heaps.StringImpl_length)));
         
@@ -8147,7 +8147,7 @@ private:
         LValue stringImpl = m_out.loadPtr(base, m_heaps.JSString_value);
         LValue length = m_out.load32NonNegative(stringImpl, m_heaps.StringImpl_length);
 
-        speculate(Uncountable, noValue(), 0, m_out.aboveOrEqual(index, length));
+        speculate(Uncountable, noValue(), nullptr, m_out.aboveOrEqual(index, length));
 
         m_out.branch(
             m_out.testIsZero32(
@@ -11949,7 +11949,7 @@ private:
     void compileCheckTypeInfoFlags()
     {
         speculate(
-            BadTypeInfoFlags, noValue(), 0,
+            BadTypeInfoFlags, noValue(), nullptr,
             m_out.testIsZero32(
                 m_out.load8ZeroExt32(lowCell(m_node->child1()), m_heaps.JSCell_typeInfoFlags),
                 m_out.constInt32(m_node->typeInfoOperand())));
@@ -13180,7 +13180,7 @@ private:
 
         if (set.size() == 1) {
             speculate(
-                exitKind, formattedValue, 0,
+                exitKind, formattedValue, nullptr,
                 m_out.notEqual(structureDiscriminant, weakStructureDiscriminant(set[0])));
             return;
         }
@@ -13197,7 +13197,7 @@ private:
         }
         
         speculate(
-            exitKind, formattedValue, 0,
+            exitKind, formattedValue, nullptr,
             m_out.notEqual(structureDiscriminant, weakStructureDiscriminant(set.last())));
         
         m_out.jump(continuation);
@@ -13208,8 +13208,8 @@ private:
     {
         LBasicBlock intCase = m_out.newBlock();
         LBasicBlock notIntCase = m_out.newBlock();
-        LBasicBlock doubleCase = 0;
-        LBasicBlock notNumberCase = 0;
+        LBasicBlock doubleCase = nullptr;
+        LBasicBlock notNumberCase = nullptr;
         if (edge.useKind() == NotCellNorBigIntUse) {
             doubleCase = m_out.newBlock();
             notNumberCase = m_out.newBlock();
@@ -15234,8 +15234,8 @@ private:
     
     struct ArrayValues {
         ArrayValues()
-            : array(0)
-            , butterfly(0)
+            : array(nullptr)
+            , butterfly(nullptr)
         {
         }
         
@@ -15592,7 +15592,7 @@ private:
         }
         default:
             DFG_CRASH(m_graph, m_node, "Bad use kind");
-            return 0;
+            return nullptr;
         }
     }
     
@@ -15708,7 +15708,7 @@ private:
                 index, m_out.load32NonNegative(storage, m_heaps.Butterfly_vectorLength));
                 
             if (!m_node->arrayMode().isOutOfBounds())
-                speculate(OutOfBounds, noValue(), 0, isOutOfBounds);
+                speculate(OutOfBounds, noValue(), nullptr, isOutOfBounds);
             else {
                 LBasicBlock outOfBoundsCase =
                     m_out.newBlock();
@@ -16381,7 +16381,7 @@ private:
         
         if (m_node->shouldSpeculateInt32() && canSpeculate) {
             speculate(
-                Overflow, noValue(), 0, m_out.lessThan(result, m_out.int32Zero));
+                Overflow, noValue(), nullptr, m_out.lessThan(result, m_out.int32Zero));
             setInt32(result);
             return;
         }
@@ -17118,7 +17118,7 @@ private:
         }
         
         DFG_CRASH(m_graph, m_node, makeString("Value not defined: ", String::number(edge.node()->index())).ascii().data());
-        return 0;
+        return nullptr;
     }
 
     LValue lowNotCell(Edge edge)
index 059667b..70741eb 100644 (file)
@@ -43,8 +43,8 @@ namespace JSC { namespace FTL {
 class LoweredNodeValue {
 public:
     LoweredNodeValue()
-        : m_value(0)
-        , m_block(0)
+        : m_value(nullptr)
+        , m_block(nullptr)
     {
     }
     
index 05caed9..602c560 100644 (file)
@@ -50,7 +50,7 @@ void* prepareOSREntry(
 
     if (!entryCode->dfgCommon()->isStillValid) {
         dfgCode->clearOSREntryBlockAndResetThresholds(dfgCodeBlock);
-        return 0;
+        return nullptr;
     }
 
     dataLogLnIf(Options::verboseOSR(),
@@ -62,7 +62,7 @@ void* prepareOSREntry(
 
     if (bytecodeIndex != entryCode->bytecodeIndex()) {
         dataLogLnIf(Options::verboseOSR(), "    OSR failed because we don't have an entrypoint for ", bytecodeIndex, "; ours is for ", entryCode->bytecodeIndex());
-        return 0;
+        return nullptr;
     }
     
     Operands<Optional<JSValue>> values;
@@ -98,7 +98,7 @@ void* prepareOSREntry(
     int stackFrameSize = entryCode->common.requiredRegisterCountForExecutionAndExit();
     if (UNLIKELY(!vm.ensureStackCapacityFor(&callFrame->registers()[virtualRegisterForLocal(stackFrameSize - 1).offset()]))) {
         dataLogLnIf(Options::verboseOSR(), "    OSR failed because stack growth failed.");
-        return 0;
+        return nullptr;
     }
     
     callFrame->setCodeBlock(entryCodeBlock);
index 1f4385a..8cebfd9 100644 (file)
@@ -181,7 +181,7 @@ static void compileStub(VM& vm, unsigned exitID, JITCode* jitCode, OSRExit& exit
             exit.m_descriptor->m_values.size() + numMaterializations + maxMaterializationNumArguments) +
         requiredScratchMemorySizeInBytes() +
         codeBlock->calleeSaveRegisters()->size() * sizeof(uint64_t));
-    EncodedJSValue* scratch = scratchBuffer ? static_cast<EncodedJSValue*>(scratchBuffer->dataBuffer()) : 0;
+    EncodedJSValue* scratch = scratchBuffer ? static_cast<EncodedJSValue*>(scratchBuffer->dataBuffer()) : nullptr;
     EncodedJSValue* materializationPointers = scratch + exit.m_descriptor->m_values.size();
     EncodedJSValue* materializationArguments = materializationPointers + numMaterializations;
     char* registerScratch = bitwise_cast<char*>(materializationArguments + maxMaterializationNumArguments);
index 8c0cbae..2068519 100644 (file)
@@ -35,8 +35,8 @@ namespace JSC { namespace FTL {
 class TypedPointer {
 public:
     TypedPointer()
-        : m_heap(0)
-        , m_value(0)
+        : m_heap(nullptr)
+        , m_value(nullptr)
     {
     }
     
index 5bd14ca..b8d10b1 100644 (file)
@@ -34,8 +34,8 @@ namespace JSC { namespace FTL {
 class ValueFromBlock {
 public:
     ValueFromBlock()
-        : m_value(0)
-        , m_block(0)
+        : m_value(nullptr)
+        , m_block(nullptr)
     {
     }
     
index 3ae3dcb..755818f 100644 (file)
@@ -34,8 +34,8 @@ namespace JSC { namespace FTL {
 class ValueRange {
 public:
     ValueRange()
-        : m_begin(0)
-        , m_end(0)
+        : m_begin(nullptr)
+        , m_end(nullptr)
     {
     }
     
index d407d5a..3e6daec 100644 (file)
@@ -118,7 +118,7 @@ class GCSegmentedArrayIterator {
     friend class GCSegmentedArray<T>;
 public:
     GCSegmentedArrayIterator()
-        : m_currentSegment(0)
+        : m_currentSegment(nullptr)
         , m_currentOffset(0)
     {
     }
index 866a076..1de3fa0 100644 (file)
@@ -123,7 +123,7 @@ public:
     ExternalType get() const { return HandleTypes<T>::getFromSlot(this->slot()); }
 
 protected:
-    Handle(HandleSlot slot = 0)
+    Handle(HandleSlot slot = nullptr)
         : HandleBase(slot)
     {
     }
index 5d222d9..d443fce 100644 (file)
@@ -139,14 +139,14 @@ inline void HandleSet::deallocate(HandleSlot handle)
 }
 
 inline HandleNode::HandleNode()
-    : m_prev(0)
-    , m_next(0)
+    : m_prev(nullptr)
+    , m_next(nullptr)
 {
 }
 
 inline HandleNode::HandleNode(WTF::SentinelTag)
-    : m_prev(0)
-    , m_next(0)
+    : m_prev(nullptr)
+    , m_next(nullptr)
 {
 }
 
index 4e3530e..ad36dfc 100644 (file)
@@ -33,7 +33,7 @@ typedef JSValue* HandleSlot;
 
 template<typename T> struct HandleTypes {
     typedef T* ExternalType;
-    static ExternalType getFromSlot(HandleSlot slot) { return (slot && *slot) ? reinterpret_cast<ExternalType>(static_cast<void*>(slot->asCell())) : 0; }
+    static ExternalType getFromSlot(HandleSlot slot) { return (slot && *slot) ? reinterpret_cast<ExternalType>(static_cast<void*>(slot->asCell())) : nullptr; }
     static JSValue toJSValue(T* cell) { return reinterpret_cast<JSCell*>(cell); }
     template<typename U> static void validateUpcast() { T* temp; temp = (U*)0; }
 };
index 2589e2c..db47013 100644 (file)
@@ -420,7 +420,7 @@ String HeapSnapshotBuilder::json(Function<bool (const HeapSnapshotNode&)> allowN
             nextClassNameIndex++;
         unsigned classNameIndex = result.iterator->value;
 
-        void* wrappedAddress = 0;
+        void* wrappedAddress = nullptr;
         unsigned labelIndex = 0;
         if (!node.cell->isString() && !node.cell->isHeapBigInt()) {
             Structure* structure = node.cell->structure(vm);
index f27eef4..b9aae5a 100644 (file)
@@ -306,7 +306,7 @@ void MarkedBlock::Handle::specializedSweep(FreeList* freeList, MarkedBlock::Hand
     // This produces a free list that is ordered in reverse through the block.
     // This is fine, since the allocation code makes no assumptions about the
     // order of the free list.
-    FreeCell* head = 0;
+    FreeCell* head = nullptr;
     size_t count = 0;
     uintptr_t secret;
     cryptographicallyRandomValues(&secret, sizeof(uintptr_t));
index c37481a..6cfdf3d 100644 (file)
@@ -126,10 +126,10 @@ public:
         if (shouldStrongDestructorGrabLock == ShouldStrongDestructorGrabLock::Yes) {
             JSLockHolder holder(heap->vm());
             heap->deallocate(slot());
-            setSlot(0);
+            setSlot(nullptr);
         } else {
             heap->deallocate(slot());
-            setSlot(0);
+            setSlot(nullptr);
         }
     }
 
index 3f6ffbf..442a07f 100644 (file)
@@ -65,8 +65,8 @@ private:
 };
 
 inline WeakImpl::WeakImpl()
-    : m_weakHandleOwner(0)
-    , m_context(0)
+    : m_weakHandleOwner(nullptr)
+    , m_context(nullptr)
 {
     setState(Deallocated);
 }
index cf79971..a244671 100644 (file)
@@ -32,7 +32,7 @@
 namespace JSC {
 
 template<typename T> inline Weak<T>::Weak(T* cell, WeakHandleOwner* weakOwner, void* context)
-    : m_impl(cell ? WeakSet::allocate(cell, weakOwner, context) : 0)
+    : m_impl(cell ? WeakSet::allocate(cell, weakOwner, context) : nullptr)
 {
 }
 
index fe33163..de59106 100644 (file)
@@ -102,7 +102,7 @@ WeakBlock::FreeCell* WeakSet::tryFindAllocator()
             return sweepResult.freeList;
     }
 
-    return 0;
+    return nullptr;
 }
 
 WeakBlock::FreeCell* WeakSet::addAllocator(CellContainer container)
index 9867e24..4b3a14b 100644 (file)
@@ -38,7 +38,7 @@ class WeakSet : public BasicRawSentinelNode<WeakSet> {
     friend class LLIntOffsetsExtractor;
 
 public:
-    static WeakImpl* allocate(JSValue, WeakHandleOwner* = 0, void* context = 0);
+    static WeakImpl* allocate(JSValue, WeakHandleOwner* = nullptr, void* context = nullptr);
     static void deallocate(WeakImpl*);
 
     WeakSet(VM&);
index 2c775f9..56b17ed 100644 (file)
@@ -44,7 +44,7 @@ void CallFrame::initDeprecatedCallFrameForDebugger(CallFrame* globalExec, JSCall
 {
     globalExec->setCodeBlock(nullptr);
     globalExec->setCallerFrame(noCaller());
-    globalExec->setReturnPC(0);
+    globalExec->setReturnPC(nullptr);
     globalExec->setArgumentCountIncludingThis(0);
     globalExec->setCallee(globalCallee);
     ASSERT(globalExec->isDeprecatedCallFrameForDebugger());
index 7d56fc7..242b335 100644 (file)
@@ -152,7 +152,7 @@ namespace JSC  {
 
         ReturnAddressPtr returnPC() const { return ReturnAddressPtr(callerFrameAndPC().returnPC); }
         bool hasReturnPC() const { return !!callerFrameAndPC().returnPC; }
-        void clearReturnPC() { callerFrameAndPC().returnPC = 0; }
+        void clearReturnPC() { callerFrameAndPC().returnPC = nullptr; }
         static ptrdiff_t returnPCOffset() { return OBJECT_OFFSETOF(CallerFrameAndPC, returnPC); }
         AbstractPC abstractReturnPC(VM& vm) { return AbstractPC(vm, this); }
 
index 1d93eb8..8336a91 100644 (file)
@@ -490,7 +490,7 @@ ALWAYS_INLINE static HandlerInfo* findExceptionHandler(StackVisitor& visitor, Co
 class GetCatchHandlerFunctor {
 public:
     GetCatchHandlerFunctor()
-        : m_handler(0)
+        : m_handler(nullptr)
     {
     }
 
@@ -1021,7 +1021,7 @@ JSObject* Interpreter::executeConstruct(JSGlobalObject* lexicalGlobalObject, JSO
         }
     }
 
-    RETURN_IF_EXCEPTION(throwScope, 0);
+    RETURN_IF_EXCEPTION(throwScope, nullptr);
     ASSERT(result.isObject());
     return checkedReturn(asObject(result));
 }
index 7cf6de9..47ac85f 100644 (file)
@@ -47,7 +47,7 @@ public:
     JSValue *args;
     JSGlobalObject* globalObject;
 
-    inline void init(CodeBlock*, JSGlobalObject*, JSObject*, JSValue, int, JSValue* otherArgs = 0);
+    inline void init(CodeBlock*, JSGlobalObject*, JSObject*, JSValue, int, JSValue* otherArgs = nullptr);
 
     inline CodeBlock* codeBlock() const;
     inline void setCodeBlock(CodeBlock*);
index 855b856..b0a5b2f 100644 (file)
@@ -58,8 +58,8 @@ StackVisitor::StackVisitor(CallFrame* startFrame, VM& vm)
         }
 
     } else {
-        m_frame.m_entryFrame = 0;
-        topFrame = 0;
+        m_frame.m_entryFrame = nullptr;
+        topFrame = nullptr;
     }
     m_frame.m_callerIsEntryFrame = false;
     readFrame(topFrame);
@@ -184,7 +184,7 @@ void StackVisitor::readNonInlinedFrame(CallFrame* callFrame, CodeOrigin* codeOri
     }
 
 #if ENABLE(DFG_JIT)
-    m_frame.m_inlineCallFrame = 0;
+    m_frame.m_inlineCallFrame = nullptr;
 #endif
 }
 
@@ -429,9 +429,9 @@ void StackVisitor::Frame::retrieveExpressionInfo(int& divot, int& startOffset, i
 
 void StackVisitor::Frame::setToEnd()
 {
-    m_callFrame = 0;
+    m_callFrame = nullptr;
 #if ENABLE(DFG_JIT)
-    m_inlineCallFrame = 0;
+    m_inlineCallFrame = nullptr;
 #endif
     m_isWasmFrame = false;
 }
index 0c81d1b..e0d991c 100644 (file)
@@ -168,7 +168,7 @@ private:
     JS_EXPORT_PRIVATE void gotoNextFrame();
 
     void readFrame(CallFrame*);
-    void readNonInlinedFrame(CallFrame*, CodeOrigin* = 0);
+    void readNonInlinedFrame(CallFrame*, CodeOrigin* = nullptr);
 #if ENABLE(DFG_JIT)
     void readInlinedFrame(CallFrame*, CodeOrigin*);
 #endif
@@ -181,7 +181,7 @@ class CallerFunctor {
 public:
     CallerFunctor()
         : m_hasSkippedFirstFrame(false)
-        , m_callerFrame(0)
+        , m_callerFrame(nullptr)
     {
     }
 
index 92ca14e..f9d5774 100644 (file)
@@ -53,7 +53,7 @@ class AssemblyHelpers : public MacroAssembler {
 public:
     AssemblyHelpers(CodeBlock* codeBlock)
         : m_codeBlock(codeBlock)
-        , m_baselineCodeBlock(codeBlock ? codeBlock->baselineAlternative() : 0)
+        , m_baselineCodeBlock(codeBlock ? codeBlock->baselineAlternative() : nullptr)
     {
         if (m_codeBlock) {
             ASSERT(m_baselineCodeBlock);
index 35d509b..ecda564 100644 (file)
@@ -49,7 +49,7 @@ class RegisteredStructure;
 
 class CCallHelpers : public AssemblyHelpers {
 public:
-    CCallHelpers(CodeBlock* codeBlock = 0)
+    CCallHelpers(CodeBlock* codeBlock = nullptr)
         : AssemblyHelpers(codeBlock)
     {
     }
index a850073..8b50fff 100644 (file)
@@ -72,25 +72,25 @@ void JITCode::validateReferences(const TrackedReferences&)
 DFG::CommonData* JITCode::dfgCommon()
 {
     RELEASE_ASSERT_NOT_REACHED();
-    return 0;
+    return nullptr;
 }
 
 DFG::JITCode* JITCode::dfg()
 {
     RELEASE_ASSERT_NOT_REACHED();
-    return 0;
+    return nullptr;
 }
 
 FTL::JITCode* JITCode::ftl()
 {
     RELEASE_ASSERT_NOT_REACHED();
-    return 0;
+    return nullptr;
 }
 
 FTL::ForOSREntryJITCode* JITCode::ftlForOSREntry()
 {
     RELEASE_ASSERT_NOT_REACHED();
-    return 0;
+    return nullptr;
 }
 
 void JITCode::shrinkToFit(const ConcurrentJSLocker&)
index 97f4dc0..33aa8c0 100644 (file)
@@ -1039,7 +1039,7 @@ EncodedJSValue JIT_OPERATION operationCallEval(JSGlobalObject* globalObject, Cal
     VM& vm = globalObject->vm();
     auto scope = DECLARE_THROW_SCOPE(vm);
 
-    calleeFrame->setCodeBlock(0);
+    calleeFrame->setCodeBlock(nullptr);
     
     if (!isHostFunction(calleeFrame->guaranteedJSValueCallee(), globalFuncEval))
         return JSValue::encode(JSValue());
@@ -1055,7 +1055,7 @@ static SlowPathReturnType handleHostCall(JSGlobalObject* globalObject, CallFrame
     VM& vm = globalObject->vm();
     auto scope = DECLARE_THROW_SCOPE(vm);
 
-    calleeFrame->setCodeBlock(0);
+    calleeFrame->setCodeBlock(nullptr);
 
     if (callLinkInfo->specializationKind() == CodeForCall) {
         auto callData = getCallData(vm, callee);
@@ -1578,21 +1578,21 @@ SlowPathReturnType JIT_OPERATION operationOptimize(VM* vmPointer, uint32_t bytec
         CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("counter = ", codeBlock->jitExecuteCounter()));
         codeBlock->updateAllPredictions();
         dataLogLnIf(Options::verboseOSR(), "Choosing not to optimize ", *codeBlock, " yet, because the threshold hasn't been reached.");
-        return encodeResult(0, 0);
+        return encodeResult(nullptr, nullptr);
     }
     
     Debugger* debugger = codeBlock->globalObject()->debugger();
     if (UNLIKELY(debugger && (debugger->isStepping() || codeBlock->baselineAlternative()->hasDebuggerRequests()))) {
         CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("debugger is stepping or has requests"));
         updateAllPredictionsAndOptimizeAfterWarmUp(codeBlock);
-        return encodeResult(0, 0);
+        return encodeResult(nullptr, nullptr);
     }
 
     if (codeBlock->m_shouldAlwaysBeInlined) {
         CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("should always be inlined"));
         updateAllPredictionsAndOptimizeAfterWarmUp(codeBlock);
         dataLogLnIf(Options::verboseOSR(), "Choosing not to optimize ", *codeBlock, " yet, because m_shouldAlwaysBeInlined == true.");
-        return encodeResult(0, 0);
+        return encodeResult(nullptr, nullptr);
     }
 
     // We cannot be in the process of asynchronous compilation and also have an optimized
@@ -1634,7 +1634,7 @@ SlowPathReturnType JIT_OPERATION operationOptimize(VM* vmPointer, uint32_t bytec
         // replacement.
         RELEASE_ASSERT(!codeBlock->hasOptimizedReplacement());
         codeBlock->setOptimizationThresholdBasedOnCompilationResult(CompilationDeferred);
-        return encodeResult(0, 0);
+        return encodeResult(nullptr, nullptr);
     }
 
     if (worklistState == DFG::Worklist::Compiled) {
@@ -1647,7 +1647,7 @@ SlowPathReturnType JIT_OPERATION operationOptimize(VM* vmPointer, uint32_t bytec
             CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("compiled and failed"));
             codeBlock->updateAllPredictions();
             dataLogLnIf(Options::verboseOSR(), "Code block ", *codeBlock, " was compiled but it doesn't have an optimized replacement.");
-            return encodeResult(0, 0);
+            return encodeResult(nullptr, nullptr);
         }
     } else if (codeBlock->hasOptimizedReplacement()) {
         CodeBlock* replacement = codeBlock->replacement();
@@ -1671,7 +1671,7 @@ SlowPathReturnType JIT_OPERATION operationOptimize(VM* vmPointer, uint32_t bytec
                 "Triggering reoptimization of ", codeBlock,
                 "(", replacement, ") (in loop).");
             replacement->jettison(Profiler::JettisonDueToBaselineLoopReoptimizationTrigger, CountReoptimization);
-            return encodeResult(0, 0);
+            return encodeResult(nullptr, nullptr);
         }
     } else {
         if (!codeBlock->shouldOptimizeNow()) {
@@ -1679,7 +1679,7 @@ SlowPathReturnType JIT_OPERATION operationOptimize(VM* vmPointer, uint32_t bytec
             dataLogLnIf(Options::verboseOSR(),
                 "Delaying optimization for ", *codeBlock,
                 " because of insufficient profiling.");
-            return encodeResult(0, 0);
+            return encodeResult(nullptr, nullptr);
         }
 
         dataLogLnIf(Options::verboseOSR(), "Triggering optimized compilation of ", *codeBlock);
@@ -1705,7 +1705,7 @@ SlowPathReturnType JIT_OPERATION operationOptimize(VM* vmPointer, uint32_t bytec
         
         if (result != CompilationSuccessful) {
             CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("compilation failed"));
-            return encodeResult(0, 0);
+            return encodeResult(nullptr, nullptr);
         }
     }
     
@@ -1746,7 +1746,7 @@ SlowPathReturnType JIT_OPERATION operationOptimize(VM* vmPointer, uint32_t bytec
             "Triggering reoptimization of ", codeBlock, " -> ",
             codeBlock->replacement(), " (after OSR fail).");
         optimizedCodeBlock->jettison(Profiler::JettisonDueToBaselineLoopReoptimizationTriggerOnOSREntryFail, CountReoptimization);
-        return encodeResult(0, 0);
+        return encodeResult(nullptr, nullptr);
     }
 
     // OSR failed this time, but it might succeed next time! Let the code run a bit
@@ -1754,7 +1754,7 @@ SlowPathReturnType JIT_OPERATION operationOptimize(VM* vmPointer, uint32_t bytec
     codeBlock->optimizeAfterWarmUp();
     
     CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("OSR failed"));
-    return encodeResult(0, 0);
+    return encodeResult(nullptr, nullptr);
 }
 
 char* JIT_OPERATION operationTryOSREnterAtCatch(VM* vmPointer, uint32_t bytecodeIndexBits)
index 18bd6e4..b17ec72 100644 (file)
@@ -1113,7 +1113,7 @@ static void revertCall(VM& vm, CallLinkInfo& callLinkInfo, MacroAssemblerCodeRef
         if (!callLinkInfo.clearedByJettison()) {
             MacroAssembler::revertJumpReplacementToBranchPtrWithPatch(
                 MacroAssembler::startOfBranchPtrWithPatchOnRegister(callLinkInfo.hotPathBegin()),
-                callLinkInfo.calleeGPR(), 0);
+                callLinkInfo.calleeGPR(), nullptr);
             linkSlowFor(vm, callLinkInfo, codeRef);
             MacroAssembler::repatchPointer(callLinkInfo.hotPathBegin(), nullptr);
         }
index f69945c..c424f12 100644 (file)
@@ -272,7 +272,7 @@ static MacroAssemblerCodeRef<JITThunkPtrTag> nativeForGenerator(VM& vm, ThunkFun
         break;
     }
 
-    jit.emitPutToCallFrameHeader(0, CallFrameSlot::codeBlock);
+    jit.emitPutToCallFrameHeader(nullptr, CallFrameSlot::codeBlock);
     jit.storePtr(GPRInfo::callFrameRegister, &vm.topCallFrame);
 
     // Host function signature: f(JSGlobalObject*, CallFrame*);
index 438b444..68533eb 100644 (file)
@@ -483,7 +483,7 @@ public:
 
     static Structure* createStructure(VM& vm, JSValue prototype)
     {
-        return Structure::create(vm, 0, prototype, TypeInfo(GlobalObjectType, StructureFlags), info());
+        return Structure::create(vm, nullptr, prototype, TypeInfo(GlobalObjectType, StructureFlags), info());
     }
 
     static RuntimeFlags javaScriptRuntimeFlags(const JSGlobalObject*) { return RuntimeFlags::createAllEnabled(); }
@@ -592,7 +592,7 @@ private:
 #endif
 
         if (!arguments.isEmpty()) {
-            JSArray* array = constructEmptyArray(this, 0);
+            JSArray* array = constructEmptyArray(this, nullptr);
             for (size_t i = 0; i < arguments.size(); ++i)
                 array->putDirectIndex(this, i, jsString(vm, arguments[i]));
             putDirect(vm, Identifier::fromString(vm, "arguments"), array);
@@ -1476,7 +1476,7 @@ EncodedJSValue JSC_HOST_CALL functionRun(JSGlobalObject* globalObject, CallFrame
 
     GlobalObject* realm = GlobalObject::create(vm, GlobalObject::createStructure(vm, jsNull()), Vector<String>());
 
-    JSArray* array = constructEmptyArray(realm, 0);
+    JSArray* array = constructEmptyArray(realm, nullptr);
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
     for (unsigned i = 1; i < callFrame->argumentCount(); ++i) {
         array->putDirectIndex(realm, i - 1, callFrame->uncheckedArgument(i));
@@ -1508,7 +1508,7 @@ EncodedJSValue JSC_HOST_CALL functionRunString(JSGlobalObject* globalObject, Cal
 
     GlobalObject* realm = GlobalObject::create(vm, GlobalObject::createStructure(vm, jsNull()), Vector<String>());
 
-    JSArray* array = constructEmptyArray(realm, 0);
+    JSArray* array = constructEmptyArray(realm, nullptr);
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
     for (unsigned i = 1; i < callFrame->argumentCount(); ++i) {
         array->putDirectIndex(realm, i - 1, callFrame->uncheckedArgument(i));
index 759c132..451ac34 100644 (file)
@@ -478,11 +478,11 @@ LLINT_SLOW_PATH_DECL(loop_osr)
 
     if (!shouldJIT(codeBlock)) {
         codeBlock->dontJITAnytimeSoon();
-        LLINT_RETURN_TWO(0, 0);
+        LLINT_RETURN_TWO(nullptr, nullptr);
     }
     
     if (!jitCompileAndSetHeuristics(vm, codeBlock, loopOSREntryBytecodeIndex))
-        LLINT_RETURN_TWO(0, 0);
+        LLINT_RETURN_TWO(nullptr, nullptr);
     
     CODEBLOCK_LOG_EVENT(codeBlock, "osrEntry", ("at ", loopOSREntryBytecodeIndex));
 
@@ -2198,7 +2198,7 @@ extern "C" SlowPathReturnType slow_path_checkpoint_osr_exit(CallFrame* callFrame
         break;
     }
     if (UNLIKELY(scope.exception()))
-        return encodeResult(returnToThrow(vm), 0);
+        return encodeResult(returnToThrow(vm), nullptr);
 
     return dispatchToNextInstruction(codeBlock, pc);
 }
@@ -2213,7 +2213,7 @@ extern "C" SlowPathReturnType llint_throw_stack_overflow_error(VM* vm, ProtoCall
     else
         globalObject = protoFrame->callee()->globalObject(*vm);
     throwStackOverflowError(globalObject, scope);
-    return encodeResult(0, 0);
+    return encodeResult(nullptr, nullptr);
 }
 
 #if ENABLE(C_LOOP)
index d955808..10a1453 100644 (file)
@@ -340,7 +340,7 @@ public:
     ExpressionNode* createRegExp(const JSTokenLocation& location, const Identifier& pattern, const Identifier& flags, const JSTextPosition& start)
     {
         if (Yarr::hasError(Yarr::checkSyntax(pattern.string(), flags.string())))
-            return 0;
+            return nullptr;
         RegExpNode* node = new (m_parserArena) RegExpNode(location, pattern, flags);
         int size = pattern.length() + 2; // + 2 for the two /'s
         JSTextPosition end = start + size;
@@ -971,7 +971,7 @@ public:
     
     void appendArrayPatternSkipEntry(ArrayPattern node, const JSTokenLocation& location)
     {
-        node->appendIndex(ArrayPatternNode::BindingType::Elision, location, 0, nullptr);
+        node->appendIndex(ArrayPatternNode::BindingType::Elision, location, nullptr, nullptr);
     }
 
     void appendArrayPatternEntry(ArrayPattern node, const JSTokenLocation& location, DestructuringPattern pattern, ExpressionNode* defaultValue)
@@ -1536,7 +1536,7 @@ ExpressionNode* ASTBuilder::makeBinaryNode(const JSTokenLocation& location, int
         return makePowNode(location, lhs.first, rhs.first, rhs.second.hasAssignment);
     }
     CRASH();
-    return 0;
+    return nullptr;
 }
 
 ExpressionNode* ASTBuilder::makeAssignNode(const JSTokenLocation& location, ExpressionNode* loc, Operator op, ExpressionNode* expr, bool locHasAssignments, bool exprHasAssignments, const JSTextPosition& start, const JSTextPosition& divot, const JSTextPosition& end)
index 9aa2673..9c1554a 100644 (file)
@@ -557,7 +557,7 @@ void Lexer<T>::setCode(const SourceCode& source, ParserArena* arena)
     if (!sourceString.isNull())
         setCodeStart(sourceString);
     else
-        m_codeStart = 0;
+        m_codeStart = nullptr;
 
     m_source = &source;
     m_sourceOffset = source.startOffset();
@@ -1227,7 +1227,7 @@ template <bool shouldBuildStrings> ALWAYS_INLINE typename Lexer<T>::StringParseR
         tokenData->ident = makeIdentifier(m_buffer8.data(), m_buffer8.size());
         m_buffer8.shrink(0);
     } else
-        tokenData->ident = 0;
+        tokenData->ident = nullptr;
 
     return StringParsedSuccessfully;
 }
@@ -1382,7 +1382,7 @@ template <bool shouldBuildStrings> auto Lexer<T>::parseStringSlowCase(JSTokenDat
     if (shouldBuildStrings)
         tokenData->ident = makeIdentifier(m_buffer16.data(), m_buffer16.size());
     else
-        tokenData->ident = 0;
+        tokenData->ident = nullptr;
 
     m_buffer16.shrink(0);
     return StringParsedSuccessfully;
@@ -2681,7 +2681,7 @@ JSTokenType Lexer<T>::scanTemplateString(JSToken* tokenRecord, RawStringsBuildMo
 template <typename T>
 void Lexer<T>::clear()
 {
-    m_arena = 0;
+    m_arena = nullptr;
 
     Vector<LChar> newBuffer8;
     m_buffer8.swap(newBuffer8);
index 7cfc03f..cc1adaf 100644 (file)
@@ -378,7 +378,7 @@ ALWAYS_INLINE JSTokenType Lexer<T>::lexExpectIdentifier(JSToken* tokenRecord, Op
         && !m_parsingBuiltinFunction
 #endif
         )
-        tokenData->ident = 0;
+        tokenData->ident = nullptr;
     else
         tokenData->ident = makeLCharIdentifier(start, ptr - start);
 
index 9d1cfa4..65c1601 100644 (file)
@@ -126,7 +126,7 @@ ScopeNode::ScopeNode(ParserArena& parserArena, const JSTokenLocation& startLocat
     , m_features(inStrictContext ? StrictModeFeature : NoFeatures)
     , m_innerArrowFunctionCodeFeatures(NoInnerArrowFunctionFeatures)
     , m_numConstants(0)
-    , m_statements(0)
+    , m_statements(nullptr)
 {
 }
 
index 74ebcae..43d131c 100644 (file)
@@ -174,7 +174,7 @@ namespace JSC {
         ExpressionNode(const JSTokenLocation&, ResultType = ResultType::unknownType());
 
     public:
-        virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* destination = 0) = 0;
+        virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* destination = nullptr) = 0;
 
         virtual bool isNumber() const { return false; }
         virtual bool isString() const { return false; }
@@ -235,7 +235,7 @@ namespace JSC {
         StatementNode(const JSTokenLocation&);
 
     public:
-        virtual void emitBytecode(BytecodeGenerator&, RegisterID* destination = 0) = 0;
+        virtual void emitBytecode(BytecodeGenerator&, RegisterID* destination = nullptr) = 0;
 
         void setLoc(unsigned firstLine, unsigned lastLine, int startOffset, int lineStartOffset);
         unsigned lastLine() const { return m_lastLine; }
@@ -292,7 +292,7 @@ namespace JSC {
         bool isConstant() const  override { return true; }
         virtual JSValue jsValue(BytecodeGenerator&) const = 0;
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         void emitBytecodeInConditionContext(BytecodeGenerator&, Label& trueTarget, Label& falseTarget, FallThroughMode) override;
     };
 
@@ -322,7 +322,7 @@ namespace JSC {
         NumberNode(const JSTokenLocation&, double value);
         double value() const { return m_value; }
         virtual bool isIntegerNode() const = 0;
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) final;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) final;
 
     private:
         bool isNumber() const final { return true; }
@@ -549,7 +549,7 @@ namespace JSC {
         const Identifier* raw() { return m_raw; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const Identifier* m_cooked;
         const Identifier* m_raw;
@@ -577,7 +577,7 @@ namespace JSC {
         TemplateExpressionListNode* templateExpressions() const { return m_templateExpressions; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         TemplateStringListNode* m_templateStrings;
         TemplateExpressionListNode* m_templateExpressions;
@@ -590,7 +590,7 @@ namespace JSC {
         TemplateLiteralNode* templateLiteral() const { return m_templateLiteral; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_tag;
         TemplateLiteralNode* m_templateLiteral;
@@ -601,7 +601,7 @@ namespace JSC {
         RegExpNode(const JSTokenLocation&, const Identifier& pattern, const Identifier& flags);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const Identifier& m_pattern;
         const Identifier& m_flags;
@@ -612,7 +612,7 @@ namespace JSC {
         ThisNode(const JSTokenLocation&);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
 
     class SuperNode final : public ExpressionNode {
@@ -621,7 +621,7 @@ namespace JSC {
 
     private:
         bool isSuperNode() const override { return true; }
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
 
     class ImportNode final : public ExpressionNode, public ThrowableExpressionData {
@@ -630,7 +630,7 @@ namespace JSC {
 
     private:
         bool isImportNode() const override { return true; }
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
     };
@@ -649,7 +649,7 @@ namespace JSC {
 
     private:
         bool isNewTarget() const final { return true; }
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
 
     class ImportMetaNode final : public MetaPropertyNode {
@@ -658,7 +658,7 @@ namespace JSC {
 
     private:
         bool isImportMeta() const final { return true; }
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
     };
@@ -670,7 +670,7 @@ namespace JSC {
         const Identifier& identifier() const { return m_ident; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isPure(BytecodeGenerator&) const override;
         bool isLocation() const override { return true; }
@@ -707,7 +707,7 @@ namespace JSC {
 
         ElementNode* elements() const { return m_element; }
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isSimpleArray() const override;
 
@@ -795,7 +795,7 @@ namespace JSC {
         bool isObjectLiteral() const override { return true; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         PropertyListNode* m_list;
     };
@@ -810,7 +810,7 @@ namespace JSC {
         bool subscriptHasAssignments() const { return m_subscriptHasAssignments; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isLocation() const override { return true; }
         bool isBracketAccessorNode() const override { return true; }
@@ -828,7 +828,7 @@ namespace JSC {
         const Identifier& identifier() const { return m_ident; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isLocation() const override { return true; }
         bool isDotAccessorNode() const override { return true; }
@@ -844,7 +844,7 @@ namespace JSC {
         ExpressionNode* expression() const { return m_expression; }
         
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         
         bool isSpreadExpression() const override { return true; }
         ExpressionNode* m_expression;
@@ -857,7 +857,7 @@ namespace JSC {
         ExpressionNode* expression() const { return m_expression; }
         
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         
         ExpressionNode* m_expression;
     };
@@ -871,7 +871,7 @@ namespace JSC {
         ExpressionNode* m_expr;
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
 
     class ArgumentsNode final : public ParserArenaFreeable {
@@ -888,7 +888,7 @@ namespace JSC {
         NewExprNode(const JSTokenLocation&, ExpressionNode*, ArgumentsNode*);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
         ArgumentsNode* m_args;
@@ -899,7 +899,7 @@ namespace JSC {
         EvalFunctionCallNode(const JSTokenLocation&, ArgumentsNode*, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isFunctionCall() const override { return true; }
 
@@ -911,7 +911,7 @@ namespace JSC {
         FunctionCallValueNode(const JSTokenLocation&, ExpressionNode*, ArgumentsNode*, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isFunctionCall() const override { return true; }
 
@@ -924,7 +924,7 @@ namespace JSC {
         FunctionCallResolveNode(const JSTokenLocation&, const Identifier&, ArgumentsNode*, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isFunctionCall() const override { return true; }
 
@@ -937,7 +937,7 @@ namespace JSC {
         FunctionCallBracketNode(const JSTokenLocation&, ExpressionNode* base, ExpressionNode* subscript, bool subscriptHasAssignments, ArgumentsNode*, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isFunctionCall() const override { return true; }
 
@@ -952,7 +952,7 @@ namespace JSC {
         FunctionCallDotNode(const JSTokenLocation&, ExpressionNode* base, const Identifier&, ArgumentsNode*, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
     protected:
         bool isFunctionCall() const override { return true; }
@@ -983,7 +983,7 @@ namespace JSC {
 #undef JSC_DECLARE_BYTECODE_INTRINSIC_FUNCTIONS
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isFunctionCall() const override { return m_type == Type::Function; }
 
@@ -998,7 +998,7 @@ namespace JSC {
         CallFunctionCallDotNode(const JSTokenLocation&, ExpressionNode* base, const Identifier&, ArgumentsNode*, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd, size_t distanceToInnermostCallOrApply);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         size_t m_distanceToInnermostCallOrApply;
     };
     
@@ -1007,7 +1007,7 @@ namespace JSC {
         ApplyFunctionCallDotNode(const JSTokenLocation&, ExpressionNode* base, const Identifier&, ArgumentsNode*, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd, size_t distanceToInnermostCallOrApply);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         size_t m_distanceToInnermostCallOrApply;
     };
 
@@ -1016,7 +1016,7 @@ namespace JSC {
         DeleteResolveNode(const JSTokenLocation&, const Identifier&, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isDeleteNode() const final { return true; }
 
@@ -1028,7 +1028,7 @@ namespace JSC {
         DeleteBracketNode(const JSTokenLocation&, ExpressionNode* base, ExpressionNode* subscript, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isDeleteNode() const final { return true; }
 
@@ -1041,7 +1041,7 @@ namespace JSC {
         DeleteDotNode(const JSTokenLocation&, ExpressionNode* base, const Identifier&, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isDeleteNode() const final { return true; }
 
@@ -1054,7 +1054,7 @@ namespace JSC {
         DeleteValueNode(const JSTokenLocation&, ExpressionNode*);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isDeleteNode() const final { return true; }
 
@@ -1066,7 +1066,7 @@ namespace JSC {
         VoidNode(const JSTokenLocation&, ExpressionNode*);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
     };
@@ -1078,7 +1078,7 @@ namespace JSC {
         const Identifier& identifier() const { return m_ident; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const Identifier& m_ident;
     };
@@ -1088,7 +1088,7 @@ namespace JSC {
         TypeOfValueNode(const JSTokenLocation&, ExpressionNode*);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
     };
@@ -1098,10 +1098,10 @@ namespace JSC {
         PrefixNode(const JSTokenLocation&, ExpressionNode*, Operator, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     protected:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
-        virtual RegisterID* emitResolve(BytecodeGenerator&, RegisterID* = 0);
-        virtual RegisterID* emitBracket(BytecodeGenerator&, RegisterID* = 0);
-        virtual RegisterID* emitDot(BytecodeGenerator&, RegisterID* = 0);
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
+        virtual RegisterID* emitResolve(BytecodeGenerator&, RegisterID* = nullptr);
+        virtual RegisterID* emitBracket(BytecodeGenerator&, RegisterID* = nullptr);
+        virtual RegisterID* emitDot(BytecodeGenerator&, RegisterID* = nullptr);
 
         ExpressionNode* m_expr;
         Operator m_operator;
@@ -1112,10 +1112,10 @@ namespace JSC {
         PostfixNode(const JSTokenLocation&, ExpressionNode*, Operator, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
-        RegisterID* emitResolve(BytecodeGenerator&, RegisterID* = 0) override;
-        RegisterID* emitBracket(BytecodeGenerator&, RegisterID* = 0) override;
-        RegisterID* emitDot(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
+        RegisterID* emitResolve(BytecodeGenerator&, RegisterID* = nullptr) override;
+        RegisterID* emitBracket(BytecodeGenerator&, RegisterID* = nullptr) override;
+        RegisterID* emitDot(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
 
     class UnaryOpNode : public ExpressionNode {
@@ -1128,7 +1128,7 @@ namespace JSC {
         OpcodeID opcodeID() const { return m_opcodeID; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
         OpcodeID m_opcodeID;
@@ -1139,7 +1139,7 @@ namespace JSC {
         UnaryPlusNode(const JSTokenLocation&, ExpressionNode*);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* stripUnaryPlus() override { return expr(); }
     };
@@ -1166,7 +1166,7 @@ namespace JSC {
         BinaryOpNode(const JSTokenLocation&, ExpressionNode* expr1, ExpressionNode* expr2, OpcodeID, bool rightHasAssignments);
         BinaryOpNode(const JSTokenLocation&, ResultType, ExpressionNode* expr1, ExpressionNode* expr2, OpcodeID, bool rightHasAssignments);
 
-        RegisterID* emitStrcat(BytecodeGenerator& generator, RegisterID* destination, RegisterID* lhs = 0, ReadModifyResolveNode* emitExpressionInfoForMe = 0);
+        RegisterID* emitStrcat(BytecodeGenerator&, RegisterID* destination, RegisterID* lhs = nullptr, ReadModifyResolveNode* emitExpressionInfoForMe = nullptr);
         void emitBytecodeInConditionContext(BytecodeGenerator&, Label& trueTarget, Label& falseTarget, FallThroughMode) override;
 
         ExpressionNode* lhs() { return m_expr1; };
@@ -1178,7 +1178,7 @@ namespace JSC {
         enum class UInt32Result : uint8_t { UInt32, Constant, };
 
         void tryFoldToBranch(BytecodeGenerator&, TriState& branchCondition, ExpressionNode*& branchExpression);
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
     protected:
         OpcodeID opcodeID() const { return m_opcodeID; }
@@ -1268,7 +1268,7 @@ namespace JSC {
         ThrowableBinaryOpNode(const JSTokenLocation&, ExpressionNode* expr1, ExpressionNode* expr2, OpcodeID, bool rightHasAssignments);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
     
     class InstanceOfNode final : public ThrowableBinaryOpNode {
@@ -1276,7 +1276,7 @@ namespace JSC {
         InstanceOfNode(const JSTokenLocation&, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
 
     class InNode final : public ThrowableBinaryOpNode {
@@ -1284,7 +1284,7 @@ namespace JSC {
         InNode(const JSTokenLocation&, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
 
     class EqualNode final : public BinaryOpNode {
@@ -1292,7 +1292,7 @@ namespace JSC {
         EqualNode(const JSTokenLocation&, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
 
     class NotEqualNode final : public BinaryOpNode {
@@ -1305,7 +1305,7 @@ namespace JSC {
         StrictEqualNode(const JSTokenLocation&, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
 
     class NotStrictEqualNode final : public BinaryOpNode {
@@ -1334,7 +1334,7 @@ namespace JSC {
         LogicalOpNode(const JSTokenLocation&, ExpressionNode* expr1, ExpressionNode* expr2, LogicalOperator);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         void emitBytecodeInConditionContext(BytecodeGenerator&, Label& trueTarget, Label& falseTarget, FallThroughMode) override;
 
         LogicalOperator m_operator;
@@ -1376,7 +1376,7 @@ namespace JSC {
         ConditionalNode(const JSTokenLocation&, ExpressionNode* logical, ExpressionNode* expr1, ExpressionNode* expr2);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_logical;
         ExpressionNode* m_expr1;
@@ -1388,7 +1388,7 @@ namespace JSC {
         ReadModifyResolveNode(const JSTokenLocation&, const Identifier&, Operator, ExpressionNode*  right, bool rightHasAssignments, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const Identifier& m_ident;
         ExpressionNode* m_right;
@@ -1401,7 +1401,7 @@ namespace JSC {
         ShortCircuitReadModifyResolveNode(const JSTokenLocation&, const Identifier&, Operator, ExpressionNode*  right, bool rightHasAssignments, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const Identifier& m_ident;
         ExpressionNode* m_right;
@@ -1416,7 +1416,7 @@ namespace JSC {
         const Identifier& identifier() const { return m_ident; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const Identifier& m_ident;
         ExpressionNode* m_right;
@@ -1428,7 +1428,7 @@ namespace JSC {
         ReadModifyBracketNode(const JSTokenLocation&, ExpressionNode* base, ExpressionNode* subscript, Operator, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_base;
         ExpressionNode* m_subscript;
@@ -1443,7 +1443,7 @@ namespace JSC {
         ShortCircuitReadModifyBracketNode(const JSTokenLocation&, ExpressionNode* base, ExpressionNode* subscript, Operator, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_base;
         ExpressionNode* m_subscript;
@@ -1458,7 +1458,7 @@ namespace JSC {
         AssignBracketNode(const JSTokenLocation&, ExpressionNode* base, ExpressionNode* subscript, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_base;
         ExpressionNode* m_subscript;
@@ -1472,7 +1472,7 @@ namespace JSC {
         AssignDotNode(const JSTokenLocation&, ExpressionNode* base, const Identifier&, ExpressionNode* right, bool rightHasAssignments, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_base;
         const Identifier& m_ident;
@@ -1485,7 +1485,7 @@ namespace JSC {
         ReadModifyDotNode(const JSTokenLocation&, ExpressionNode* base, const Identifier&, Operator, ExpressionNode* right, bool rightHasAssignments, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_base;
         const Identifier& m_ident;
@@ -1499,7 +1499,7 @@ namespace JSC {
         ShortCircuitReadModifyDotNode(const JSTokenLocation&, ExpressionNode* base, const Identifier&, Operator, ExpressionNode* right, bool rightHasAssignments, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_base;
         const Identifier& m_ident;
@@ -1513,7 +1513,7 @@ namespace JSC {
         AssignErrorNode(const JSTokenLocation&, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
     
     class CommaNode final : public ExpressionNode {
@@ -1525,7 +1525,7 @@ namespace JSC {
 
     private:
         bool isCommaNode() const override { return true; }
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
         CommaNode* m_next { nullptr };
@@ -1560,7 +1560,7 @@ namespace JSC {
         StatementNode* lastStatement() const;
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool hasCompletionValue() const override;
         bool hasEarlyBreakOrContinue() const override;
@@ -1575,7 +1575,7 @@ namespace JSC {
         EmptyStatementNode(const JSTokenLocation&);
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool hasCompletionValue() const override { return false; }
         bool isEmptyStatement() const override { return true; }
@@ -1589,7 +1589,7 @@ namespace JSC {
         bool isDebuggerStatement() const override { return true; }
         
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
 
     class ExprStatementNode final : public StatementNode {
@@ -1601,7 +1601,7 @@ namespace JSC {
     private:
         bool isExprStatement() const override { return true; }
 
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
     };
@@ -1610,7 +1610,7 @@ namespace JSC {
     public:
         DeclarationStatement(const JSTokenLocation&, ExpressionNode*);
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool hasCompletionValue() const override { return false; }
 
@@ -1622,7 +1622,7 @@ namespace JSC {
         EmptyVarExpression(const JSTokenLocation&, const Identifier&);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const Identifier& m_ident;
     };
@@ -1632,7 +1632,7 @@ namespace JSC {
         EmptyLetExpression(const JSTokenLocation&, const Identifier&);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const Identifier& m_ident;
     };
@@ -1642,7 +1642,7 @@ namespace JSC {
         IfElseNode(const JSTokenLocation&, ExpressionNode* condition, StatementNode* ifBlock, StatementNode* elseBlock);
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         bool tryFoldBreakAndContinue(BytecodeGenerator&, StatementNode* ifBlock,
             Label*& trueTarget, FallThroughMode&);
 
@@ -1656,7 +1656,7 @@ namespace JSC {
         DoWhileNode(const JSTokenLocation&, StatementNode*, ExpressionNode*);
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         StatementNode* m_statement;
         ExpressionNode* m_expr;
@@ -1667,7 +1667,7 @@ namespace JSC {
         WhileNode(const JSTokenLocation&, ExpressionNode*, StatementNode*);
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
         StatementNode* m_statement;
@@ -1679,7 +1679,7 @@ namespace JSC {
         ForNode(const JSTokenLocation&, ExpressionNode* expr1, ExpressionNode* expr2, ExpressionNode* expr3, StatementNode*, VariableEnvironment&);
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr1;
         ExpressionNode* m_expr2;
@@ -1712,7 +1712,7 @@ namespace JSC {
         RegisterID* tryGetBoundLocal(BytecodeGenerator&);
         void emitLoopHeader(BytecodeGenerator&, RegisterID* propertyName);
 
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
     
     class ForOfNode final : public EnumerationNode {
@@ -1723,7 +1723,7 @@ namespace JSC {
         bool isForAwait() const { return m_isForAwait; }
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const bool m_isForAwait;
     };
@@ -1736,7 +1736,7 @@ namespace JSC {
     private:
         bool hasCompletionValue() const override { return false; }
         bool isContinue() const override { return true; }
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const Identifier& m_ident;
     };
@@ -1749,7 +1749,7 @@ namespace JSC {
     private:
         bool hasCompletionValue() const override { return false; }
         bool isBreak() const override { return true; }
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const Identifier& m_ident;
     };
@@ -1761,7 +1761,7 @@ namespace JSC {
         ExpressionNode* value() { return m_value; }
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isReturnNode() const override { return true; }
 
@@ -1773,7 +1773,7 @@ namespace JSC {
         WithNode(const JSTokenLocation&, ExpressionNode*, StatementNode*, const JSTextPosition& divot, uint32_t expressionLength);
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
         StatementNode* m_statement;
@@ -1789,7 +1789,7 @@ namespace JSC {
 
     private:
         bool hasCompletionValue() const override { return m_statement->hasCompletionValue(); }
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         const Identifier& m_name;
         StatementNode* m_statement;
@@ -1800,7 +1800,7 @@ namespace JSC {
         ThrowNode(const JSTokenLocation&, ExpressionNode*);
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
     };
@@ -1811,7 +1811,7 @@ namespace JSC {
         TryNode(const JSTokenLocation&, StatementNode* tryBlock, DestructuringPatternNode* catchPattern, StatementNode* catchBlock, VariableEnvironment& catchEnvironment, StatementNode* finallyBlock);
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         StatementNode* m_tryBlock;
         DestructuringPatternNode* m_catchPattern;
@@ -1912,7 +1912,7 @@ namespace JSC {
         static constexpr bool scopeIsFunction = false;
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         unsigned m_startColumn;
         unsigned m_endColumn;
     };
@@ -1927,7 +1927,7 @@ namespace JSC {
         static constexpr bool scopeIsFunction = false;
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         unsigned m_endColumn;
     };
@@ -1947,7 +1947,7 @@ namespace JSC {
         }
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         unsigned m_startColumn;
         unsigned m_endColumn;
         Ref<ModuleScopeData> m_moduleScopeData;
@@ -2008,7 +2008,7 @@ namespace JSC {
         ModuleNameNode* moduleName() const { return m_moduleName; }
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         void analyzeModule(ModuleAnalyzer&) override;
 
         ImportSpecifierListNode* m_specifierList;
@@ -2022,7 +2022,7 @@ namespace JSC {
         ModuleNameNode* moduleName() const { return m_moduleName; }
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         void analyzeModule(ModuleAnalyzer&) override;
 
         ModuleNameNode* m_moduleName;
@@ -2036,7 +2036,7 @@ namespace JSC {
         const Identifier& localName() const { return m_localName; }
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         void analyzeModule(ModuleAnalyzer&) override;
         StatementNode* m_declaration;
         const Identifier& m_localName;
@@ -2049,7 +2049,7 @@ namespace JSC {
         const StatementNode& declaration() const { return *m_declaration; }
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         void analyzeModule(ModuleAnalyzer&) override;
         StatementNode* m_declaration;
     };
@@ -2089,7 +2089,7 @@ namespace JSC {
         ModuleNameNode* moduleName() const { return m_moduleName; }
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
         void analyzeModule(ModuleAnalyzer&) override;
         ExportSpecifierListNode* m_specifierList;
         ModuleNameNode* m_moduleName { nullptr };
@@ -2190,7 +2190,7 @@ namespace JSC {
 
         FunctionParameters* parameters() const { return m_parameters; }
 
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isFunctionNode() const override { return true; }
 
@@ -2234,7 +2234,7 @@ namespace JSC {
         FuncExprNode(const JSTokenLocation&, const Identifier&, FunctionMetadataNode*, const SourceCode&, FunctionMode);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isFuncExprNode() const override { return true; }
     };
@@ -2244,7 +2244,7 @@ namespace JSC {
         ArrowFuncExprNode(const JSTokenLocation&, const Identifier&, FunctionMetadataNode*, const SourceCode&);
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isArrowFuncExprNode() const override { return true; }
     };
@@ -2254,7 +2254,7 @@ namespace JSC {
         MethodDefinitionNode(const JSTokenLocation&, const Identifier&, FunctionMetadataNode*, const SourceCode&);
         
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
     };
 
     class YieldExprNode final : public ExpressionNode, public ThrowableExpressionData {
@@ -2265,7 +2265,7 @@ namespace JSC {
         bool delegate() const { return m_delegate; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_argument;
         bool m_delegate;
@@ -2278,7 +2278,7 @@ namespace JSC {
         ExpressionNode* argument() const { return m_argument; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_argument;
     };
@@ -2313,7 +2313,7 @@ namespace JSC {
         bool hasInstanceFields() const { return m_classElements ? m_classElements->hasInstanceFields() : false; }
 
     private:
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool isClassExprNode() const override { return true; }
 
@@ -2336,7 +2336,7 @@ namespace JSC {
         virtual bool isBindingNode() const { return false; }
         virtual bool isAssignmentElementNode() const { return false; }
         virtual bool isRestParameter() const { return false; }
-        virtual RegisterID* emitDirectBinding(BytecodeGenerator&, RegisterID*, ExpressionNode*) { return 0; }
+        virtual RegisterID* emitDirectBinding(BytecodeGenerator&, RegisterID*, ExpressionNode*) { return nullptr; }
         
     protected:
         DestructuringPatternNode();
@@ -2482,7 +2482,7 @@ namespace JSC {
     private:
         bool isAssignmentLocation() const override { return true; }
         bool isDestructuringNode() const override { return true; }
-        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         DestructuringPatternNode* m_bindings;
         ExpressionNode* m_initializer;
@@ -2528,7 +2528,7 @@ namespace JSC {
         FunctionMetadataNode* metadata() { return m_metadata; }
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         FunctionMetadataNode* m_metadata;
     };
@@ -2538,7 +2538,7 @@ namespace JSC {
         ClassDeclNode(const JSTokenLocation&, ExpressionNode* classExpression);
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         bool hasCompletionValue() const override { return false; }
 
@@ -2547,7 +2547,7 @@ namespace JSC {
 
     class CaseClauseNode final : public ParserArenaFreeable {
     public:
-        CaseClauseNode(ExpressionNode*, SourceElements* = 0);
+        CaseClauseNode(ExpressionNode*, SourceElements* = nullptr);
 
         ExpressionNode* expr() const { return m_expr; }
 
@@ -2593,7 +2593,7 @@ namespace JSC {
         SwitchNode(const JSTokenLocation&, ExpressionNode*, CaseBlockNode*, VariableEnvironment&, FunctionStack&&);
 
     private:
-        void emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+        void emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) override;
 
         ExpressionNode* m_expr;
         CaseBlockNode* m_block;
index 766a2b3..eb2ed6f 100644 (file)
@@ -357,7 +357,7 @@ template <class TreeBuilder> TreeSourceElements Parser<LexerType>::parseSourceEl
 {
     const unsigned lengthOfUseStrictLiteral = 12; // "use strict".length
     TreeSourceElements sourceElements = context.createSourceElements();
-    const Identifier* directive = 0;
+    const Identifier* directive = nullptr;
     unsigned directiveLiteralLength = 0;
     auto savePoint = createSavePoint(context);
     bool shouldCheckForUseStrict = mode == CheckForStrictMode;
@@ -438,7 +438,7 @@ template <class TreeBuilder> TreeSourceElements Parser<LexerType>::parseModuleSo
         }
 
         default: {
-            const Identifier* directive = 0;
+            const Identifier* directive = nullptr;
             unsigned directiveLiteralLength = 0;
             if (parseMode == SourceParseMode::ModuleAnalyzeMode) {
                 if (!parseStatementListItem(syntaxChecker, directive, &directiveLiteralLength))
@@ -761,7 +761,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseDoWhileStatem
     ASSERT(match(DO));
     int startLine = tokenLine();
     next();
-    const Identifier* unused = 0;
+    const Identifier* unused = nullptr;
     startLoop();
     TreeStatement statement = parseStatement(context, unused);
     endLoop();
@@ -796,7 +796,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseWhileStatemen
     int endLine = tokenLine();
     handleProductionOrFail(CLOSEPAREN, ")", "end", "while loop condition");
 
-    const Identifier* unused = 0;
+    const Identifier* unused = nullptr;
     startLoop();
     TreeStatement statement = parseStatement(context, unused);
     endLoop();
@@ -815,8 +815,8 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseVariableDecl
     JSToken lastIdentToken; 
     AssignmentContext assignmentContext = assignmentContextFromDeclarationType(declarationType);
     do {
-        lastIdent = 0;
         lastPattern = TreeDestructuringPattern(0);
+        lastIdent = nullptr;
         JSTokenLocation location(tokenLocation());
         next();
         if (head) {
@@ -876,7 +876,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseVariableDecl
                     node = context.createEmptyLetExpression(varStartLocation, *name);
             }
         } else {
-            lastIdent = 0;
+            lastIdent = nullptr;
             auto pattern = parseDestructuringPattern(context, destructuringKindFromDeclarationType(declarationType), exportType, nullptr, nullptr, assignmentContext);
             failIfFalse(pattern, "Cannot parse this destructuring pattern");
             hasInitializer = match(EQUAL);
@@ -1423,7 +1423,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseForStatement(
         
         handleProductionOrFail(CLOSEPAREN, ")", "end", (isOfEnumeration ? "for-of header" : "for-in header"));
         
-        const Identifier* unused = 0;
+        const Identifier* unused = nullptr;
         startLoop();
         TreeStatement statement = parseStatement(context, unused);
         endLoop();
@@ -1488,7 +1488,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseForStatement(
         }
         int endLine = tokenLine();
         handleProductionOrFail(CLOSEPAREN, ")", "end", "for-loop header");
-        const Identifier* unused = 0;
+        const Identifier* unused = nullptr;
         startLoop();
         TreeStatement statement = parseStatement(context, unused);
         endLoop();
@@ -1519,7 +1519,7 @@ enumerationLoop:
     int endLine = tokenLine();
     
     handleProductionOrFail(CLOSEPAREN, ")", "end", (isOfEnumeration ? "for-of header" : "for-in header"));
-    const Identifier* unused = 0;
+    const Identifier* unused = nullptr;
     startLoop();
     TreeStatement statement = parseStatement(context, unused);
     endLoop();
@@ -1657,7 +1657,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseWithStatement
     JSTextPosition end = lastTokenEndPosition();
     int endLine = tokenLine();
     handleProductionOrFail(CLOSEPAREN, ")", "start", "subject of a 'with' statement");
-    const Identifier* unused = 0;
+    const Identifier* unused = nullptr;
     TreeStatement statement = parseStatement(context, unused);
     failIfFalse(statement, "A 'with' statement must have a body");
     
@@ -2356,7 +2356,7 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild
         ASSERT(startColumn != -1);
 
         // If we know about this function already, we can use the cached info and skip the parser to the end of the function.
-        if (const SourceProviderCacheItem* cachedInfo = TreeBuilder::CanUseFunctionCache ? findCachedFunctionInfo(parametersStart) : 0) {
+        if (const SourceProviderCacheItem* cachedInfo = TreeBuilder::CanUseFunctionCache ? findCachedFunctionInfo(parametersStart) : nullptr) {
             // If we're in a strict context, the cached function info must say it was strict too.
             ASSERT(!strictMode() || cachedInfo->strictMode);
             JSTokenLocation endLocation;
@@ -3167,7 +3167,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseExpressionOrL
     default:
         break;
     }
-    const Identifier* unused = 0;
+    const Identifier* unused = nullptr;
     ScopeRef labelScope = currentScope();
     for (size_t i = 0; i < labels.size(); i++)
         pushLabel(labels[i].m_ident, isLoop);
@@ -3222,7 +3222,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseIfStatement(T
     int end = tokenLine();
     handleProductionOrFail2(CLOSEPAREN, ")", "end", "'if' condition");
 
-    const Identifier* unused = 0;
+    const Identifier* unused = nullptr;
     m_immediateParentAllowsFunctionDeclarationInStatement = true;
     TreeStatement trueBlock = parseStatement(context, unused);
     failIfFalse(trueBlock, "Expected a statement as the body of an if block");
@@ -3239,7 +3239,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseIfStatement(T
         JSTokenLocation tempLocation = tokenLocation();
         next();
         if (!match(IF)) {
-            const Identifier* unused = 0;
+            const Identifier* unused = nullptr;
             m_immediateParentAllowsFunctionDeclarationInStatement = true;
             TreeStatement block = parseStatement(context, unused);
             failIfFalse(block, "Expected a statement as the body of an else block");
@@ -3257,7 +3257,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseIfStatement(T
         recordPauseLocation(context.breakpointLocation(innerCondition));
         int innerEnd = tokenLine();
         handleProductionOrFail2(CLOSEPAREN, ")", "end", "'if' condition");
-        const Identifier* unused = 0;
+        const Identifier* unused = nullptr;
         m_immediateParentAllowsFunctionDeclarationInStatement = true;
         TreeStatement innerTrueBlock = parseStatement(context, unused);
         failIfFalse(innerTrueBlock, "Expected a statement as the body of an if block");
@@ -3891,7 +3891,7 @@ template <typename TreeBuilder> TreeExpression Parser<LexerType>::parseAssignmen
         if (strictMode() && m_parserState.lastIdentifier && context.isResolve(lhs)) {
             failIfTrueIfStrict(m_vm.propertyNames->eval == *m_parserState.lastIdentifier, "Cannot modify 'eval' in strict mode");
             failIfTrueIfStrict(m_vm.propertyNames->arguments == *m_parserState.lastIdentifier, "Cannot modify 'arguments' in strict mode");
-            m_parserState.lastIdentifier = 0;
+            m_parserState.lastIdentifier = nullptr;
         }
         lhs = parseAssignmentExpression(context);
         failIfFalse(lhs, "Cannot parse the right hand side of an assignment expression");
@@ -4254,7 +4254,7 @@ template <typename LexerType>
 template <class TreeBuilder> TreeProperty Parser<LexerType>::parseGetterSetter(TreeBuilder& context, bool strict, PropertyNode::Type type, unsigned getterOrSetterStartOffset,
     ConstructorKind constructorKind, ClassElementTag tag)
 {
-    const Identifier* stringPropertyName = 0;
+    const Identifier* stringPropertyName = nullptr;
     double numericPropertyName = 0;
     TreeExpression computedPropertyName = 0;
 
index 168b6ff..54b3973 100644 (file)
@@ -220,12 +220,12 @@ public:
     ScopeLabelInfo* getLabel(const Identifier* label)
     {
         if (!m_labels)
-            return 0;
+            return nullptr;
         for (int i = m_labels->size(); i > 0; i--) {
             if (m_labels->at(i - 1).uid == label->impl())
                 return &m_labels->at(i - 1);
         }
-        return 0;
+        return nullptr;
     }
 
     void setSourceParseMode(SourceParseMode mode)
@@ -977,7 +977,7 @@ private:
         
         void setPopped()