haikuwebkit/LayoutTests/js/dopey-rope-with-16-bit-prop...

11 lines
291 B
Plaintext
Raw Permalink Normal View History

Tidy up the remaining bits of the AtomicString to AtomString rename https://bugs.webkit.org/show_bug.cgi?id=198990 Reviewed by Michael Catanzaro. Source/JavaScriptCore: * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::speculateStringIdentAndLoadStorage): Use flagIsAtom. * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): Ditto. * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): Ditto. * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileHasOwnProperty): Ditto. (JSC::FTL::DFG::LowerDFGToB3::speculateStringIdent): Ditto. Source/WebCore: * bindings/scripts/test/JS/JSTestObj.cpp: Updated names. * bindings/scripts/test/TestObj.idl: Ditto. * css/makeprop.pl: Updated comment. * css/makevalues.pl: Ditto. * html/FormController.cpp: (WebCore::FormKeyGenerator::formKey): Ditto. Source/WTF: * wtf/text/AtomString.cpp: Fix a comment. * wtf/text/AtomString.h: Tweak formatting a bit. Use nullptr instead of 0. Removed "using AtomicString = AtomString". * wtf/text/AtomStringImpl.cpp: (WTF::CStringTranslator::translate): Use setIsAtom instead of setIsAtomic. (WTF::UCharBufferTranslator::translate): Ditto. (WTF::HashAndUTF8CharactersTranslator::translate): Ditto. (WTF::SubstringTranslator::translate): Ditto. (WTF::LCharBufferTranslator::translate): Ditto. (WTF::BufferFromStaticDataTranslator::translate): Ditto. (WTF::AtomStringImpl::addSlowCase): Ditto. (WTF::AtomStringImpl::lookUpSlowCase): Updated assertion message. * wtf/text/AtomStringImpl.h: Tweaked the implementation of add. Updated comments to say AtomString. * wtf/text/AtomStringTable.cpp: (WTF::AtomStringTable::~AtomStringTable): Use setIsAtom. * wtf/text/StringImpl.h: Updated name of StringAtomic and s_hashFlagStringKindIsAtom. Renamed to flagIsAtom and setIsAtom. * wtf/text/WTFString.cpp: (WTF::String::isSafeToSendToAnotherThread const): Updated comment. Tools: * Scripts/do-webcore-rename: Removed already-done renames. * TestWebKitAPI/Tests/WTF/StringImpl.cpp: Rename one use of "atomic". LayoutTests: * js/dopey-rope-with-16-bit-propertyname-expected.txt: Rename to AtomString. * js/dopey-rope-with-16-bit-propertyname.html: Ditto. Canonical link: https://commits.webkit.org/213026@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-06-20 16:21:50 +00:00
Test that a 16-bit AtomString containing only 8-bit characters doesn't confuse the JIT into thinking it's an 8-bit AtomString.
REGRESSION(r168256): JSString can get 8-bit flag wrong when re-using AtomicStrings. <https://webkit.org/b/133574> <rdar://problem/18051847> Source/JavaScriptCore: The optimization that resolves JSRopeStrings into an existing AtomicString (to save time and memory by avoiding StringImpl allocation) had a bug that it wasn't copying the 8-bit flag from the AtomicString. This could lead to a situation where a 16-bit StringImpl containing only 8-bit characters is sitting in the AtomicString table, is found by the rope resolution optimization, and gives you a rope that thinks it's all 8-bit, but has a fiber with 16-bit characters. Resolving that rope will then yield incorrect results. This was all caught by an assertion, but very hard to reproduce. Test: js/dopey-rope-with-16-bit-propertyname.html Reviewed by Darin Adler. * runtime/JSString.cpp: (JSC::JSRopeString::resolveRopeToAtomicString): (JSC::JSRopeString::resolveRopeToExistingAtomicString): * runtime/JSString.h: (JSC::JSString::setIs8Bit): (JSC::JSString::toExistingAtomicString): LayoutTests: Add a tests that creates a 16-bit AtomicString with only 8-bit characters, then tiers up into baseline JIT and uses that string as part of a rope-within-a-rope and serializes that rope to get an incorrect concatenation. Reviewed by Darin Adler. * js/dopey-rope-with-16-bit-propertyname-expected.txt: Added. * js/dopey-rope-with-16-bit-propertyname.html: Added. Canonical link: https://commits.webkit.org/153901@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-08-18 21:33:01 +00:00
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS globalRope is 'foo.zest'
PASS successfullyParsed is true
TEST COMPLETE