-
Notifications
You must be signed in to change notification settings - Fork 490
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 multi-pop for span. #5588
Conversation
1080883
to
3960647
Compare
3960647
to
eb1dcc6
Compare
why usize here an i16 in the implementation? Code quote: count
.to_usize() |
Suggestion: fixed_size_array_ty |
why i16? Code quote: i16 |
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 10 files at r1, all commit messages.
Reviewable status: 7 of 10 files reviewed, 5 unresolved discussions (waiting on @orizi)
crates/cairo-lang-sierra-to-casm/src/invocations/array.rs
line 448 at r1 (raw file):
); casm_build_extend! {casm_builder, const popped_size = popped_size;
Suggestion:
// Success case
const popped_size = popped_size;
crates/cairo-lang-sierra-to-casm/src/invocations/array.rs
line 486 at r1 (raw file):
tempvar minus_length = arr_start - arr_end; tempvar rc = minus_length + popped_size_plus_1; assert rc = *(range_check++);
Why is the negative case
popped_size_plus_1 >= array_length?
shouldn't it be
array_length < popped_size
?
Suggestion:
/// Prove that popped_size_plus_1 >= array_length
tempvar minus_length = arr_start - arr_end;
tempvar rc = minus_length + popped_size_plus_1;
assert rc = *(range_check++);
2361876
to
f73ee30
Compare
eb1dcc6
to
2d0412d
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: 4 of 10 files reviewed, 5 unresolved discussions (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-sierra/src/extensions/modules/array.rs
line 633 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
why usize here an i16 in the implementation?
it is for being repeated - but changing to i16.
crates/cairo-lang-sierra/src/extensions/modules/utils.rs
line 116 at r1 (raw file):
/// Returns a fixed type array of the given type and size. pub fn fixed_array_ty(
Done.
crates/cairo-lang-sierra-to-casm/src/invocations/array.rs
line 448 at r1 (raw file):
); casm_build_extend! {casm_builder, const popped_size = popped_size;
Done.
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: 4 of 10 files reviewed, 5 unresolved discussions (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-sierra-to-casm/src/invocations/array.rs
line 391 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
why i16?
since this is the bound for actual type sizes.
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: 4 of 10 files reviewed, 5 unresolved discussions (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-sierra-to-casm/src/invocations/array.rs
line 486 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
Why is the negative case
popped_size_plus_1 >= array_length?shouldn't it be
array_length < popped_size
?
Done.
Suggestion: `popped_size + 1 >= arr_end - arr_start |
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 2 of 10 files at r1, 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @orizi)
f73ee30
to
6da2e64
Compare
55fe474
to
32be7b1
Compare
6da2e64
to
7b2cd00
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: 9 of 10 files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-sierra-to-casm/src/invocations/array.rs
line 487 at r2 (raw file):
jump HasEnoughElements if has_enough_elements != 0; // Proving that `arr_start - arr_end + popped_size + 1 >= 0` and therefore // `popped_size + 1 >= arr_end - arr_end == arr.len()` ==> `arr.len() < popopped_size`.
Done.
commit-id:813e40ab
32be7b1
to
5f468ad
Compare
Stack:
This change is