WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
260913
WasmSectionParser should use tryReserveInitialCapacity instead of tryReserveCapacity.
https://bugs.webkit.org/show_bug.cgi?id=260913
Summary
WasmSectionParser should use tryReserveInitialCapacity instead of tryReserveC...
Mark Lam
Reported
2023-08-30 10:31:36 PDT
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
Attachments
Add attachment
proposed patch, testcase, etc.
Mark Lam
Comment 1
2023-08-30 10:51:53 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/17237
EWS
Comment 2
2023-08-30 16:06:58 PDT
Committed
267469@main
(78ca85d1db78): <
https://commits.webkit.org/267469@main
> Reviewed commits have been landed. Closing PR #17237 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug