Create Autoload map from repo
commit43a0cae32c16a93ea7a61ec9db184a3d374a3ac0
authorEmil Hesslow <emil@fb.com>
Thu, 26 Mar 2020 19:16:55 +0000 (26 12:16 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 26 Mar 2020 19:21:33 +0000 (26 12:21 -0700)
treea807b3935f5957cd1e6708bad5bd4b7d5da234f0
parentac2d22306d46e7831db1d560708294fdb7999542
Create Autoload map from repo

Summary:
- I need to look into why the tests fails but I want to make sure I'm going in the right direction
- When HHVM starts up and running in repo mode I check a config and if that config is set to true then I build an autoload map from the repo at start up.
- The autoload map contains Map<symbol, unitSn> and then we go from unitSn to path and then we load that path which looks up the unitSn from the path.
  - That was the easiest way to implement it without changing to much.
  - A followup optimization would be to never go to path. Just get the unitSn and then load it.

Reviewed By: jano, jthemphill

Differential Revision: D15329666

fbshipit-source-id: c86b981f5ef6e4091a7d12013cc77aa87db476d8
13 files changed:
hphp/compiler/analysis/emitter.cpp
hphp/hhbbc/main.cpp
hphp/runtime/base/autoload-handler.cpp
hphp/runtime/base/autoload-handler.h
hphp/runtime/base/repo-autoload-map.cpp [new file with mode: 0644]
hphp/runtime/base/repo-autoload-map.h [new file with mode: 0644]
hphp/runtime/base/runtime-option.h
hphp/runtime/ext/hh/ext_hh.cpp
hphp/runtime/vm/repo-autoload-map-builder.cpp
hphp/runtime/vm/repo-autoload-map-builder.h
hphp/runtime/vm/repo-global-data.h
hphp/runtime/vm/repo.cpp
hphp/runtime/vm/repo.h