-
Notifications
You must be signed in to change notification settings - Fork 1.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
gen_snapshot crashes when generating an AOT snapshot of dartdev #54128
Comments
//cc @alexmarkov |
Small repro: @pragma('vm:never-inline')
void foo(int port) {
try {
print('hi');
} catch (e) {
if (port != 0) rethrow;
bar(port);
}
}
@pragma('vm:never-inline')
void bar(int x) {
print(x);
}
void main() {
foo(int.parse('2'));
bar(int.parse('3'));
}
Constant propagator replaces only input uses of Should we replace all uses including environment uses? Or maybe just relax flow graph checker to allow this discrepancy? @mraleph WDYT? |
It turns out changing conditional constant propagation to update environments is not enough, as it may replace a use of redefinition with a constant while environment references an original definition. For this to work we need to consistently update environments when inserting all sorts of redefinitions and boxing/unboxing. This seems like an overkill, so I'm leaning towards relaxing flow graph checker: https://dart-review.googlesource.com/c/sdk/+/338941. |
The text was updated successfully, but these errors were encountered: