Ignore:
Timestamp:
Mar 23, 2022, 6:40:35 PM (3 years ago)
Author:
Chris Dumez
Message:

Prepare JSC for making the String(const char*) constructor explicit
https://bugs.webkit.org/show_bug.cgi?id=238264

Reviewed by Geoff Garen.

Source/JavaScriptCore:

Prepare JSC for making the String(const char*) constructor explicit. Making this constructor
explicit helps catch many instances where we're constructing a String from a literal but we
are missing the ""_s suffix.

  • API/JSAPIGlobalObject.cpp:
  • API/JSAPIGlobalObject.mm:

(JSC::computeValidImportSpecifier):
(JSC::JSAPIGlobalObject::moduleLoaderFetch):

  • API/JSAPIValueWrapper.cpp:
  • API/JSAPIWrapperObject.mm:
  • API/JSCallbackConstructor.cpp:
  • API/JSCallbackFunction.cpp:
  • API/JSCallbackObject.cpp:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::getOwnPropertySlot):

  • API/JSScript.mm:

(-[JSScript readCache]):

  • API/JSTypedArray.cpp:

(JSObjectMakeTypedArrayWithArrayBuffer):
(JSObjectMakeTypedArrayWithArrayBufferAndOffset):

  • API/JSValue.mm:

(createStructHandlerMap):
(handerForStructTag):

  • API/JSWrapperMap.mm:

(allocateConstructorForCustomClass):

  • API/ObjCCallbackFunction.mm:

(JSC::ObjCCallbackFunctionImpl::name):

  • API/glib/JSAPIWrapperGlobalObject.cpp:
  • API/glib/JSAPIWrapperObjectGLib.cpp:
  • API/glib/JSCCallbackFunction.cpp:
  • API/tests/JSONParseTest.cpp:

(testJSONParse):

  • bindings/ScriptFunctionCall.cpp:

(Deprecated::ScriptCallArgumentHandler::appendArgument):

  • bytecode/CodeBlock.cpp:
  • bytecode/EvalCodeBlock.cpp:
  • bytecode/ExecutableToCodeBlockEdge.cpp:
  • bytecode/ExitKind.cpp:

(JSC::exitKindToString):

  • bytecode/ExitKind.h:
  • bytecode/FunctionCodeBlock.cpp:
  • bytecode/ModuleProgramCodeBlock.cpp:
  • bytecode/ProgramCodeBlock.cpp:
  • bytecode/UnlinkedCodeBlock.cpp:
  • bytecode/UnlinkedEvalCodeBlock.cpp:
  • bytecode/UnlinkedFunctionCodeBlock.cpp:
  • bytecode/UnlinkedFunctionExecutable.cpp:
  • bytecode/UnlinkedModuleProgramCodeBlock.cpp:
  • bytecode/UnlinkedProgramCodeBlock.cpp:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitHasPrivateBrand):
(JSC::BytecodeGenerator::emitCheckPrivateBrand):
(JSC::BytecodeGenerator::emitReturn):

  • bytecompiler/NodesCodegen.cpp:

(JSC::PropertyListNode::emitSaveComputedFieldName):
(JSC::BaseDotNode::emitGetPropertyValue):
(JSC::BaseDotNode::emitPutProperty):
(JSC::PostfixNode::emitDot):
(JSC::DeleteBracketNode::emitBytecode):
(JSC::DeleteDotNode::emitBytecode):
(JSC::PrefixNode::emitDot):
(JSC::InstanceOfNode::emitBytecode):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::functionName const):

  • debugger/DebuggerScope.cpp:
  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::json):

  • heap/RootMarkReason.cpp:

(JSC::rootMarkReasonDescription):

  • heap/RootMarkReason.h:
  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::appendAPIBacktrace):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::getInternalProperties):

  • inspector/JSInjectedScriptHostPrototype.cpp:
  • inspector/JSJavaScriptCallFrame.cpp:
  • inspector/JSJavaScriptCallFramePrototype.cpp:
  • inspector/agents/InspectorAuditAgent.cpp:

(Inspector::InspectorAuditAgent::run):

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::getScriptSource):

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::InspectorHeapAgent::getRemoteObject):

  • jit/ExecutableAllocator.cpp:

(JSC::dumpJITMemory):

  • jit/JITCode.cpp:

(JSC::JITCode::typeName):

  • jit/JITCode.h:
  • jit/JITOperations.cpp:

