Unroll tail recursion, report parameter pessimisation
Summary:
The aggregation functions are roughly a fold with an accumulator that is a tuple of the patches and the status. However, we never really use the accumulator patches meaningfully. We always pass in `[]` and always concatenate the results onto the accumulator.
So, instead of doing the `acc`-`@` style, I changed the child call to be a simple `List.concat_map`. I then added a new post visitor function that consumes `node_patches` and `children_patches`.
This change adds it so that when we are done visiting a parameter, we report
- file name - useful for bucketing codegen and test
- declaration kind - useful for comparing functions, methods, closures
- if it had a type at all (common on closures), or if no pessimisation occured
- if it was pessimised whether it got `~`, `supportdyn`, or both (denoted `s`, `l`, or `sl`)
- note: this depends on some in flight work to correctly target `nonnull` for pessimisation
Quick index:
- `nt` = no type
- `np` = not pessimised
- `p` = pessimised
- `s` = `supportdyn`
- `l` = `~`
Differential Revision:
D36385350
fbshipit-source-id:
dc1a9e3e63ea23e38178952c4ecd1ef10aae1744