Restructure build time bytecode cacheing:
commit1293ef5a839d0243d75d3b9374ef0524befe87ca
authorMark Williams <mwilliams@fb.com>
Fri, 18 Oct 2019 22:11:21 +0000 (18 15:11 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 18 Oct 2019 22:14:23 +0000 (18 15:14 -0700)
tree2435dfdc65c8c2fb084ccb1468dc4214c5c12cd7
parent5e558ed5cee488288f21dadefdc6ca6d45cbd1ca
Restructure build time bytecode cacheing:

Summary:
When I first wrote this, hhbbc expected to be given a vector of
std::unique_ptr<UnitEmitter>. This meant that it took ownership, and
once you called it, you could no longer safely use the UnitEmitters.

This meant that we couldn't hold on to the UnitEmitters, and cache
them in parallel with doing the hhbbc step; so we had to stop caching
as soon as we finished parsing to avoid slowing the build down.

After the previous diff in this stack, we can hold on to the
UnitEmitters, and keep a single thread writing them in parallel with
the hhbbc step, which has minimal effect on the performance.

Reviewed By: ricklavoie

Differential Revision: D17814009

fbshipit-source-id: 905ec42f901fed66f768bcfd1587080dae2cbffc
hphp/compiler/compiler.cpp
hphp/compiler/package.cpp
hphp/compiler/package.h