(JSC::getWrappedValue):

  • jsc.cpp:

(toCString):
(JSC_DEFINE_HOST_FUNCTION):
(runWithOptions):
(CommandLine::parseArguments):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::handleVarargsCheckpoint):

  • parser/Lexer.cpp:

(JSC::Lexer<T>::scanRegExp):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parsePrimaryExpression):

  • runtime/AbstractModuleRecord.cpp:
  • runtime/AggregateErrorConstructor.cpp:
  • runtime/ArrayConstructor.cpp:
  • runtime/ArrayIteratorPrototype.cpp:
  • runtime/ArrayPrototype.cpp:
  • runtime/AsyncFromSyncIteratorPrototype.cpp:
  • runtime/AsyncFunctionConstructor.cpp:
  • runtime/AsyncFunctionPrototype.cpp:
  • runtime/AsyncGeneratorFunctionConstructor.cpp:
  • runtime/AsyncGeneratorFunctionPrototype.cpp:
  • runtime/AsyncGeneratorPrototype.cpp:
  • runtime/AsyncIteratorPrototype.cpp:
  • runtime/AtomicsObject.cpp:
  • runtime/BigIntConstructor.cpp:
  • runtime/BigIntObject.cpp:
  • runtime/BigIntPrototype.cpp:
  • runtime/BooleanConstructor.cpp:
  • runtime/BooleanObject.cpp:
  • runtime/BooleanPrototype.cpp:
  • runtime/BytecodeCacheError.cpp:

(JSC::BytecodeCacheError::StandardError::message const):

  • runtime/CallData.cpp:

(JSC::call):

  • runtime/CallData.h:
  • runtime/ClassInfo.h:
  • runtime/ClonedArguments.cpp:
  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):

  • runtime/Completion.cpp:

(JSC::checkModuleSyntax):
(JSC::createSymbolForEntryPointModule):

  • runtime/ConsoleObject.cpp:
  • runtime/ConstructData.cpp:

(JSC::construct):

  • runtime/ConstructData.h:
  • runtime/CustomGetterSetter.cpp:
  • runtime/DOMAttributeGetterSetter.cpp:
  • runtime/DateConstructor.cpp:
  • runtime/DateInstance.cpp:
  • runtime/DatePrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/DirectArguments.cpp:
  • runtime/Error.h:

(JSC::throwVMError):

  • runtime/ErrorConstructor.cpp:
  • runtime/ErrorInstance.cpp:
  • runtime/ErrorPrototype.cpp:
  • runtime/EvalExecutable.cpp:
  • runtime/Exception.cpp:
  • runtime/ExceptionHelpers.cpp:

(JSC::notAFunctionSourceAppender):
(JSC::invalidParameterInSourceAppender):
(JSC::invalidParameterInstanceofSourceAppender):
(JSC::invalidPrototypeSourceAppender):
(JSC::createTDZError):
(JSC::createInvalidPrivateNameError):
(JSC::createRedefinedPrivateNameError):
(JSC::createPrivateMethodAccessError):
(JSC::createReinstallPrivateMethodError):

  • runtime/ExecutableBase.cpp:
  • runtime/FinalizationRegistryConstructor.cpp:
  • runtime/FinalizationRegistryPrototype.cpp:
  • runtime/FunctionConstructor.cpp:
  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::toStringSlow):

  • runtime/FunctionPrototype.cpp:
  • runtime/FunctionRareData.cpp:
  • runtime/GeneratorFunctionConstructor.cpp:
  • runtime/GeneratorFunctionPrototype.cpp:
  • runtime/GeneratorPrototype.cpp:
  • runtime/GetterSetter.cpp:
  • runtime/GlobalExecutable.cpp:
  • runtime/HashMapImpl.cpp:
  • runtime/InternalFunction.cpp:
  • runtime/IntlCollator.cpp:

(JSC::IntlCollator::initializeCollator):

  • runtime/IntlCollatorConstructor.cpp:
  • runtime/IntlCollatorPrototype.cpp:
  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::initializeDateTimeFormat):

  • runtime/IntlDateTimeFormatConstructor.cpp:
  • runtime/IntlDateTimeFormatPrototype.cpp:
  • runtime/IntlDisplayNames.cpp:
  • runtime/IntlDisplayNamesConstructor.cpp:
  • runtime/IntlDisplayNamesPrototype.cpp:
  • runtime/IntlListFormat.cpp:
  • runtime/IntlListFormatConstructor.cpp:
  • runtime/IntlListFormatPrototype.cpp:
  • runtime/IntlLocale.cpp:

