FpySequencer push FW_SERIALIZE_TRUE/FALSE for boolean ops#4712
Open
zimri-leisher wants to merge 3 commits intonasa:develfrom
Open
FpySequencer push FW_SERIALIZE_TRUE/FALSE for boolean ops#4712zimri-leisher wants to merge 3 commits intonasa:develfrom
zimri-leisher wants to merge 3 commits intonasa:develfrom
Conversation
| F64 lhs = this->m_runtime.stack.pop<F64>(); | ||
| // eq is true if they are equal and neither is nan | ||
| this->m_runtime.stack.push(static_cast<U8>((lhs == rhs) ? 1 : 0)); | ||
| this->m_runtime.stack.push(static_cast<U8>((lhs == rhs) ? static_cast<U8>(FW_SERIALIZE_TRUE_VALUE) |
Check notice
Code scanning / CodeQL
Equality test on floating-point values Note
| F64 lhs = this->m_runtime.stack.pop<F64>(); | ||
| // ne is true if they are not equal or either is nan | ||
| this->m_runtime.stack.push(static_cast<U8>((lhs != rhs) ? 1 : 0)); | ||
| this->m_runtime.stack.push(static_cast<U8>((lhs != rhs) ? static_cast<U8>(FW_SERIALIZE_TRUE_VALUE) |
Check notice
Code scanning / CodeQL
Equality test on floating-point values Note
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…dx tlm to debug
Change Description
FW_SERIALIZE_TRUE_VALUEorFW_SERIALIZE_FALSE_VALUERationale
This change fixes a bug where
(1 == 1) == Trueevaluates to False, because the lhs pushes 1, and the rhs pushesFW_SERIALIZE_TRUE_VALUE. They would be compared with MEMCMP, which sees two diff binary values.AI Usage (see policy)
AI wrote all the code and tests.