Skip to content

Ts/macro#48

Merged
tcrypt25519 merged 5 commits into
masterfrom
ts/macro
Feb 12, 2026
Merged

Ts/macro#48
tcrypt25519 merged 5 commits into
masterfrom
ts/macro

Conversation

@tcrypt25519

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 11, 2026 07:04
@semanticdiff-com

semanticdiff-com Bot commented Feb 11, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  crates/jet/tests/test_roms.rs  29% smaller
  crates/jet/src/builder/ops.rs  18% smaller
  docs/process/new-opcode.md Unsupported file format

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @tcrypt25519, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the readability and maintainability of bytecode test cases by introducing a set of Rust macros. These macros abstract the direct use of instruction opcodes, allowing test definitions to be more concise and expressive. The changes include refactoring existing tests to adopt this new, cleaner syntax and expanding test coverage with new arithmetic operation tests.

Highlights

  • New Macro Definitions: Introduced bytecode!, define_ops!, PUSH0!, PUSH1!, and PUSH2! macros to simplify the creation of bytecode sequences in tests.
  • Test Refactoring: Refactored all existing bytecode test cases to utilize the newly defined macros, enhancing readability and reducing boilerplate.
  • New Arithmetic Tests: Added new test cases for MUL, SUB, DIV, and MOD operations, demonstrating the use of the new macro syntax.
Changelog
  • crates/jet/tests/test_roms.rs
    • Added bytecode!, define_ops!, PUSH0!, PUSH1!, and PUSH2! macros for streamlined bytecode generation.
    • Refactored existing test cases to use the new bytecode generation macros.
    • Introduced new test cases for MUL, SUB, DIV, and MOD operations.
Activity
  • The pull request was created by tcrypt25519 with the title 'Ts/macro' and an empty description.
  • The changes involve adding several Rust macros and refactoring existing test code to use them, along with adding new tests.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a set of macros to simplify writing EVM bytecode in tests, which significantly improves readability. This is a great change. However, several of the new arithmetic tests (SUB, MOD) have incorrect logic, either in the arguments provided or the expected results. I've left comments with suggestions to fix them. I also suggested a small change to improve macro consistency.

Comment thread crates/jet/tests/test_roms.rs
Comment thread crates/jet/tests/test_roms.rs
Comment thread crates/jet/tests/test_roms.rs
Comment thread crates/jet/tests/test_roms.rs Outdated
Comment thread crates/jet/tests/test_roms.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors crates/jet ROM-based integration tests to use helper macros for constructing EVM bytecode more ergonomically, and extends the arithmetic test coverage.

Changes:

  • Added bytecode! and per-opcode helper macros to build ROM bytecode sequences more readably.
  • Migrated existing ROM tests to the new macro-based bytecode construction.
  • Added new arithmetic tests (MUL/SUB/DIV/MOD), including zero-divisor cases.

Comment thread crates/jet/tests/test_roms.rs
Comment thread crates/jet/tests/test_roms.rs
Comment thread crates/jet/tests/test_roms.rs Outdated
Comment thread crates/jet/tests/test_roms.rs
@tcrypt25519
tcrypt25519 merged commit af6dbbb into master Feb 12, 2026
1 check passed
@tcrypt25519
tcrypt25519 deleted the ts/macro branch February 12, 2026 02:11
tcrypt25519 added a commit that referenced this pull request Feb 16, 2026
* Better rom building.
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.

2 participants