(JSC::IntlLocale::initializeLocale):

  • runtime/IntlLocaleConstructor.cpp:
  • runtime/IntlLocalePrototype.cpp:
  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::initializeNumberFormat):

  • runtime/IntlNumberFormatConstructor.cpp:
  • runtime/IntlNumberFormatPrototype.cpp:
  • runtime/IntlObject.cpp:

(JSC::intlStringOption):

  • runtime/IntlObject.h:
  • runtime/IntlPluralRules.cpp:
  • runtime/IntlPluralRulesConstructor.cpp:
  • runtime/IntlPluralRulesPrototype.cpp:
  • runtime/IntlRelativeTimeFormat.cpp:

(JSC::IntlRelativeTimeFormat::initializeRelativeTimeFormat):

  • runtime/IntlRelativeTimeFormatConstructor.cpp:
  • runtime/IntlRelativeTimeFormatPrototype.cpp:
  • runtime/IntlSegmentIterator.cpp:
  • runtime/IntlSegmentIteratorPrototype.cpp:
  • runtime/IntlSegmenter.cpp:
  • runtime/IntlSegmenterConstructor.cpp:
  • runtime/IntlSegmenterPrototype.cpp:
  • runtime/IntlSegments.cpp:
  • runtime/IntlSegmentsPrototype.cpp:
  • runtime/IteratorPrototype.cpp:
  • runtime/JSArray.cpp:

(JSC::JSArray::tryCreateUninitializedRestricted):

  • runtime/JSArrayBuffer.cpp:
  • runtime/JSArrayBufferConstructor.cpp:
  • runtime/JSArrayBufferPrototype.cpp:
  • runtime/JSArrayBufferView.cpp:
  • runtime/JSArrayIterator.cpp:
  • runtime/JSAsyncFunction.cpp:
  • runtime/JSAsyncGenerator.cpp:
  • runtime/JSAsyncGeneratorFunction.cpp:
  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::parseInt):

  • runtime/JSBoundFunction.cpp:
  • runtime/JSCallee.cpp:
  • runtime/JSCell.cpp:

(JSC::JSCell::dumpToStream):
(JSC::JSCell::className const):

  • runtime/JSCell.h:
  • runtime/JSCustomGetterFunction.cpp:
  • runtime/JSCustomSetterFunction.cpp:
  • runtime/JSDataView.cpp:
  • runtime/JSDataViewPrototype.cpp:

(JSC::JSC_DEFINE_CUSTOM_GETTER):

  • runtime/JSFinalizationRegistry.cpp:

(JSC::JSFinalizationRegistry::runFinalizationCleanup):

  • runtime/JSFunction.cpp:
  • runtime/JSGenerator.cpp:
  • runtime/JSGeneratorFunction.cpp:
  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::create):
(JSC::JSGenericTypedArrayView<Adaptor>::validateRange):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::speciesConstruct):
(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):

  • runtime/JSGlobalLexicalEnvironment.cpp:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSImmutableButterfly.cpp:
  • runtime/JSInternalPromise.cpp:
  • runtime/JSInternalPromiseConstructor.cpp:
  • runtime/JSInternalPromisePrototype.cpp:
  • runtime/JSLexicalEnvironment.cpp:
  • runtime/JSMap.cpp:
  • runtime/JSMapIterator.cpp:
  • runtime/JSModuleEnvironment.cpp:
  • runtime/JSModuleLoader.cpp:
  • runtime/JSModuleNamespaceObject.cpp:
  • runtime/JSModuleRecord.cpp:
  • runtime/JSNativeStdFunction.cpp:
  • runtime/JSONObject.cpp:
  • runtime/JSObject.cpp:

(JSC::JSObject::markAuxiliaryAndVisitOutOfLineProperties):

  • runtime/JSPromise.cpp:
  • runtime/JSPromiseConstructor.cpp:
  • runtime/JSPromisePrototype.cpp:
  • runtime/JSPropertyNameEnumerator.cpp:
  • runtime/JSProxy.cpp:
  • runtime/JSRemoteFunction.cpp:

