Previously names for lambdas were generated with use of a global counter. Since fcode functions are stored in maps, the order of processing local lambdas was unspecified. This resulted in lambdas getting names assigned non-deterministically during lifting.
This PR fixes that by naming lambdas according to their locations. Counters are still used to handle cases where locations are not available. However, those counters are now function-local. Inner AST has deterministic structure, thus lambdas will be numbered in DFS order.
PR is sponsored by ACF.
*Created by: radrow*
fixes #485
Previously names for lambdas were generated with use of a global counter. Since fcode functions are stored in maps, the order of processing local lambdas was unspecified. This resulted in lambdas getting names assigned non-deterministically during lifting.
This PR fixes that by naming lambdas according to their locations. Counters are still used to handle cases where locations are not available. However, those counters are now function-local. Inner AST has deterministic structure, thus lambdas will be numbered in DFS order.
PR is sponsored by ACF.
ghallak
(Migrated from gitlab.com)
approved these changes 2023-09-03 00:33:14 +09:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Created by: radrow
fixes #485
Previously names for lambdas were generated with use of a global counter. Since fcode functions are stored in maps, the order of processing local lambdas was unspecified. This resulted in lambdas getting names assigned non-deterministically during lifting.
This PR fixes that by naming lambdas according to their locations. Counters are still used to handle cases where locations are not available. However, those counters are now function-local. Inner AST has deterministic structure, thus lambdas will be numbered in DFS order.
PR is sponsored by ACF.
Created by: radrow
Just checked in HTTP that it does not reproduce on the provided example
Created by: hanssv
Review: Approved
Great job finding and fixing this one 👍
approved this merge request
Merged by: radrow at 2023-09-04 16:50:38 UTC