Commit 5ce53d36 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm] Use VALIDATE macro consistently

Every condition which can only fail on invalid wire bytes should be
wrapped in the VALIDATE macro. This way, it will automatically be
skipped if {validate} is false, and we will automatically add V8_LIKELY
annotations to the branches.

Also, consistently use the style
if (!VALIDATE(condition)) {
  ... handle error ...
}
... continue ...

Drive-by: Remove unnecessary OPCODE_ERROR macro.
Drive-by 2: Replace unreachable code (after a switch) by UNREACHABLE.

R=thibaudm@chromium.org

Bug: v8:10576
Change-Id: I9b592bd4abde80d86e72c63739d77b4814dc96de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2262917Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68514}
parent f7a1932e
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment