mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 15:43:20 +00:00
LibRegex: Use ReadonlySpan to peek into OpCode_Compare LUTs
By the time we're executing bytecode, we know the the bytecode will be flattened. This means we can use ReadonlySpan to look into it instead of DisjointChunks::spans(), which allocates.
This commit is contained in:
parent
c1c3b01a6c
commit
87ec5b32b0
Notes:
github-actions[bot]
2025-04-14 15:41:09 +00:00
Author: https://github.com/awesomekling
Commit: 87ec5b32b0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4351
2 changed files with 7 additions and 1 deletions
|
@ -540,7 +540,7 @@ ALWAYS_INLINE ExecutionResult OpCode_Compare::execute(MatchInput const& input, M
|
|||
return ExecutionResult::Failed_ExecuteLowPrioForks;
|
||||
|
||||
auto count = m_bytecode->at(offset++);
|
||||
auto range_data = m_bytecode->template spans<4>().slice(offset, count);
|
||||
auto range_data = m_bytecode->flat_data().slice(offset, count);
|
||||
offset += count;
|
||||
|
||||
auto ch = input.view[state.string_position_in_code_units];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue