-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Improved output of formatNumberReadable #13277
Improved output of formatNumberReadable #13277
Conversation
27947c0
to
fb1aa30
Compare
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.
Looks good!
Just some code style adjustments and readability suggestions.
fb1aa30
to
dc0b2b9
Compare
59926fa
to
9f3a3f8
Compare
I think this is in good shape. Please, rebase. |
9f3a3f8
to
ddfa9ea
Compare
Pushed a rebased version right now. Please check it. |
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.
Sorry, I had another look and found some things that were glossed over before and could be improved.
Auto please rebase onto origin/develop to get rid of the CI errors. |
ddfa9ea
to
9feab34
Compare
I have rebased and updated my commit based on the suggestions here. Sorry for being late. |
2bc3c96
to
2aa6706
Compare
No need to apologize, you are not late at all. You are actually quite timely with your responses. Thanks for contributing to the project :) |
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.
I consider it ready. But it needs another rebase on top of develop
since we are having a release today.
2aa6706
to
24fe519
Compare
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.
It is going to need another rebase, but I am approving so someone else from the team can merge it later.
The errors in CircleCI seem to be related to not being able to find |
It's there but we added it as a dependency very recently so not all of our libs link to it yet. You have to add it to |
6623208
to
0af20fa
Compare
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.
Some adjustments and I wanted to confirm that you added the test case mentioned here.
Also, @nikola-matic are you satisfied with the current replacements of string concatenation or do you think that they are needed for the simple cases at lines 133
, 203
and 218
?
The formatting looks good now, and no, no need for |
Yes, I added them at lines |
I am also removing the |
af1079b
to
0028cd2
Compare
@matheusaaguiar @ekpyron will this need a changelog entry? |
I'd say, it's borderline. But strictly speaking it's user-facing, so we can just default to "yes". |
0028cd2
to
362a86e
Compare
Changelog.md
Outdated
@@ -8,9 +8,11 @@ Compiler Features: | |||
* Standard JSON: Add a boolean field `settings.metadata.appendCBOR` that skips CBOR metadata from getting appended at the end of the bytecode. | |||
* Yul Optimizer: Allow replacing the previously hard-coded cleanup sequence by specifying custom steps after a colon delimiter (``:``) in the sequence string. | |||
* Language Server: Add basic document hover support. | |||
* SMTChecker: Improved readability for large integers that are powers of two or almost powers of two |
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.
@leonardoalt is this SMT checker related?
e248feb
to
ff19748
Compare
Rebased, resolved conflicts, and added periods to changelog entires. The build should now be fine, and hopefully closer to merging. |
ea822bd
to
d6542b5
Compare
… and one-less-than powers of two in a more compact format
d6542b5
to
3abf272
Compare
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.
LGTM
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.
LGTM
Follow up to issue #9601 and pull request #13163.
Based on advice by @cameel in the conversation in issue.
Previously
formatNumberReadable(57896044618658097711785492504343953926634992332820282019728792003956564819968)
would equal to0x80 * 2 ** 248
, but now it equals to2 ** 255
.Also, there was a bug in the test case
test_format_number_readable_signed
intest/StringUtils.cpp
.formatNumberReadable(-0xffffffff)
should be equal to-2 ** 32 + 1
but previously it was tested to be equal to-2 ** 32 - 1
. The new version offormatNumberReadable
fixes this problem.