-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[inferpython] first version of subroutine inlining
Summary: Even if we ignore exceptional edges for now, it appears we have to handle the CALL_FINALLY subroutine call. For example: ``` async def foo(): with read1(): try: with read2(): res = await get() ## <--- CALL_FINALLY will appear here return res finally: do_finally() ``` The current solution relies on the DFS traversal done when computing a topological sort of nodes. At the same time we perform it we transport an abstraction of the subroutine call stack. It allows us to resolve the indirect jumps that occured on some END_FINALLY operations. This whole algorithm will need to be strengthen when adding exceptional adges. Reviewed By: ngorogiannis Differential Revision: D63980143 Privacy Context Container: L1208441 fbshipit-source-id: e5610f29da544df5b495fd2339f40ab50fa44c5e
- Loading branch information
1 parent
3ee7800
commit 306fe07
Showing
7 changed files
with
401 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.