-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Implemented compare operation for boolean types in JIT engine #5081
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
Conversation
jit/src/instructions.rs
Outdated
@@ -348,6 +348,22 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> { | |||
.push(JitValue::Bool(self.builder.ins().bint(types::I8, val))); | |||
Ok(()) | |||
} | |||
(JitValue::Bool(a), JitValue::Bool(b)) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python bool
is a subclass of int
and they can be mixed in operations. This pattern looks like matching only for (bool, bool) operands. Isn't this better to be combined to (int, int) case? Then it will allows also (bool, int) or (int, bool) operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah! Makes sense , will update it. Thanks for response !
This is done, Now both int and bool types can be compared. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
oh, could you run |
Sure |
Hi , This is rebased with current main branch. |
a9ac6b2
to
eb83b72
Compare
you may have forgot fetching upstream. rebased again. |
In JIT, Implemented more comparison operations for boolean types, and added tests