Skip to content
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

Remove packing for bools. #5449

Open
wants to merge 7 commits into
base: cp/more-instructions
Choose a base branch
from
Open

Conversation

ChrisPenner
Copy link
Contributor

@ChrisPenner ChrisPenner commented Nov 8, 2024

Overview

On trunk, primitive operations return a 'tag', then we run a separate branch instruction which returns the equivalent Unison bool datatype.

This change alters primitive ops which return bools to simply put the correct unison bool directly onto the stack, saving an instruction on each boolean op.

Implementation notes

  • Alter primitive ops to push bools directly to the stack
  • Add some missing instructions to avoid the need for multiple instructions, e.g. NEQN instead of EQLN >>> NOTB
  • Remove all the now-unnecessary branches.

Test coverage

Existing transcripts

@ChrisPenner ChrisPenner changed the base branch from trunk to cp/more-instructions November 8, 2024 23:16
@ChrisPenner ChrisPenner marked this pull request as ready for review November 20, 2024 16:41
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