(JSC::wrapArgument):
(JSC::wrapReturnValue):
(JSC::JSRemoteFunction::finishCreation):

  • runtime/JSScope.cpp:
  • runtime/JSScriptFetchParameters.cpp:
  • runtime/JSScriptFetcher.cpp:
  • runtime/JSSegmentedVariableObject.cpp:
  • runtime/JSSet.cpp:
  • runtime/JSSetIterator.cpp:
  • runtime/JSSourceCode.cpp:
  • runtime/JSString.cpp:

(JSC::JSString::dumpToStream):

  • runtime/JSStringIterator.cpp:
  • runtime/JSSymbolTableObject.cpp:
  • runtime/JSTemplateObjectDescriptor.cpp:
  • runtime/JSTypedArrayConstructors.cpp:
  • runtime/JSTypedArrayPrototypes.cpp:
  • runtime/JSTypedArrayViewConstructor.cpp:
  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSTypedArrays.cpp:
  • runtime/JSWeakMap.cpp:
  • runtime/JSWeakObjectRef.cpp:
  • runtime/JSWeakSet.cpp:
  • runtime/JSWithScope.cpp:
  • runtime/LiteralParser.cpp:

(JSC::LiteralParser<CharType>::parsePrimitiveValue):

  • runtime/MapConstructor.cpp:
  • runtime/MapIteratorPrototype.cpp:
  • runtime/MapPrototype.cpp:
  • runtime/MathObject.cpp:
  • runtime/ModuleProgramExecutable.cpp:
  • runtime/NativeErrorConstructor.cpp:
  • runtime/NativeExecutable.cpp:
  • runtime/NullGetterFunction.cpp:
  • runtime/NullSetterFunction.cpp:
  • runtime/NumberConstructor.cpp:
  • runtime/NumberObject.cpp:
  • runtime/NumberPrototype.cpp:

(JSC::toStringWithRadix):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::numberToStringInternal):
(JSC::int52ToString):

  • runtime/ObjectConstructor.cpp:
  • runtime/ObjectPrototype.cpp:
  • runtime/Operations.h:

(JSC::arithmeticBinaryOp):
(JSC::shift):
(JSC::bitwiseBinaryOp):

  • runtime/ProgramExecutable.cpp:
  • runtime/PropertyTable.cpp:
  • runtime/ProxyConstructor.cpp:

(JSC::ProxyConstructor::finishCreation):

  • runtime/ProxyObject.cpp:
  • runtime/ProxyRevoke.cpp:
  • runtime/ReflectObject.cpp:
  • runtime/RegExp.cpp:
  • runtime/RegExpCache.cpp:

(JSC::RegExpCache::ensureEmptyRegExpSlow):

  • runtime/RegExpConstructor.cpp:
  • runtime/RegExpObject.cpp:
  • runtime/RegExpPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/RegExpStringIteratorPrototype.cpp:
  • runtime/ScopedArguments.cpp:
  • runtime/ScopedArgumentsTable.cpp:
  • runtime/ScriptExecutable.cpp:
  • runtime/SetConstructor.cpp:
  • runtime/SetIteratorPrototype.cpp:
  • runtime/SetPrototype.cpp:
  • runtime/ShadowRealmConstructor.cpp:
  • runtime/ShadowRealmObject.cpp:
  • runtime/ShadowRealmPrototype.cpp:
  • runtime/SparseArrayValueMap.cpp:
  • runtime/StrictEvalActivation.cpp:
  • runtime/StringConstructor.cpp:
  • runtime/StringIteratorPrototype.cpp:
  • runtime/StringObject.cpp:
  • runtime/StringPrototype.cpp:

(JSC::toLocaleCase):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/Structure.cpp:
  • runtime/StructureChain.cpp:
  • runtime/StructureRareData.cpp:
  • runtime/Symbol.cpp:
  • runtime/SymbolConstructor.cpp:
  • runtime/SymbolObject.cpp:
  • runtime/SymbolPrototype.cpp:
  • runtime/SymbolTable.cpp:
  • runtime/TemporalCalendar.cpp:
  • runtime/TemporalCalendarConstructor.cpp:
  • runtime/TemporalCalendarPrototype.cpp:
  • runtime/TemporalDuration.cpp:

