Refactor and fix ExecutionContext::invokeFunc{,Few}()
commit5e4262232438da9a585346d657d0cbba8bd6a791
authorMax Wang <mwang@fb.com>
Thu, 7 Jan 2016 20:49:18 +0000 (7 12:49 -0800)
committerhhvm-bot <hhvm-bot@fb.com>
Thu, 7 Jan 2016 21:00:44 +0000 (7 13:00 -0800)
tree68977a637f13159069135a1d4f37ecdf4a05fbe6
parent85978e182cf5fe498db8d6b5e18288ab00c14a06
Refactor and fix ExecutionContext::invokeFunc{,Few}()

Summary:
The only functional change in this diff is to stop saving the
possibly-dirty, pre-VMRegAnchor value of vmsp() in the pushed VM state,
and instead save the SP after running fixup work.

If tl_regState was clean coming in, this has the same effect.  If
tl_regState was dirty coming in, this saves a different value that we
never use in this function, and which we will never use again outside
this function since we'll have to run fixups again.

Also refactor a bunch of the copypasta.

Reviewed By: markw65

Differential Revision: D2774953

fb-gh-sync-id: 276d2a3a0662e01973e1489e5f40ecbfd7b8ded9
hphp/runtime/base/execution-context.h
hphp/runtime/vm/bytecode.cpp