[webkit-changes] [WebKit/WebKit] cb3a9d: Adopt ASCIILiterals in makeString, tryMakeString, ...

Žan Doberšek noreply at github.com
Wed Mar 8 10:37:56 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cb3a9da0118c397a5d2eb134f6cdc32509e93147
      https://github.com/WebKit/WebKit/commit/cb3a9da0118c397a5d2eb134f6cdc32509e93147
  Author: Žan Doberšek <zdobersek at igalia.com>
  Date:   2023-03-08 (Wed, 08 Mar 2023)

  Changed paths:
    M Source/JavaScriptCore/API/glib/JSCCallbackFunction.cpp
    M Source/JavaScriptCore/API/glib/JSCContext.cpp
    M Source/JavaScriptCore/API/glib/JSCValue.cpp
    M Source/JavaScriptCore/API/tests/ExecutionTimeLimitTest.cpp
    M Source/JavaScriptCore/API/tests/testapi.cpp
    M Source/JavaScriptCore/assembler/LinkBuffer.cpp
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
    M Source/JavaScriptCore/inspector/IdentifiersFactory.cpp
    M Source/JavaScriptCore/inspector/InjectedScriptBase.cpp
    M Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp
    M Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp
    M Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp
    M Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp
    M Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp
    M Source/JavaScriptCore/interpreter/Interpreter.cpp
    M Source/JavaScriptCore/jit/JIT.cpp
    M Source/JavaScriptCore/jsc.cpp
    M Source/JavaScriptCore/parser/Lexer.cpp
    M Source/JavaScriptCore/parser/Parser.cpp
    M Source/JavaScriptCore/parser/Parser.h
    M Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp
    M Source/JavaScriptCore/runtime/BytecodeCacheError.cpp
    M Source/JavaScriptCore/runtime/Error.cpp
    M Source/JavaScriptCore/runtime/ErrorInstance.cpp
    M Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
    M Source/JavaScriptCore/runtime/FunctionConstructor.cpp
    M Source/JavaScriptCore/runtime/IntlCollator.cpp
    M Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
    M Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
    M Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
    M Source/JavaScriptCore/runtime/IntlObject.cpp
    M Source/JavaScriptCore/runtime/IntlRelativeTimeFormat.cpp
    M Source/JavaScriptCore/runtime/JSCJSValueInlines.h
    M Source/JavaScriptCore/runtime/JSCustomGetterFunction.cpp
    M Source/JavaScriptCore/runtime/JSCustomSetterFunction.cpp
    M Source/JavaScriptCore/runtime/JSFunction.cpp
    M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
    M Source/JavaScriptCore/runtime/JSModuleLoader.cpp
    M Source/JavaScriptCore/runtime/JSModuleRecord.cpp
    M Source/JavaScriptCore/runtime/JSObject.cpp
    M Source/JavaScriptCore/runtime/LiteralParser.cpp
    M Source/JavaScriptCore/runtime/LiteralParser.h
    M Source/JavaScriptCore/runtime/NumberPrototype.cpp
    M Source/JavaScriptCore/runtime/Options.cpp
    M Source/JavaScriptCore/runtime/ProgramExecutable.cpp
    M Source/JavaScriptCore/runtime/ProxyObject.cpp
    M Source/JavaScriptCore/runtime/SamplingProfiler.cpp
    M Source/JavaScriptCore/runtime/Symbol.cpp
    M Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
    M Source/JavaScriptCore/wasm/WasmEntryPlan.cpp
    M Source/JavaScriptCore/wasm/WasmEntryPlan.h
    M Source/JavaScriptCore/wasm/WasmIndexOrName.cpp
    M Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp
    M Source/JavaScriptCore/wasm/WasmOMGPlan.cpp
    M Source/JavaScriptCore/wasm/WasmOSREntryPlan.cpp
    M Source/JavaScriptCore/wasm/js/WebAssemblyExceptionPrototype.cpp
    M Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp

  Log Message:
  -----------
  Adopt ASCIILiterals in makeString, tryMakeString, operator+ calls inside JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=252167

