Modify ExternCompiler hook interface
commitce92a234ef2663d29da6537a1119887f3f581b2a
authorRick Lavoie <rlavoie@fb.com>
Wed, 8 Jul 2020 21:21:01 +0000 (8 14:21 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 8 Jul 2020 21:25:18 +0000 (8 14:25 -0700)
treeea27fa13e02eb69d1226235b6f2a816ff4bd4dbc
parent6e4b88c0706a637948ef9438217c47fc7ff266c0
Modify ExternCompiler hook interface

Summary:
Modify the ExternCompiler hook interface to return UnitEmitters
directly instead of HHAS. This gives the implementation of the hook
more freedom (it can generate UnitEmitters directly instead of forcing
HHAS generation). Instead of one compile function being provided to
the hook, two are. One generates HHAS (as before), and the second will
convert HHAS to an UnitEmitter. This gives the hook maximum
flexibility and does not require duplication of the assembler
logic. Simplify the interface a bit and remove some un-used logging.

Reviewed By: subsistence, paulbiss

Differential Revision: D22428830

fbshipit-source-id: 2dbcf2621c7f94de19221eaa172982a5edce8597
hphp/runtime/vm/as.cpp
hphp/runtime/vm/as.h
hphp/runtime/vm/extern-compiler.cpp
hphp/runtime/vm/extern-compiler.h