mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 00:49:46 +00:00
LibWasm: Hold on to the stack depth for expressions in the validator
This allows preallocating the value stack when pushing frames, avoiding repeated reallocs and copies.
This commit is contained in:
parent
3f77aa8521
commit
dc67f0ad4e
Notes:
github-actions[bot]
2025-08-08 10:56:54 +00:00
Author: https://github.com/alimpfard
Commit: dc67f0ad4e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5060
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/R-Goc
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/gmta
4 changed files with 17 additions and 1 deletions
|
|
@ -3736,6 +3736,8 @@ ErrorOr<Validator::ExpressionTypeResult, ValidationError> Validator::validate(Ex
|
|||
m_frames.take_last();
|
||||
VERIFY(m_frames.is_empty());
|
||||
|
||||
expression.set_stack_usage_hint(stack.max_known_size());
|
||||
|
||||
return ExpressionTypeResult { stack.release_vector(), is_constant_expression };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue