-
Notifications
You must be signed in to change notification settings - Fork 597
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
Added add and sub for i*. #3620
Conversation
1b8b4a6
to
e028653
Compare
d5bceb0
to
7e47668
Compare
e028653
to
7b6aa4c
Compare
17d6ecb
to
473ea6c
Compare
7b6aa4c
to
38e20dd
Compare
ebea62b
to
ef5d31b
Compare
0fc0a34
to
e847b7d
Compare
dbd3927
to
de9b6d5
Compare
de9b6d5
to
ea5a9fb
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.
Reviewed 1 of 16 files at r1.
Reviewable status: 0 of 16 files reviewed, 1 unresolved discussion (waiting on @orizi)
corelib/src/test/integer_test.cairo
line 1142 at r2 (raw file):
assert_eq(@(-121_i8 - -21_i8), @-100_i8, '-121--21=-100'); }
Please check sub overflow and add underflow
ea5a9fb
to
c30ee11
Compare
119a1fa
to
7cd8370
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.
Reviewable status: 0 of 16 files reviewed, 3 unresolved discussions (waiting on @orizi)
crates/cairo-lang-sierra-to-casm/src/invocations/int/signed.rs
line 122 at r3 (raw file):
jump IsInRange if is_in_range != 0; tempvar is_overflow; hint TestLessThan {lhs: value, rhs: range_size} into {dst: is_overflow};
value might be up to 2*MAX, but you check here value <= MAX-MIN. This works if MIN=-MAX-1, but this assumption should be added to the documentation somewhere, so we won't try to use it for weird ranges.
crates/cairo-lang-sierra-to-casm/src/invocations/int/signed.rs
line 124 at r3 (raw file):
hint TestLessThan {lhs: value, rhs: range_size} into {dst: is_overflow}; jump IsOverflow if is_overflow != 0; // IsUnderflow:
Remove or indent
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.
Reviewed 7 of 16 files at r1, 8 of 8 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @orizi)
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.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @spapinistarkware)
corelib/src/test/integer_test.cairo
line 1142 at r2 (raw file):
Previously, spapinistarkware (Shahar Papini) wrote…
Please check sub overflow and add underflow
Done.
cd5ab66
to
e372958
Compare
7cd8370
to
67b9d03
Compare
e372958
to
57e7c6b
Compare
67b9d03
to
d7339bc
Compare
57e7c6b
to
6e6567f
Compare
6e6567f
to
6957643
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.
Reviewable status: 13 of 16 files reviewed, 3 unresolved discussions (waiting on @spapinistarkware)
crates/cairo-lang-sierra-to-casm/src/invocations/int/signed.rs
line 122 at r3 (raw file):
Previously, spapinistarkware (Shahar Papini) wrote…
value might be up to 2*MAX, but you check here value <= MAX-MIN. This works if MIN=-MAX-1, but this assumption should be added to the documentation somewhere, so we won't try to use it for weird ranges.
do you mean that this only works for MIN <= 0 && MAX-MIN < 2**128?
because otherwise i'm not sure i understand.
Added asserts for this.
crates/cairo-lang-sierra-to-casm/src/invocations/int/signed.rs
line 124 at r3 (raw file):
Previously, spapinistarkware (Shahar Papini) wrote…
Remove or indent
Done.
6957643
to
6409ff9
Compare
commit-id:a8262aa8
6409ff9
to
a849524
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.
Reviewed 1 of 2 files at r4, 1 of 2 files at r5, 5 of 5 files at r6, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @orizi)
Stack:
This change is