Summary: | [WTF] Introduce FixedVector and use it for FixedOperands | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||||||||||
Component: | JavaScriptCore | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | annulen, benjamin, cdumez, cmarcelo, ews-watchlist, gyuyoung.kim, keith_miller, mark.lam, msaboff, ryuan.choi, saam, sergio, simon.fraser, tzagallo, webkit-bug-importer | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
Yusuke Suzuki
2021-04-03 22:15:56 PDT
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> |