Refactor service requests
commit63b12a4461d45fa759c7bccbb03c72024e0f02d4
authorOwen Yamauchi <oyamauchi@fb.com>
Fri, 16 Aug 2013 20:30:14 +0000 (16 13:30 -0700)
committerSara Golemon <sgolemon@fb.com>
Thu, 29 Aug 2013 18:58:43 +0000 (29 11:58 -0700)
treea5c385fb35277175c0c642c642c61d7604f0cac1
parentcc4c70398a52b12812d857ea12bd9d58b843a533
Refactor service requests

Service requests are part of the translator infrastructure and are
entirely[1] platform-agnostic. I factored out the definitions and the
argument-packing code into their own file.

Then I moved emitServiceReqWork into CodeGenHelpersX64. It was a little
difficult to untangle, since it had several direct uses of tx64 state. I
tried moving emitBindCall and friends too, but it got a lot more
difficult. I'll do that in another diff, to keep this one manageable.

I put this new header file in HPHP::JIT, so I had to introduce some
JIT:: line-noise elsewhere, but this is actually the lesser of two
evils. If I put it in HPHP::Transl, there ends up being Transl::
line-noise in a lot more places. Since JIT is where we're ultimately
headed to (right?), this seemed better.

[1] They're not entirely platform-agnostic, but they should be. Right
now they depend on the x64-specific ConditionCode enum. We use a very
limited set of x64 condition codes in this context, so we should be able
to define a platform-agnostic set of condition codes (a subset of the
intersection of ARM and x64 condition codes) and use it here. I'm
punting on that for now, though.

Differential Revision: D933753
hphp/runtime/vm/jit/abi-x64.h
hphp/runtime/vm/jit/code-gen-helpers-x64.cpp
hphp/runtime/vm/jit/code-gen-helpers-x64.h
hphp/runtime/vm/jit/code-gen.cpp
hphp/runtime/vm/jit/service-requests.h [new file with mode: 0644]
hphp/runtime/vm/jit/translator-x64.cpp
hphp/runtime/vm/jit/translator-x64.h