Expose symbol getters to userspacenightly-2020.08.14
commit42bf4619d7667ff047a5ac43b3b6a94fc4068676
authorJeff Hemphill <jhemphill@fb.com>
Thu, 13 Aug 2020 23:50:25 +0000 (13 16:50 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 13 Aug 2020 23:53:01 +0000 (13 16:53 -0700)
treefe1fccbe793d3ddb1fa32dc29194e236ee848a53
parentdef575f92aa4ca722f9d91ed530bff1bd09bd8db
Expose symbol getters to userspace

Summary:
The WWW push process calls into `FlibAutoloadMap::getClassMap()`:

https://www.internalfb.com/intern/diffusion/WWW/browsefile/master/scripts/facts/make_build_artifacts.php?commit=1002505285&lines=57%2C65%2C73%2C81%2C24%2C21-23

I'm not planning on totally overhauling the WWW push process while shipping native Facts, so we need to implement these operations with native Facts.

This diff takes the functionality added in D23084739 and exposes it to userland via four new builtin functions:

```
/**
 * Return all symbols defined in the repo, as a dict mapping each symbol
 * name to the path where the symbol lives in the repo.
 *
 * If a symbol is defined in more than one path, one of the paths defining the
 * symbol will be chosen in an unspecified manner.
 */
function all_types(): dict<classname<mixed>, string>;
function all_functions(): dict<string, string>;
function all_constants(): dict<string, string>;
function all_type_aliases(): dict<string, string>;
```

Reviewed By: billf

Differential Revision: D23088267

fbshipit-source-id: a918b14de41af78dbe5050af14ed61cac89ef6bd
hphp/runtime/base/autoload-map.h