[WTF] Introduce FixedVector and use it for FixedOperands
Created attachment 425126 [details] Patch
Created attachment 425127 [details] Patch
Comment on attachment 425127 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425127&action=review r=me > Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:90 > using RefCountedArray = WTF::RefCountedArray<int>; I think we can remove this now. > Source/JavaScriptCore/runtime/CachedTypes.cpp:625 > + void encode(Encoder& encoder, const FixedVector<SourceType<T>>& vector) It's a pity that we're copy-pasting this code 3 times. Can we use just one template, and if needed, std::enable_if the container type to be one of the 3 acceptable types? > Source/JavaScriptCore/runtime/CachedTypes.cpp:658 > + void decode(Decoder& decoder, FixedVector<SourceType<T>>& vector, Args... args) const Ditto.
Comment on attachment 425127 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425127&action=review >> Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:90 >> using RefCountedArray = WTF::RefCountedArray<int>; > > I think we can remove this now. Unfortunately, LLInt still uses RefCountedArray::m_data in loadp CodeBlock::m_argumentValueProfiles + FixedVector::m_storage + RefCountedArray::m_data[t1], t3 >> Source/JavaScriptCore/runtime/CachedTypes.cpp:625 >> + void encode(Encoder& encoder, const FixedVector<SourceType<T>>& vector) > > It's a pity that we're copy-pasting this code 3 times. Can we use just one template, and if needed, std::enable_if the container type to be one of the 3 acceptable types? Changed them to use templatized ones :) >> Source/JavaScriptCore/runtime/CachedTypes.cpp:658 >> + void decode(Decoder& decoder, FixedVector<SourceType<T>>& vector, Args... args) const > > Ditto. Fixed.
Created attachment 425186 [details] Patch
Created attachment 425239 [details] Patch
Created attachment 425278 [details] Patch
Existing flaky crashes.
mac-debug-wk1 is getting stuck.
Committed r275542 (236198@main): <https://commits.webkit.org/236198@main>
<rdar://problem/76279966>