(JSC::TemporalDuration::total const):

  • runtime/TemporalDurationConstructor.cpp:
  • runtime/TemporalDurationPrototype.cpp:
  • runtime/TemporalInstant.cpp:
  • runtime/TemporalInstantConstructor.cpp:
  • runtime/TemporalInstantPrototype.cpp:
  • runtime/TemporalNow.cpp:
  • runtime/TemporalObject.cpp:

(JSC::temporalLargestUnit):
(JSC::temporalSmallestUnit):

  • runtime/TemporalPlainDate.cpp:
  • runtime/TemporalPlainDateConstructor.cpp:
  • runtime/TemporalPlainDatePrototype.cpp:
  • runtime/TemporalPlainTime.cpp:
  • runtime/TemporalPlainTimeConstructor.cpp:
  • runtime/TemporalPlainTimePrototype.cpp:
  • runtime/TemporalTimeZone.cpp:
  • runtime/TemporalTimeZoneConstructor.cpp:
  • runtime/TemporalTimeZonePrototype.cpp:
  • runtime/TypeProfiler.cpp:

(JSC::TypeProfiler::logTypesForTypeLocation):

  • runtime/TypeSet.cpp:

(JSC::StructureShape::propertyHash):

  • runtime/WeakMapConstructor.cpp:
  • runtime/WeakMapPrototype.cpp:

(JSC::WeakMapPrototype::finishCreation):

  • runtime/WeakObjectRefConstructor.cpp:
  • runtime/WeakObjectRefPrototype.cpp:
  • runtime/WeakSetConstructor.cpp:
  • runtime/WeakSetPrototype.cpp:

(JSC::WeakSetPrototype::finishCreation):

  • testRegExp.cpp:
  • tools/FunctionAllowlist.cpp:

(JSC::FunctionAllowlist::FunctionAllowlist):

  • tools/FunctionOverrides.cpp:

(JSC::initializeOverrideInfo):

  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSC_DEFINE_HOST_FUNCTION_WITH_ATTRIBUTES):

  • tools/SigillCrashAnalyzer.cpp:

(JSC::SigillCrashAnalyzer::analyze):

  • tools/VMInspector.cpp:

(JSC::VMInspector::dumpRegisters):
(JSC::VMInspector::dumpCellMemoryToStream):

  • wasm/WasmExceptionType.h:

(JSC::Wasm::errorMessageForExceptionType):

  • wasm/WasmFormat.h:

(JSC::Wasm::typeToString):

  • wasm/WasmGlobal.cpp:

(JSC::Wasm::Global::set):

  • wasm/WasmLLIntPlan.cpp:

(JSC::Wasm::LLIntPlan::didCompleteCompilation):

  • wasm/WasmOperations.cpp:

(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

  • wasm/js/JSToWasmICCallee.cpp:
  • wasm/js/JSWebAssembly.cpp:
  • wasm/js/JSWebAssemblyException.cpp:
  • wasm/js/JSWebAssemblyGlobal.cpp:

(JSC::JSWebAssemblyGlobal::type):

  • wasm/js/JSWebAssemblyHelpers.h:

(JSC::fromJSValue):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::createPrivateModuleKey):
(JSC::JSWebAssemblyInstance::tryCreate):

  • wasm/js/JSWebAssemblyMemory.cpp:
  • wasm/js/JSWebAssemblyModule.cpp:
  • wasm/js/JSWebAssemblyTable.cpp:

(JSC::JSWebAssemblyTable::type):

  • wasm/js/JSWebAssemblyTag.cpp:
  • wasm/js/WebAssemblyCompileErrorConstructor.cpp:
  • wasm/js/WebAssemblyCompileErrorPrototype.cpp:
  • wasm/js/WebAssemblyExceptionConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyExceptionPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyFunction.cpp:
  • wasm/js/WebAssemblyFunctionBase.cpp:
  • wasm/js/WebAssemblyGlobalConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyGlobalPrototype.cpp:
  • wasm/js/WebAssemblyInstanceConstructor.cpp:
  • wasm/js/WebAssemblyInstancePrototype.cpp:
  • wasm/js/WebAssemblyLinkErrorConstructor.cpp:
  • wasm/js/WebAssemblyLinkErrorPrototype.cpp:
  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyMemoryPrototype.cpp:
  • wasm/js/WebAssemblyModuleConstructor.cpp:
  • wasm/js/WebAssemblyModulePrototype.cpp:
  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::initializeExports):

  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
  • wasm/js/WebAssemblyRuntimeErrorPrototype.cpp:
  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyTablePrototype.cpp:
  • wasm/js/WebAssemblyTagConstructor.cpp:
  • wasm/js/WebAssemblyTagPrototype.cpp:
  • wasm/js/WebAssemblyWrapperFunction.cpp:

