Replace autoload_map.hdf with IndexJob
Summary:
Currently hphpc requires a symbol->file index for parse-on-demand.
It gets this map from autoload_map.hdf, a huge config file generated
during the WWW build.
This diff refactors hphpc to add an indexing phase, which runs before
bytecode generation. The indexing phase computes Hack decls for every
autoload-eligible WWW file, and from that builds an index that replaces
autoload_map.hdf. Indexing shares a lot of code with parsing, so both
phases use their own instance of Package which determines which files
get indexed as well as owning a lot of intermediate state.
The computed decls are currently only used for indexing, but will soon
be used to by a new DeclProvider for bytecode generation.
The computed index replaces the use of autoload_map.hdf without adding a dependency on SQLFacts or native facts sql3 db.
Reviewed By: ricklavoie
Differential Revision:
D37960849
fbshipit-source-id:
22ac4a6994286f2bd35b73b928ed4ae04887cf5f