Use extern-worker in HPHPc
commit4c648e2b5cb38498af64fb6fc279a06943132cc0
authorRick Lavoie <rlavoie@fb.com>
Wed, 16 Mar 2022 20:19:52 +0000 (16 13:19 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 16 Mar 2022 20:19:52 +0000 (16 13:19 -0700)
tree19282f0264b0c8cf08586045ce7986fe6b5d091b
parent73afe741d3524696fc7527aa3bacd003b9053ffb
Use extern-worker in HPHPc

Summary:
Switch HPHPc over from using multiple threads invoking HackC locally,
to using the extern-worker framework to do the parsing.

Since extern-worker uses coroutines, this involved making the file
discovery and parsing logic async. The main complexity is around
grouping the source files to maximum extern-worker cache effectiveness
(see comment in package.cpp for details).

The code under compiler/ is increasing odd due to more and more
functionality being stripped out. Next I'll try to refactor some of it
and make it more logical.

Reviewed By: edwinsmith, mofarrell

Differential Revision: D34780989

fbshipit-source-id: 8a504694af559727f68b61c477751e105d9b8183
13 files changed:
hphp/compiler/analysis/analysis_result.cpp
hphp/compiler/analysis/analysis_result.h
hphp/compiler/compiler.cpp
hphp/compiler/option.cpp
hphp/compiler/option.h
hphp/compiler/package.cpp
hphp/compiler/package.h
hphp/runtime/base/coeffects-config.cpp
hphp/runtime/base/coeffects-config.h
hphp/runtime/base/file-util-defs.h
hphp/runtime/base/file-util.cpp
hphp/util/extern-worker-detail.h
hphp/util/sha1.h