Extract elaboration of consts and functions into endo pass
commitcb9ca09af0ad5c7388c1df9e237d7887b031fec1
authorThomas Jiang <thomasjiang@fb.com>
Thu, 24 Oct 2019 04:49:48 +0000 (23 21:49 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 24 Oct 2019 04:53:42 +0000 (23 21:53 -0700)
treed3050ec945a0b6a57f70d023751d2af1c8f98974
parentffeb42fd48fcc62d1937849daa2481da462fc656
Extract elaboration of consts and functions into endo pass

Summary:
We currently perform namespace elaboration all over the place - such as in naming and in codegen. If we are able to extract the namespace elaboration into one pass, we can remove having separate logic in naming and codegen and have it all in one place.

This diff moves the naming of consts and functions into the endo pass.

let locals are not a supported feature yet - so edge cases may not yet be caught - just got enough working such that tests pass.

Reviewed By: kmeht

Differential Revision: D17815572

fbshipit-source-id: aec7c6802f2ec6769eb961cf1b3f9fc25bef9098
hphp/hack/src/naming/elaborate_namespaces_endo.ml
hphp/hack/src/naming/naming.ml
hphp/hack/src/naming/naming_special_names.ml