Reviewed by Darin Adler.

Convert different cases of makeString(), tryMakeString() and StringAppend-producing
operator+ calls from using native C string literals to using more-desired ASCIILiterals.

* Source/JavaScriptCore/API/glib/JSCCallbackFunction.cpp:
(JSC::JSCCallbackFunction::construct):
* Source/JavaScriptCore/API/glib/JSCContext.cpp:
(jscContextGArrayToJSArray):
(jscContextJSArrayToGArray):
(jscContextGValueToJSValue):
(jscContextJSValueToGValue):
* Source/JavaScriptCore/API/glib/JSCValue.cpp:
(jsc_value_new_array):
(jscValueCallFunction):
* Source/JavaScriptCore/API/tests/ExecutionTimeLimitTest.cpp:
(testExecutionTimeLimit):
* Source/JavaScriptCore/API/tests/testapi.cpp:
(TestAPI::markedJSValueArrayAndGC):
* Source/JavaScriptCore/assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::linkComments):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::runSlowPathGenerators):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* Source/JavaScriptCore/inspector/IdentifiersFactory.cpp:
(Inspector::addPrefixToIdentifier):
* Source/JavaScriptCore/inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::makeCall):
(Inspector::InjectedScriptBase::makeAsyncCall):
* Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp:
(Inspector::BackendDispatcher::dispatch):
(Inspector::BackendDispatcher::getPropertyValue):
* Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp:
(Inspector::JSGlobalObjectConsoleClient::profile):
(Inspector::JSGlobalObjectConsoleClient::profileEnd):
(Inspector::JSGlobalObjectConsoleClient::warnUnimplemented):
* Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp:
(Inspector::InspectorAuditAgent::run):
* Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::enable):
(Inspector::InspectorConsoleAgent::startTiming):
(Inspector::InspectorConsoleAgent::logTiming):
(Inspector::InspectorConsoleAgent::stopTiming):
(Inspector::InspectorConsoleAgent::count):
(Inspector::InspectorConsoleAgent::countReset):
* Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::objectGroupForBreakpointAction):
(Inspector::InspectorDebuggerAgent::ProtocolBreakpoint::ProtocolBreakpoint):
* Source/JavaScriptCore/interpreter/Interpreter.cpp:
(JSC::Interpreter::executeEval):
* Source/JavaScriptCore/jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* Source/JavaScriptCore/jsc.cpp:
(GlobalObject::moduleLoaderImportModule):
(GlobalObject::moduleLoaderResolve):
(GlobalObject::moduleLoaderFetch):
(FunctionJSCStackFunctor::operator() const):
(computeFilePath):
* Source/JavaScriptCore/parser/Lexer.cpp:
(JSC::Lexer<T>::invalidCharacterMessage const):
(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<T>::scanRegExp):
* Source/JavaScriptCore/parser/Parser.cpp:
(JSC::Parser<LexerType>::parseInner):
* Source/JavaScriptCore/parser/Parser.h:
(JSC::Parser::updateErrorWithNameAndMessage):
* Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp:
(JSC::AbstractModuleRecord::getModuleNamespace):
(JSC::printableName):
* Source/JavaScriptCore/runtime/BytecodeCacheError.cpp:
(JSC::BytecodeCacheError::WriteError::message const):
* Source/JavaScriptCore/runtime/Error.cpp:
(JSC::makeDOMAttributeGetterTypeErrorMessage):
(JSC::makeDOMAttributeSetterTypeErrorMessage):
(JSC::throwConstructorCannotBeCalledAsFunctionTypeError):
(JSC::createOutOfMemoryError):
* Source/JavaScriptCore/runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::sanitizedToString):
* Source/JavaScriptCore/runtime/ExceptionHelpers.cpp:
(JSC::createUndefinedVariableError):
(JSC::defaultApproximateSourceError):
(JSC::defaultSourceAppender):
(JSC::invalidParameterInSourceAppender):
(JSC::invalidParameterInstanceofSourceAppender):
(JSC::invalidPrototypeSourceAppender):
(JSC::createErrorForInvalidGlobalAssignment):
* Source/JavaScriptCore/runtime/FunctionConstructor.cpp:
(JSC::stringifyFunction):
* Source/JavaScriptCore/runtime/IntlCollator.cpp:
(JSC::IntlCollator::initializeCollator):
* Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
* Source/JavaScriptCore/runtime/IntlDurationFormat.cpp:
(JSC::IntlDurationFormat::initializeDurationFormat):
* Source/JavaScriptCore/runtime/IntlNumberFormat.cpp:
(JSC::IntlNumberFormat::initializeNumberFormat):
* Source/JavaScriptCore/runtime/IntlObject.cpp:
(JSC::intlDefaultNumberOption):
(JSC::canonicalizeLocaleList):
* Source/JavaScriptCore/runtime/IntlRelativeTimeFormat.cpp:
(JSC::IntlRelativeTimeFormat::initializeRelativeTimeFormat):
* Source/JavaScriptCore/runtime/JSCJSValueInlines.h:
(JSC::JSValue::toIndex const):
(JSC::JSValue::toTypedArrayIndex const):
* Source/JavaScriptCore/runtime/JSCustomGetterFunction.cpp:
(JSC::JSCustomGetterFunction::create):
* Source/JavaScriptCore/runtime/JSCustomSetterFunction.cpp:
(JSC::JSCustomSetterFunction::create):
* Source/JavaScriptCore/runtime/JSFunction.cpp:
(JSC::makeNameWithOutOfMemoryCheck):
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* Source/JavaScriptCore/runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::importModule):
(JSC::JSModuleLoader::fetch):
* Source/JavaScriptCore/runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::instantiateDeclarations):
* Source/JavaScriptCore/runtime/JSObject.cpp:
(JSC::JSObject::putDirectNativeIntrinsicGetter):
(JSC::JSObject::putDirectNativeIntrinsicGetterWithoutTransition):
* Source/JavaScriptCore/runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::Lexer::lex):
(JSC::LiteralParser<CharType>::Lexer::lexStringSlow):
(JSC::LiteralParser<CharType>::parsePrimitiveValue):
* Source/JavaScriptCore/runtime/LiteralParser.h:
(JSC::LiteralParser::getErrorMessage):
* Source/JavaScriptCore/runtime/NumberPrototype.cpp:
(JSC::throwVMToThisNumberError):
* Source/JavaScriptCore/runtime/Options.cpp:
(JSC::Options::setAliasedOption):
* Source/JavaScriptCore/runtime/ProgramExecutable.cpp:
(JSC::ProgramExecutable::initializeGlobalProperties):
* Source/JavaScriptCore/runtime/ProxyObject.cpp:
(JSC::ProxyObject::performPut):
(JSC::ProxyObject::performDefineOwnProperty):
(JSC::ProxyObject::performGetOwnPropertyNames):
* Source/JavaScriptCore/runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::reportTopBytecodes):
* Source/JavaScriptCore/runtime/Symbol.cpp:
(JSC::Symbol::descriptiveString const):
* Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::work):
(JSC::Wasm::BBQPlan::compileFunction):
(JSC::Wasm::BBQPlan::didCompleteCompilation):
* Source/JavaScriptCore/wasm/WasmEntryPlan.cpp:
(JSC::Wasm::EntryPlan::prepare):
* Source/JavaScriptCore/wasm/WasmEntryPlan.h:
(JSC::Wasm::EntryPlan::tryReserveCapacity):
* Source/JavaScriptCore/wasm/WasmIndexOrName.cpp:
(JSC::Wasm::makeString):
* Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp:
(JSC::Wasm::LLIntPlan::compileFunction):
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
* Source/JavaScriptCore/wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::work):
* Source/JavaScriptCore/wasm/WasmOSREntryPlan.cpp:
(JSC::Wasm::OSREntryPlan::work):
* Source/JavaScriptCore/wasm/js/WebAssemblyExceptionPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::initializeImports):

Canonical link: https://commits.webkit.org/261376@main




More information about the webkit-changes mailing list