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

bytecode: Implement equality and inequality operators #281

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

Rossiar
Copy link
Collaborator

@Rossiar Rossiar commented Feb 20, 2024

The equality operators are the only operators that can
operate across all evy types. Therefore it makes sense
to utilise the value interface and its Equals function
to generically handle this expression for all evy types.
The alternative is to create separate equality and
inequality opcodes for each evy type, which would
introduce many new opcodes and repeated code in this
package.

Co-authored-by: joshcarp joshcarp@users.noreply.github.com
Co-authored-by: pgmitche pgmitche@users.noreply.github.com

@Rossiar Rossiar force-pushed the compiler-unary branch 3 times, most recently from 4796560 to 5ec0bbf Compare February 21, 2024 15:18
Base automatically changed from compiler-unary to main February 21, 2024 22:08
The equality operators are the only operators that can
operate across all evy types. Therefore it makes sense
to utilise the value interface and its Equals function
to generically handle this expression for all evy types.
The alternative is to create separate equality and
inequality opcodes for each evy type, which would
introduce many new opcodes and repeated code in this
package.

Co-authored-by: joshcarp <joshcarp@users.noreply.github.com>
Co-authored-by: pgmitche <pgmitche@users.noreply.github.com>
Copy link
Member

@juliaogris juliaogris left a comment

Choose a reason for hiding this comment

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

lgtm - forgot to message earlier.

@juliaogris juliaogris merged commit a5f463a into main Feb 22, 2024
3 checks passed
@juliaogris juliaogris deleted the compiler-equality branch February 22, 2024 03:32
@juliaogris juliaogris linked an issue Mar 18, 2024 that may be closed by this pull request
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.

Implement compiler with stack-based VM
3 participants