fut
fut copied to clipboard
Support Uint32 using Java's UnsignedInt Api and JS's >>> 0
Regarding #61 Uint is 31-bit :
I too, have found this very confusing. Note that Java does not natively support uint, ulong and unsigned byte, cito is accomplishing unsigned arithmetic through using the Java Unsigned Integer API ( Integer.compareUnsigned, Integer.divideUnsigned, Integer.remainderUnsigned, Integer.parseUnsignedInt ,Integer.toUnsignedString). When mixing signed with unsigned, cito uses the unsigned operator.
I don't have any time to do some JavaScript implementation. But this should be possible unsigned-integer-in-javascript at least for 32 bit. Please take this pull request as an inspiration. I just want to give back my changes.
Btw. Nice Project :)
I like both your changes! Do you want to work on them beyond this draft? If so, I'd prefer to have them separate.
Codecov Report
Merging #69 (e717183) into master (12c4da2) will decrease coverage by
1.04%. The diff coverage is80.44%.
@@ Coverage Diff @@
## master #69 +/- ##
==========================================
- Coverage 93.32% 92.27% -1.05%
==========================================
Files 19 19
Lines 13311 13497 +186
==========================================
+ Hits 12422 12454 +32
- Misses 754 902 +148
- Partials 135 141 +6
| Impacted Files | Coverage Δ | |
|---|---|---|
| GenCCpp.cs | 94.06% <0.00%> (-2.65%) |
:arrow_down: |
| GenCl.cs | 94.80% <0.00%> (-1.68%) |
:arrow_down: |
| GenCs.cs | 97.58% <0.00%> (-0.32%) |
:arrow_down: |
| GenSwift.cs | 94.45% <0.00%> (-0.17%) |
:arrow_down: |
| CiTree.cs | 78.42% <22.22%> (-0.49%) |
:arrow_down: |
| GenJs.cs | 87.29% <31.42%> (-6.77%) |
:arrow_down: |
| GenTyped.cs | 86.42% <33.33%> (-2.38%) |
:arrow_down: |
| GenBase.cs | 95.66% <75.00%> (-0.19%) |
:arrow_down: |
| GenJava.cs | 87.52% <86.87%> (-7.33%) |
:arrow_down: |
| ... and 3 more |
:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more
What's the status? I see the tests failing. Don't worry about the coverage.
ulong will require more work for literals and constant folding - currently it's all done on long. We can disable ulong for now.
Your patch will get harder and harder to merge as I'm reimplementing cito in Ć.
What's the status? I see the tests failing. Don't worry about the coverage.
ulongwill require more work for literals and constant folding - currently it's all done onlong. We can disableulongfor now.Your patch will get harder and harder to merge as I'm reimplementing
citoin Ć.
Currently I'm no longer working on it. Maybe just take this as an Idea, that can be implemented later. I'm fine if you close this MR.