-
-
Notifications
You must be signed in to change notification settings - Fork 475
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
improvement(semantic/cfg): rework error path. #3519
improvement(semantic/cfg): rework error path. #3519
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
CodSpeed Performance ReportMerging #3519 will not alter performanceComparing Summary
|
9aa8f48
to
94bc8d8
Compare
baa85e5
to
86be84b
Compare
94bc8d8
to
3c67f42
Compare
78d9b27
to
20d3e34
Compare
572e94a
to
e56665c
Compare
20d3e34
to
10fcc29
Compare
e56665c
to
33826cf
Compare
10fcc29
to
2ed1bb7
Compare
33826cf
to
93a23d7
Compare
2ed1bb7
to
ce302b4
Compare
93a23d7
to
60f89d1
Compare
ce302b4
to
462af6d
Compare
462af6d
to
9a2dc57
Compare
@Boshen This stack is ready for review. There is one thing I want you to consider carefully and give feedback on it. I've added a lot of "Implicit" error edges, Basically every basic block has an error edge even when it's not in a try block, And every function (+Program) has a basic block to harness these errors similar to a catch block. It results in extra memory usage and doesn't have a real impact on our current workflow I've mostly added them for forward compatibility if we want to handle cross-module/cross-function error unwinding. So regarding your concern around this subject (#3641) we may want to make these edges optional or remove them altogether until we find a real use case. I added them when I wasn't aware that memory usage is an issue in the semantics. |
0b13125
to
b6a762d
Compare
Merge activity
|
This PR aims to provide a more accurate error/finalization flow, I've nuked the old error path approach and rewrote it with more versatility in mind. We used to visit the finalizer block twice and create 2 sets of AstNodes/Basic Blocks for them, This was there to differentiate between the error path finalizer and success path one. There is no longer a need for having 2 separate sets of nodes to do this differentiation. As for the error path now we have 2 kinds of them, Everything is attached to an error block - even if it is not in a try-catch statement - this results in a lot of extra edges to keep track of these "Implicit" error blocks but I believe in future it can help us to track cross block error paths, For example, we can dynamically attach and cache the implicit error block of a function to its call site error path (either implicit or explicit).
b6a762d
to
29808c4
Compare
This PR aims to provide a more accurate error/finalization flow, I've nuked the old error path approach and rewrote it with more versatility in mind. We used to visit the finalizer block twice and create 2 sets of AstNodes/Basic Blocks for them, This was there to differentiate between the error path finalizer and success path one. There is no longer a need for having 2 separate sets of nodes to do this differentiation. As for the error path now we have 2 kinds of them, Everything is attached to an error block - even if it is not in a try-catch statement - this results in a lot of extra edges to keep track of these "Implicit" error blocks but I believe in future it can help us to track cross block error paths, For example, we can dynamically attach and cache the implicit error block of a function to its call site error path (either implicit or explicit).
29808c4
to
9b30971
Compare
This PR aims to provide a more accurate error/finalization flow, I've nuked the old error path approach and rewrote it with more versatility in mind.
We used to visit the finalizer block twice and create 2 sets of AstNodes/Basic Blocks for them, This was there to differentiate between the error path finalizer and success path one. There is no longer a need for having 2 separate sets of nodes to do this differentiation.
As for the error path now we have 2 kinds of them, Everything is attached to an error block - even if it is not in a try-catch statement - this results in a lot of extra edges to keep track of these "Implicit" error blocks but I believe in future it can help us to track cross block error paths, For example, we can dynamically attach and cache the implicit error block of a function to its call site error path (either implicit or explicit).