Skip to content

Conversation

@rakita
Copy link
Member

@rakita rakita commented Jan 20, 2026

Summary

  • Track both prev_opcode and opcode in the analysis loop to handle edge cases
  • Add padding when opcodes with immediates (SWAPN, DUPN, EXCHANGE) have their immediate byte appear as STOP
  • Example: [SWAPN, STOP] is padded to [SWAPN, STOP, STOP] because the STOP is consumed as the immediate operand

Test plan

  • Added test test_bytecode_ends_with_immediate_opcode_and_stop_requires_padding covering SWAPN, DUPN, and EXCHANGE
  • All existing tests pass

Track both previous and current opcode in the analysis loop to handle
edge cases where opcodes with immediates (SWAPN, DUPN, EXCHANGE) have
their immediate byte appear as STOP. For example, [SWAPN, STOP] needs
padding because the STOP is consumed as the immediate operand, not as
an actual instruction.

Add test to verify [SWAPN, STOP] is padded to [SWAPN, STOP, STOP].
@rakita
Copy link
Member Author

rakita commented Jan 20, 2026

Fix for analysis in #3223

Remove obsolete GasParams import and argument, use DummyHost::new()
constructor instead of unit struct syntax.
@rakita
Copy link
Member Author

rakita commented Jan 20, 2026

Waiting fir CI, lgtm

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 20, 2026

CodSpeed Performance Report

Merging this PR will improve performance by 3.12%

Comparing jumpa (15176b8) with main (b437e0f)1

Summary

⚡ 1 improved benchmark
✅ 172 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
transfer 14.6 µs 14.2 µs +3.12%

Footnotes

  1. No successful run was found on main (b3a6913) during the generation of this report, so b437e0f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@rakita rakita merged commit 2fe956d into main Jan 20, 2026
31 checks passed
@github-actions github-actions bot mentioned this pull request Jan 20, 2026
@rakita rakita deleted the jumpa branch January 20, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant