[wasm][test] Compute section length automatically
Instead of specifying the byte length of a section manually, just compute it automatically from the bytes given. Manual computation is particularly difficult because of the macros involved, which can expand to several bytes. This is not a pure refactoring, it also fixes several occasions where we calculated the length wrong. Drive-by: Add some ENTRY_COUNT macro uses. This is the fourth CL in a series to improve our module decoder tests and make them more readable. R=titzer@chromium.org Bug: v8:8238 Change-Id: I0d2ceb751fc8e5625ffdf4189d4b5253aecc2541 Reviewed-on: https://chromium-review.googlesource.com/c/1283075 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#56718}
Showing
This diff is collapsed.
Please
register
or
sign in
to comment