Hack codegen: static closures, ordering of inline functions and classes
Summary:
We weren't generating the correct `DefCls`, `DefFunc` and `DefAlias` instructions when lambdas and inline classes or functions were mixed.
We now do. Most of the work is done during closure conversion, which now also hoists out inline classes and functions, leaving behind a
"stub" definition in order to generate the correct `DefCls` or `DefFunc` instruction.
Now that closure conversion just takes a `program` as input and produces a `program` as output, the operation of `hh_single_compile` is much simpler.
Reviewed By: hubyrod
Differential Revision:
D5182055
fbshipit-source-id:
b30e920af315b97395c4a0b50825dabdc6b8097e