Skip to content

Conversation

@trdavidt
Copy link
Collaborator

Add two tests:

  1. check if a number is prime (function call, while loop, early return, more complicated branching)
  2. find nth Fibonacci number (loop over an array).

Made changes to src/instruction.rs and src/translate.rs to support additional branch instructions and bit shift left.

@trdavidt trdavidt requested review from Samir-Rashid and atar13 March 21, 2025 03:43
Copy link
Owner

@Samir-Rashid Samir-Rashid left a comment

Choose a reason for hiding this comment

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

Great work. Thanks for adding all of this. I have some minor comments for you to fix before merging.

Only improvement for future PRs is to pull main before committing or rebasing so there aren't useless merge commits in the history.

atar13
atar13 previously approved these changes Mar 21, 2025
Copy link
Owner

@Samir-Rashid Samir-Rashid left a comment

Choose a reason for hiding this comment

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

Addressed comments. Looks good now.

@atar13 atar13 merged commit ad53e69 into main Mar 22, 2025
1 check passed
@trdavidt trdavidt deleted the test-loops branch March 22, 2025 06:59
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.

4 participants