[Webkit-unassigned] [Bug 260913] New: WasmSectionParser should use tryReserveInitialCapacity instead of tryReserveCapacity.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 30 10:31:36 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=260913
Bug ID: 260913
Summary: WasmSectionParser should use tryReserveInitialCapacity
instead of tryReserveCapacity.
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Keywords: InRadar
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mark.lam at apple.com
We already enforced ordered section parsing, which also enforces that a section type can only be parsed once (with CustomSection being the only exception). For each of these sections, there are many cases where capacity for their vector stores can be allocated with Vector::tryReserveInitialCapacity instead of Vector::tryReserveCapacity. Vector::tryReserveInitialCapacity will be more efficient.
Added some RELEASE_ASSERTs to enforce the invariant that these section types are only parsed once.
Added Vector::growCapacityBy and Vector::tryGrowCapacityBy to more concisely express the idea that we're growing the capacity by some increment.
rdar://114175821
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230830/b7134b0f/attachment.htm>
More information about the webkit-unassigned
mailing list