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.
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.