Commit 65da8bf0 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Inline Pop methods for performance

This improves validation time by 7-8% and Liftoff compilation time by
2-3% while increasing binary size by ~12kB.

R=mvstanton@chromium.org

Bug: v8:8423
Change-Id: I08961097fb61f4a218522138efe51a9165a7c62b
Reviewed-on: https://chromium-review.googlesource.com/c/1391748Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58486}
parent 29c1c5d6
...@@ -2551,7 +2551,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2551,7 +2551,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
return stack_.data() + old_size; return stack_.data() + old_size;
} }
Value Pop(int index, ValueType expected) { V8_INLINE Value Pop(int index, ValueType expected) {
auto val = Pop(); auto val = Pop();
if (!VALIDATE(val.type == expected || val.type == kWasmVar || if (!VALIDATE(val.type == expected || val.type == kWasmVar ||
expected == kWasmVar)) { expected == kWasmVar)) {
...@@ -2563,7 +2563,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2563,7 +2563,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
return val; return val;
} }
Value Pop() { V8_INLINE Value Pop() {
DCHECK(!control_.empty()); DCHECK(!control_.empty());
uint32_t limit = control_.back().stack_depth; uint32_t limit = control_.back().stack_depth;
if (stack_.size() <= limit) { if (stack_.size() <= limit) {
......
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