(JSC::WebAssemblyWrapperFunction::create):

  • yarr/RegularExpression.cpp:

(JSC::Yarr::RegularExpression::Private::compile):

  • yarr/YarrErrorCode.cpp:

(JSC::Yarr::errorMessage):

  • yarr/YarrErrorCode.h:

Source/WebCore:

  • bindings/js/JSDOMGlobalObject.cpp:
  • bindings/js/JSDOMWindowBase.cpp:
  • bindings/js/JSDOMWindowProperties.cpp:
  • bindings/js/JSFileSystemDirectoryHandleIterator.cpp:
  • bindings/js/JSIDBSerializationGlobalObject.cpp:
  • bindings/js/JSRemoteDOMWindowBase.cpp:
  • bindings/js/JSShadowRealmGlobalScopeBase.cpp:
  • bindings/js/JSWindowProxy.cpp:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:
  • bindings/js/JSWorkletGlobalScopeBase.cpp:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • bridge/objc/ObjCRuntimeObject.mm:
  • bridge/objc/objc_instance.mm:

(JSC::Bindings::ObjcInstance::getMethod):

  • bridge/objc/objc_runtime.mm:
  • bridge/runtime_array.cpp:
  • bridge/runtime_method.cpp:
  • bridge/runtime_object.cpp:

Source/WTF:

  • wtf/ResourceUsage.h:
  • wtf/cocoa/ResourceUsageCocoa.cpp:

(WTF::displayNameForVMTag):

  • wtf/text/WTFString.cpp:

(WTF::String::numberToStringFixedPrecision):
(WTF::String::number):
(WTF::String::numberToStringFixedWidth):

  • wtf/text/WTFString.h:
