Introduce emit{Set,Bind}L() helpers
commit9c8dda1d6ebaaa87dcea206923dc68b63defade7
authorJan Oravec <jan@fb.com>
Thu, 29 Sep 2016 17:43:32 +0000 (29 10:43 -0700)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Thu, 29 Sep 2016 17:55:12 +0000 (29 10:55 -0700)
treecbafa7f9c25aedf06a59a3585d11ea750394a84a
parent1cbbf18de9a7d3693740e67d515bd98ff8133f06
Introduce emit{Set,Bind}L() helpers

Summary:
emit{Set,Bind}() requires the destination to be pushed on the stack before
the source, which could be inconvenient when the source is already on the
stack and the destination is a local.

Introduce a set of helpers for setting/binding the top of the stack to the
local. Update the existing workarounds to use these helpers. Fix a bug in
FinallyThunklet where an incorrect local was being unset.

Reviewed By: markw65

Differential Revision: D3927217

fbshipit-source-id: a34c91b7e3d18022e708aa0210f9f6cd3c7332d2
hphp/compiler/analysis/emitter.cpp