Add names to Local_id.t
commit35daff34d8e931db87de48829caf542157e193b7
authorJake Bailey <jakebailey@fb.com>
Mon, 29 Jan 2018 20:48:09 +0000 (29 12:48 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 29 Jan 2018 21:06:40 +0000 (29 13:06 -0800)
tree097112e127727d88314c090873c959396a083ada
parent0e724f429243dbb2bd5908ba55ae10a21e092afd
Add names to Local_id.t

Summary:
Currently, we have a flag to enable name tracking for local identifiers because of concerns about performance when this tracking is enabled.

I don't think it's necessary to track names in a map--we can simply store names inside the Local_id.t type. This way, consumers of the NAST or TAST who would like access to the names of local variables can look them up without needing to rely on hidden global state (which is not always enabled).

Reviewed By: dlreeves

Differential Revision: D6756078

fbshipit-source-id: 1c3d9556f85dc6a6a6fdf7d81a48fdbbef80cc4a
hphp/hack/src/hh_single_compile.ml
hphp/hack/src/hh_single_type_check.ml
hphp/hack/src/utils/local_id.ml
hphp/hack/src/utils/local_id.mli