-
Notifications
You must be signed in to change notification settings - Fork 91
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
Bigint #305
Bigint #305
Conversation
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #305 +/- ##
==========================================
+ Coverage 88.55% 88.77% +0.21%
==========================================
Files 93 95 +2
Lines 3409 3554 +145
==========================================
+ Hits 3019 3155 +136
- Misses 390 399 +9 ☔ View full report in Codecov by Sentry. |
4828660
to
8dd16b7
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 to me in general.
It would be interesting to see the performance compared with implementation using externref bindings through V8
fn from_int64(Int64) -> BigInt | ||
|
||
fn make_zero() -> BigInt | ||
|
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.
TODO: we will add literal syntax support, e.g, 0n
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.
annotated
bigint/bigint.mbti
Outdated
} | ||
|
||
type Sign | ||
impl Sign { |
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.
Should this type be publicly exposed?
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.
fixed
bigint/bigint.mbti
Outdated
impl BigInt { | ||
compare(Self, Self) -> Int | ||
debug_write(Self, Buffer) -> Unit | ||
deep_clone(Self) -> Self |
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.
when deep_clone
is needed given BigInt is pure?
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.
fixed
bigint/bigint.mbti
Outdated
op_mul(Self, Self) -> Self | ||
op_neg(Self) -> Self | ||
op_sub(Self, Self) -> Self | ||
to_decimal_string(Self) -> String |
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.
should be called to_string
directly?
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.
Later we might have to_hex_string, etc. But given that decimal is the most common case, we can name it just to_string
.
No description provided.