-
Notifications
You must be signed in to change notification settings - Fork 1.6k
JSC: Replace UChar with char16_t #46958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
adetaylor:eng/JSC-Replace-UChar-with-char16_t
Jul 1, 2025
Merged
JSC: Replace UChar with char16_t #46958
webkit-commit-queue
merged 1 commit into
WebKit:main
from
adetaylor:eng/JSC-Replace-UChar-with-char16_t
Jul 1, 2025
+318
−318
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
EWS run on previous version of this PR (hash 39d4e82) |
achristensen07
approved these changes
Jun 19, 2025
39d4e82
to
675de9c
Compare
EWS run on current version of this PR (hash 675de9c) |
675de9c
to
b203472
Compare
https://bugs.webkit.org/show_bug.cgi?id=294724 rdar://153818709 Reviewed by Alex Christensen. WebKit wishes to move from UChar to the C++ standard char16_t; they are currently typedef'ed to be the same. This PR makes the textual substitutions across JavaScriptCore. This is a simple search and replace for \bUChar\b with no other changes, and it should have no functional effect. This is one of a series of PRs for different parts of WebKit. * Source/JavaScriptCore/API/JSStringRef.cpp: (JSStringCreateWithCharacters): (JSStringCreateWithUTF8CString): (JSStringCreateWithCharactersNoCopy): * Source/JavaScriptCore/API/JSStringRefCF.cpp: (JSStringCreateWithCFString): * Source/JavaScriptCore/API/JSValueRef.cpp: (JSValueMakeFromJSONString): * Source/JavaScriptCore/API/OpaqueJSString.cpp: (OpaqueJSString::~OpaqueJSString): (OpaqueJSString::characters): * Source/JavaScriptCore/API/OpaqueJSString.h: (OpaqueJSString::create): (OpaqueJSString::OpaqueJSString): * Source/JavaScriptCore/API/glib/JSCValue.cpp: (jsc_value_new_from_json): * Source/JavaScriptCore/API/tests/JSONParseTest.cpp: (testJSONParse): * Source/JavaScriptCore/KeywordLookupGenerator.py: (Trie.printAsC): * Source/JavaScriptCore/builtins/BuiltinNames.cpp: (JSC::BuiltinNames::lookUpPrivateName const): (JSC::BuiltinNames::lookUpWellKnownSymbol const): * Source/JavaScriptCore/builtins/BuiltinNames.h: * Source/JavaScriptCore/bytecode/CodeBlockHash.cpp: (JSC::CodeBlockHash::CodeBlockHash): * Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * Source/JavaScriptCore/dfg/DFGLazyJSValue.cpp: (JSC::DFG::equalToSingleCharacter): * Source/JavaScriptCore/dfg/DFGLazyJSValue.h: (JSC::DFG::LazyJSValue::singleCharacterString): (JSC::DFG::LazyJSValue::character const): * Source/JavaScriptCore/dfg/DFGOperations.cpp: (JSC::DFG::JSC_DEFINE_JIT_OPERATION): * Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp: * Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.h: * Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileStringIndexOf): * Source/JavaScriptCore/inspector/ContentSearchUtilities.cpp: (Inspector::ContentSearchUtilities::escapeStringForRegularExpressionSource): * Source/JavaScriptCore/interpreter/Interpreter.cpp: (JSC::eval): (JSC::Interpreter::executeProgram): * Source/JavaScriptCore/jsc.cpp: (pathSeparator): * Source/JavaScriptCore/parser/Lexer.cpp: (JSC::isSingleCharacterIdentStart): (JSC::cannotBeIdentStart): (JSC::isSingleCharacterIdentPart): (JSC::cannotBeIdentPartOrEscapeStart): (JSC::Lexer<char16_t>::currentCodePoint const): (JSC::Lexer<T>::append16): (JSC::Lexer<T>::record16): (JSC::Lexer<CharacterType>::recordUnicodeCodePoint): (JSC::Lexer<char16_t>::parseIdentifier): (JSC::characterRequiresParseStringSlowCase): (JSC::Lexer<CharacterType>::parseCommentDirectiveValue): (JSC::orCharacter<LChar>): (JSC::orCharacter<char16_t>): (JSC::Lexer<T>::scanRegExp): (JSC::Lexer<T>::clear): (JSC::Lexer<UChar>::currentCodePoint const): Deleted. (JSC::Lexer<UChar>::parseIdentifier): Deleted. (JSC::orCharacter<UChar>): Deleted. * Source/JavaScriptCore/parser/Lexer.h: (JSC::Lexer::append16): (JSC::Lexer<char16_t>::isWhiteSpace): (JSC::Lexer<char16_t>::isLineTerminator): (JSC::Lexer<T>::convertUnicode): (JSC::Lexer<LChar>::makeRightSizedIdentifier): (JSC::Lexer<char16_t>::makeRightSizedIdentifier): (JSC::Lexer<char16_t>::setCodeStart): (JSC::Lexer<T>::makeIdentifierLCharFromUChar): (JSC::Lexer<T>::makeLCharIdentifier): (JSC::Lexer<UChar>::isWhiteSpace): Deleted. (JSC::Lexer<UChar>::isLineTerminator): Deleted. (JSC::Lexer<UChar>::makeRightSizedIdentifier): Deleted. (JSC::Lexer<UChar>::setCodeStart): Deleted. * Source/JavaScriptCore/parser/Parser.cpp: * Source/JavaScriptCore/parser/Parser.h: (JSC::parse): (JSC::parseRootNode): (JSC::parseFunctionForFunctionConstructor): * Source/JavaScriptCore/parser/ParserArena.h: (JSC::IdentifierArena::makeIdentifierLCharFromUChar): * Source/JavaScriptCore/runtime/ArrayPrototype.cpp: (JSC::sortBucketSort): * Source/JavaScriptCore/runtime/CachedTypes.cpp: (JSC::CachedUniquedStringImplBase::span16 const): * Source/JavaScriptCore/runtime/ExceptionHelpers.cpp: (JSC::functionCallBase): * Source/JavaScriptCore/runtime/ISO8601.cpp: (JSC::ISO8601::canBeTimeZone): (JSC::ISO8601::parseTimeZoneAnnotation): (JSC::ISO8601::parseTimeZone): * Source/JavaScriptCore/runtime/Identifier.cpp: (JSC::Identifier::add8): * Source/JavaScriptCore/runtime/Identifier.h: (JSC::Identifier::createLCharFromUChar): (JSC::Identifier::canUseSingleCharacterString): (JSC::Identifier::equal): * Source/JavaScriptCore/runtime/IdentifierInlines.h: (JSC::Identifier::Identifier): (JSC::Identifier::fromString): * Source/JavaScriptCore/runtime/IntlCache.cpp: (JSC::IntlCache::getBestDateTimePattern): (JSC::IntlCache::getFieldDisplayName): * Source/JavaScriptCore/runtime/IntlCache.h: * Source/JavaScriptCore/runtime/IntlCollator.cpp: (JSC::IntlCollator::checkICULocaleInvariants): * Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp: (JSC::canonicalizeTimeZoneName): (JSC::IntlDateTimeFormat::hourCycleFromSymbol): (JSC::IntlDateTimeFormat::hourCycleFromPattern): (JSC::IntlDateTimeFormat::replaceHourCycleInSkeleton): (JSC::IntlDateTimeFormat::replaceHourCycleInPattern): (JSC::IntlDateTimeFormat::buildSkeleton): (JSC::IntlDateTimeFormat::initializeDateTimeFormat): (JSC::IntlDateTimeFormat::format const): (JSC::IntlDateTimeFormat::formatToParts const): (JSC::IntlDateTimeFormat::createDateIntervalFormatIfNecessary): (JSC::IntlDateTimeFormat::formatRange): (JSC::IntlDateTimeFormat::formatRangeToParts): * Source/JavaScriptCore/runtime/IntlDateTimeFormat.h: * Source/JavaScriptCore/runtime/IntlDisplayNames.cpp: (JSC::IntlDisplayNames::of const): * Source/JavaScriptCore/runtime/IntlDurationFormat.cpp: (JSC::retrieveSeparator): (JSC::collectElements): (JSC::IntlDurationFormat::format const): (JSC::IntlDurationFormat::formatToParts const): * Source/JavaScriptCore/runtime/IntlListFormat.cpp: (JSC::IntlListFormat::format const): (JSC::IntlListFormat::formatToParts const): * Source/JavaScriptCore/runtime/IntlLocale.cpp: (JSC::IntlLocale::hourCycles): * Source/JavaScriptCore/runtime/IntlNumberFormat.cpp: (JSC::IntlNumberFormat::format const): (JSC::IntlNumberFormat::formatRange const): (JSC::IntlNumberFormat::formatRangeToPartsInternal): (JSC::IntlNumberFormat::formatToParts const): * Source/JavaScriptCore/runtime/IntlObject.cpp: (JSC::convertToUnicodeSingletonIndex): (JSC::LanguageTagParser::parseExtensionsAndPUExtensions): * Source/JavaScriptCore/runtime/IntlObjectInlines.h: (JSC::canUseASCIIUCADUCETComparison): (JSC::followedByNonLatinCharacter): (JSC::ListFormatInput::stringPointers const): * Source/JavaScriptCore/runtime/IntlPluralRules.cpp: (JSC::IntlPluralRules::select const): (JSC::IntlPluralRules::selectRange const): * Source/JavaScriptCore/runtime/IntlRelativeTimeFormat.cpp: (JSC::IntlRelativeTimeFormat::formatInternal const): (JSC::IntlRelativeTimeFormat::formatToParts const): * Source/JavaScriptCore/runtime/IntlSegmentIterator.cpp: (JSC::IntlSegmentIterator::create): (JSC::IntlSegmentIterator::IntlSegmentIterator): * Source/JavaScriptCore/runtime/IntlSegmentIterator.h: * Source/JavaScriptCore/runtime/IntlSegmenter.cpp: (JSC::IntlSegmenter::segment const): * Source/JavaScriptCore/runtime/IntlSegments.cpp: (JSC::IntlSegments::create): (JSC::IntlSegments::IntlSegments): * Source/JavaScriptCore/runtime/IntlSegments.h: * Source/JavaScriptCore/runtime/JSDateMath.cpp: (JSC::DateCache::timeZoneDisplayName): (JSC::retrieveTimeZoneInformation): * Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.cpp: (JSC::decodeHex): * Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h: * Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp: (JSC::decode): (JSC::parseFloat): (JSC::JSC_DEFINE_HOST_FUNCTION): * Source/JavaScriptCore/runtime/JSImmutableButterfly.cpp: (JSC::JSImmutableButterfly::createFromString): * Source/JavaScriptCore/runtime/JSONAtomStringCache.h: (JSC::JSONAtomStringCache::cacheSlot): * Source/JavaScriptCore/runtime/JSONAtomStringCacheInlines.h: (JSC::JSONAtomStringCache::makeIdentifier): * Source/JavaScriptCore/runtime/JSONObject.cpp: (JSC::stringCopyUpconvert): (JSC::stringify): (JSC::jsonParseSlow): (JSC::JSC_DEFINE_HOST_FUNCTION): (JSC::JSONParse): (JSC::JSONParseWithException): * Source/JavaScriptCore/runtime/JSString.cpp: (JSC:: const): (JSC::JSRopeString::resolveRopeWithFunction const): * Source/JavaScriptCore/runtime/JSString.h: (JSC::jsSingleCharacterString): * Source/JavaScriptCore/runtime/JSStringInlines.h: (JSC::JSString::tryReplaceOneCharImpl): (JSC::JSString::tryReplaceOneChar): (JSC::jsAtomString): (JSC::jsSubstringOfResolved): * Source/JavaScriptCore/runtime/JSStringJoiner.cpp: (JSC::appendStringToDataWithOneCharacterSeparatorRepeatedly): (JSC::JSStringJoiner::joinImpl): (JSC::JSOnlyStringsAndInt32sJoiner::joinImpl): * Source/JavaScriptCore/runtime/LiteralParser.cpp: (JSC::cannotBeIdentPartOrEscapeStart): (JSC::setParserTokenString<char16_t>): (JSC::isSafeStringCharacter): (JSC::isSafeStringCharacterForIdentifier): (JSC::setParserTokenString<UChar>): Deleted. * Source/JavaScriptCore/runtime/LiteralParser.h: (JSC::LiteralParserToken::string16 const): * Source/JavaScriptCore/runtime/ParseInt.h: (JSC::parseIntOverflow): (JSC::isStrWhiteSpace): * Source/JavaScriptCore/runtime/RegExp.cpp: (JSC::RegExpFunctionalTestCollector::outputEscapedString): (JSC::appendLineTerminatorEscape<char16_t>): (JSC::appendLineTerminatorEscape<UChar>): Deleted. * Source/JavaScriptCore/runtime/RegExpObjectInlines.h: (JSC::advanceStringUnicode): * Source/JavaScriptCore/runtime/StringConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): (JSC::stringFromCharCode): * Source/JavaScriptCore/runtime/StringPrototype.cpp: (JSC::substituteBackreferencesSlow): (JSC::JSC_DEFINE_HOST_FUNCTION): (JSC::splitStringByOneCharacterImpl): (JSC::isASCIIIdentifierStart): (JSC::toLocaleCase): (JSC::normalize): (JSC::illFormedIndex): * Source/JavaScriptCore/runtime/StringPrototypeInlines.h: (JSC::jsSpliceSubstringsWithSeparators): (JSC::jsSpliceSubstringsWithSeparator): (JSC::jsSpliceSubstrings): (JSC::replaceAllWithCacheUsingRegExpSearchThreeArguments): (JSC::replaceAllWithCacheUsingRegExpSearch): * Source/JavaScriptCore/testRegExp.cpp: (scanString): * Source/JavaScriptCore/tools/CharacterPropertyDataGenerator.cpp: (JSC::LineBreakData::fill): (JSC::LineBreakData::dump): (JSC::LineBreakData::setPairValue): * Source/JavaScriptCore/yarr/YarrInterpreter.cpp: (JSC::Yarr::interpret): * Source/JavaScriptCore/yarr/YarrJIT.cpp: (JSC::Yarr::SubjectSampler::frequency const): (JSC::Yarr::SubjectSampler::add): * Source/JavaScriptCore/yarr/YarrJIT.h: * Source/JavaScriptCore/yarr/YarrParser.h: (JSC::Yarr::requires): (JSC::Yarr::Parser::tryConsume): (JSC::Yarr::parse): * Source/JavaScriptCore/yarr/YarrPattern.cpp: (JSC::Yarr::CharacterClassConstructor::putRange): (JSC::Yarr::YarrPatternConstructor::extractSpecificPattern): * Source/JavaScriptCore/yarr/YarrSyntaxChecker.cpp: (JSC::Yarr::SyntaxChecker::atomCharacterClassAtom): (JSC::Yarr::SyntaxChecker::atomCharacterClassRange): Canonical link: https://commits.webkit.org/296865@main
b203472
to
6e819cc
Compare
Committed 296865@main (6e819cc): https://commits.webkit.org/296865@main Reviewed commits have been landed. Closing PR #46958 and removing active labels. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
6e819cc
675de9c
🛠 playstation