Move sandbox bytecode generation out of HPHPc
commit03a9aa1eb8eed61b92fd5714fcad54124f3c314f
authorRick Lavoie <rlavoie@fb.com>
Tue, 29 Mar 2022 15:42:55 +0000 (29 08:42 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 29 Mar 2022 15:42:55 +0000 (29 08:42 -0700)
tree7648da66dae340d2551d9769176a410158b15c07
parent4dcbe6b2d8d68a7be01d286594dbf34a15efd106
Move sandbox bytecode generation out of HPHPc

Summary:
Some of the logic to parse and produce bytecode in sandbox mode was in
compiler/analysis/emitter.cpp. There's no longer any need for it to be
there. Move it into runtime/vm/runtime-compiler.cpp instead. We no
longer need the g_hphp_compiler_parse hook, as that existed solely to
allow the runtime to call into the HPHPc code.

Instead of exposing BuiltinSymbols and AnalysisResult to the whole
world, add similar functionality for tracking systemlib unit-emitters
to systemlib.cpp. This lets us delete BuiltinSymbols entirely. There's
now no longer any dependency on compiler/ from the runtime.

Reviewed By: jano

Differential Revision: D35171055

fbshipit-source-id: 4673cc4703b40f43ed2cf048627cb6e34076886e
16 files changed:
hphp/compiler/analysis/analysis_result.cpp
hphp/compiler/analysis/emitter.cpp
hphp/compiler/analysis/emitter.h
hphp/compiler/builtin_symbols.cpp [deleted file]
hphp/compiler/builtin_symbols.h [deleted file]
hphp/compiler/compiler.cpp
hphp/compiler/package.cpp
hphp/hhvm/process-init.h
hphp/runtime/base/unit-cache.cpp
hphp/runtime/vm/runtime-compiler.cpp
hphp/runtime/vm/runtime-compiler.h
hphp/runtime/vm/unit-emitter.cpp
hphp/system/systemlib.cpp
hphp/system/systemlib.h
hphp/test/ext/test.cpp
hphp/test/ext/test_base.cpp