Skip to content

Refactor jump label realization #7088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 14, 2025
Merged

Refactor jump label realization #7088

merged 18 commits into from
May 14, 2025

Conversation

Dentosal
Copy link
Member

@Dentosal Dentosal commented Apr 14, 2025

Description

Simplifies jump instruction generation, moving the actual instruction selection to a single location. Removes lots of error-prone duplicate logic around far jump rewriting. This theoretically has a slight size penalty in jump-heavy contracts, but in practice this should be neglible. For instance mira-v1-core isn't affected at all. This PR is makes it easier to implement further optimizations, especially those around the new JAL instruction and u16/u32 integer loading opcodes. In particular, data section packing should be a lot easier after this.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works: just a refactor, existing tests suffice
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@Dentosal Dentosal self-assigned this Apr 14, 2025
Copy link

codspeed-hq bot commented Apr 14, 2025

CodSpeed Performance Report

Merging #7088 will not alter performance

Comparing dento/rework-far-jumps (8fd1f4c) with master (aafcdc8)

Summary

✅ 22 untouched benchmarks

@Dentosal Dentosal marked this pull request as ready for review April 14, 2025 19:00
@Dentosal Dentosal requested a review from a team as a code owner April 14, 2025 19:00
@Dentosal Dentosal temporarily deployed to fuel-sway-bot May 12, 2025 12:36 — with GitHub Actions Inactive
@Dentosal Dentosal temporarily deployed to fuel-sway-bot May 12, 2025 13:19 — with GitHub Actions Inactive
@Dentosal Dentosal temporarily deployed to fuel-sway-bot May 13, 2025 03:26 — with GitHub Actions Inactive
@Dentosal Dentosal temporarily deployed to fuel-sway-bot May 13, 2025 13:33 — with GitHub Actions Inactive
@JoshuaBatty JoshuaBatty requested a review from a team May 14, 2025 06:39
@IGI-111 IGI-111 merged commit 39251b6 into master May 14, 2025
43 checks passed
@IGI-111 IGI-111 deleted the dento/rework-far-jumps branch May 14, 2025 08:39
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.

5 participants