Location:
trunk/Source/JavaScriptCore/bytecompiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r289359 r291779  
    451451    case ConstructorKind::Naked:
    452452        if (!isConstructor()) {
    453             emitThrowTypeError("Cannot call a constructor without |new|");
     453            emitThrowTypeError("Cannot call a constructor without |new|"_s);
    454454            return;
    455455        }
     
    458458    case ConstructorKind::Extends:
    459459        if (!isConstructor()) {
    460             emitThrowTypeError("Cannot call a class constructor without |new|");
     460            emitThrowTypeError("Cannot call a class constructor without |new|"_s);
    461461            return;
    462462        }
     
    28722872        Ref<Label> isObjectLabel = newLabel();
    28732873        emitJumpIfTrue(emitIsObject(newTemporary(), base), isObjectLabel.get());
    2874         emitThrowTypeError("Cannot access static private method or accessor of a non-Object");
     2874        emitThrowTypeError("Cannot access static private method or accessor of a non-Object"_s);
    28752875        emitLabel(isObjectLabel.get());
    28762876        emitEqualityOp<OpStricteq>(dst, base, brand);
     
    28852885        Ref<Label> brandCheckOkLabel = newLabel();
    28862886        emitJumpIfTrue(emitEqualityOp<OpStricteq>(newTemporary(), base, brand), brandCheckOkLabel.get());
    2887         emitThrowTypeError("Cannot access static private method or accessor");
     2887        emitThrowTypeError("Cannot access static private method or accessor"_s);
    28882888        emitLabel(brandCheckOkLabel.get());
    28892889        return;
     
    36573657                Ref<Label> isUndefinedLabel = newLabel();
    36583658                emitJumpIfTrue(emitIsUndefined(newTemporary(), src), isUndefinedLabel.get());
    3659                 emitThrowTypeError("Cannot return a non-object type in the constructor of a derived class.");
     3659                emitThrowTypeError("Cannot return a non-object type in the constructor of a derived class."_s);
    36603660                emitLabel(isUndefinedLabel.get());
    36613661                emitTDZCheck(&m_thisRegister);
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r290026 r291779  
    897897        RefPtr<RegisterID> prototypeString = generator.emitLoad(nullptr, JSValue(generator.addStringConstant(generator.propertyNames().prototype)));
    898898        generator.emitJumpIfFalse(generator.emitBinaryOp<OpStricteq>(generator.newTemporary(), prototypeString.get(), propertyName.get(), OperandTypes(ResultType::stringType(), ResultType::stringType())), validPropertyNameLabel.get());
    899         generator.emitThrowTypeError("Cannot declare a static field named 'prototype'");
     899        generator.emitThrowTypeError("Cannot declare a static field named 'prototype'"_s);
    900900        generator.emitLabel(validPropertyNameLabel.get());
    901901    }
     
    10161016            RefPtr<RegisterID> privateBrandSymbol = generator.emitGetPrivateBrand(generator.newTemporary(), scope.get(), privateTraits.isStatic());
    10171017            generator.emitCheckPrivateBrand(base, privateBrandSymbol.get(), privateTraits.isStatic());
    1018             generator.emitThrowTypeError("Trying to access an undefined private getter");
     1018            generator.emitThrowTypeError("Trying to access an undefined private getter"_s);
    10191019            return dst;
    10201020        }
     
    10751075            generator.emitCheckPrivateBrand(base, privateBrandSymbol.get(), privateTraits.isStatic());
    10761076
    1077             generator.emitThrowTypeError("Trying to access an undefined private setter");
     1077            generator.emitThrowTypeError("Trying to access an undefined private setter"_s);
    10781078            return value;
    10791079        }
     
    24552455
    24562456            generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
    2457             generator.emitThrowTypeError("Trying to access an undefined private setter");
     2457            generator.emitThrowTypeError("Trying to access an undefined private setter"_s);
    24582458            return generator.tempDestination(dst);
    24592459        }
     
    24732473            value = generator.emitCall(generator.newTemporary(), getterFunction.get(), NoExpectedFunction, args, m_position, m_position, m_position, DebuggableCall::Yes);
    24742474        } else {
    2475             generator.emitThrowTypeError("Trying to access an undefined private getter");
     2475            generator.emitThrowTypeError("Trying to access an undefined private getter"_s);
    24762476            return generator.tempDestination(dst);
    24772477        }
     
    24912491        }
    24922492
    2493         generator.emitThrowTypeError("Trying to access an undefined private getter");
     2493        generator.emitThrowTypeError("Trying to access an undefined private getter"_s);
    24942494        return generator.move(dst, oldValue.get());
    24952495    }
     
    25592559    generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
    25602560    if (m_base->isSuperNode())
    2561         return emitThrowReferenceError(generator, "Cannot delete a super property", dst);
     2561        return emitThrowReferenceError(generator, "Cannot delete a super property"_s, dst);
    25622562    return generator.emitDeleteByVal(finalDest.get(), r0.get(), r1.get());
    25632563}
     
    25752575    generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
    25762576    if (m_base->isSuperNode())
    2577         return emitThrowReferenceError(generator, "Cannot delete a super property", dst);
     2577        return emitThrowReferenceError(generator, "Cannot delete a super property"_s, dst);
    25782578    return generator.emitDeleteById(finalDest.get(), r0.get(), m_ident);
    25792579}
     
    27442744
    27452745            generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
    2746             generator.emitThrowTypeError("Trying to access an undefined private setter");
     2746            generator.emitThrowTypeError("Trying to access an undefined private setter"_s);
    27472747            return generator.move(dst, propDst.get());
    27482748        }
     
    27612761            value = generator.emitCall(propDst.get(), getterFunction.get(), NoExpectedFunction, args, m_position, m_position, m_position, DebuggableCall::Yes);
    27622762        } else {
    2763             generator.emitThrowTypeError("Trying to access an undefined private getter");
     2763            generator.emitThrowTypeError("Trying to access an undefined private getter"_s);
    27642764            return generator.move(dst, propDst.get());
    27652765        }
     
    27792779        }
    27802780
    2781         generator.emitThrowTypeError("Trying to access an undefined private getter");
     2781        generator.emitThrowTypeError("Trying to access an undefined private getter"_s);
    27822782        return generator.move(dst, propDst.get());
    27832783    }
     
    32093209
    32103210    generator.emitLabel(typeError.get());
    3211     generator.emitThrowTypeError("Right hand side of instanceof is not an object");
     3211    generator.emitThrowTypeError("Right hand side of instanceof is not an object"_s);
    32123212
    32133213    generator.emitLabel(custom.get());
Note: See TracChangeset for help on using the changeset viewer.