-
Notifications
You must be signed in to change notification settings - Fork 684
Add CAIRO_DEBUG_SIERRA_GEN env var.. #8069
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
Conversation
orizi
left a comment
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 1 files reviewed, 2 unresolved discussions
crates/cairo-lang-compiler/src/db.rs line 45 at r1 (raw file):
if std::env::var("CAIRO_DEBUG_SIERRA_GEN").is_ok() { // If we are debugging sierra generation, we wan't to finish the compilation // rather than panic.
the ap-overflow case isn't an issue for deciding on inlining?
Code quote:
// If we are debugging sierra generation, we wan't to finish the compilation
// rather than panic.crates/cairo-lang-compiler/src/db.rs line 45 at r1 (raw file):
if std::env::var("CAIRO_DEBUG_SIERRA_GEN").is_ok() { // If we are debugging sierra generation, we wan't to finish the compilation // rather than panic.
Suggestion:
// If we are debugging sierra generation, we want to finish the compilation
// rather than panic.|
Previously, orizi wrote…
I think that if it happens here, it will happen in the final program. I just that that it was common enough that we should provide users the ability to debug it and get the code location from cairo-execute |
5075e34 to
9675616
Compare
ilyalesokhin-starkware
left a comment
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 1 files reviewed, 2 unresolved discussions (waiting on @orizi)
crates/cairo-lang-compiler/src/db.rs line 45 at r1 (raw file):
if std::env::var("CAIRO_DEBUG_SIERRA_GEN").is_ok() { // If we are debugging sierra generation, we wan't to finish the compilation // rather than panic.
Done.
orizi
left a comment
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 1 files reviewed, 2 unresolved discussions (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-compiler/src/db.rs line 45 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
I think that if it happens here, it will happen in the final program. I just that that it was common enough that we should provide users the ability to debug it and get the code location from cairo-execute
i'm actually not sure that is true for size estimation of const-folding:
if const_evaluated_as_true() {
short()
} else {
long()
}
|
Previously, orizi wrote…
I don't follow. |
|
Previously, ilyalesokhin-starkware wrote…
You mean that the compilation of long would fail, but the compiled program will only include short? |
orizi
left a comment
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 all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-compiler/src/db.rs line 45 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
You mean that the compilation of long would fail, but the compiled program will only include short?
yes
|
Previously, orizi wrote…
I can restore it, but I guess this is true for any misscompilation that doesn't get into the final code. Do we want people to report such cases or not? |
orizi
left a comment
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 1 files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-compiler/src/db.rs line 45 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
I can restore it, but I guess this is true for any misscompilation that doesn't get into the final code.
Do we want people to report such cases or not?
ap-change specifically does sound like a special case for me.
|
Previously, orizi wrote…
Why? is the case of huge code that becomes small because of const-folding an interesting one? |
orizi
left a comment
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 1 files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-compiler/src/db.rs line 45 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
Why?
is the case of huge code that becomes small because of const-folding an interesting one?
i don't know - but it is a case that may happen now, and would start crashing after this change.
9675616 to
bacb1eb
Compare
ilyalesokhin-starkware
left a comment
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 1 files reviewed, 1 unresolved discussion (waiting on @orizi)
crates/cairo-lang-compiler/src/db.rs line 45 at r1 (raw file):
Previously, orizi wrote…
i don't know - but it is a case that may happen now, and would start crashing after this change.
Done.
orizi
left a comment
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 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware)
No description provided.