Boolean Primitives are not semantically implemented
- Dominant language
- C++
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
(See [tests/Conditions/if.xs](https://github.com/CodeusTech/XCSL-AArch64/blob/PreAlpha-Dev/tests/Conditions/if.xs))
In the second `if ... then ... else ...` statement, `False` is only syntactically active right now.
When a boolean primitive (`True` & `False`), is encountered, a corresponding value should be pushed onto the active register stack. E.g. `False` should produce '0' and `True` should produce '1'. When a primitive is encountered, the minimum following changes need to occur:
* `LastType(TYPE_BOOLEAN)` and `LastConstructor(TYPE_BOOLEAN)` is recorded in the context manager
* `LastData(x)` is recorded in context manager, where x==1 or x==0 depending on True/False
* `LastExpression(EXP_LITERAL)` is recorded in Context Manager
The active register stack seems to allocate a new register when boolean literals are encountered, so that shouldn't need any attention.
NOTE: This effect should also trigger when a constant or function is invoked (if it returns a boolean literal value).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.