Add touching hhi files to the heater

Summary: Some systems are pretty aggro about cleaning up `/tmp`, so
let's keep poking the mtime of these files as long as we're using them.

Reviewed By: joelb, eletuchy

Differential Revision: D1423210
Clean up uses of Type::unbox() in MInstrTranslator

Summary: We were assuming that the result of a LdRef instruction would always
be typeParam.unbox(), but this isn't the case. I went through all the uses in
minstrtranslator and audited each one, either commenting on why it's ok or
fixing it to use ldRefReturn. The call to checkMIState() is now after
emitBaseOp() because none of the base ops actually needed it and this allows us
to use m_base in checkMIState() instead of duplicating some of its logic.

Reviewed By: @jdelong

Differential Revision: D1410177
Update flaky PHP5 tests

Summary: They couldn't be run in parallel. They've already been fixed in PHP5,
so it was just a matter of running import_zend.py

Reviewed By: @ptarjan

Differential Revision: D1423492
Don't follow region-breaking instructions in WholeCFG

Summary: Including control flow arcs created by bytecodes like Switch isn't
supported, so let's ban those in WholeCFG like we do in HotTrace.

Reviewed By: ottoni, alexanderm

Differential Revision: D1421832
Don't include the initial block twice

Summary: We weren't adding the initial block to the visited set during the CFG
traversal, so we could end up adding it to the region twice, which caused
various problems.

Reviewed By: @ottoni

Differential Revision: D1421815
Plumb a handle to the return value through the hotprofiler.

Summary: Plumb the symbol name through more of the hotprofiler.
Annotate hotprofiler virtual override methods with override keyword as needed.
Reformat as necessary to meet 80 char/line coding style.

Closes #3071

Reviewed By: @markw65

Differential Revision: D1412089

Pulled By: @LiraNuna
Initial blocks with backwards edge predecessors are merge points

Summary: The initial block of a region only needs one incoming arc to count as
a merge point. It already has an invisible "entry" arc coming into it.

Reviewed By: @ottoni

Differential Revision: D1412834
decouple server protocol

Summary: 1. Inline HandleMessage into HackProgram
2. Move HackProgram out of ServerFunctors into its own file
3. Unfunctorize ClientCheckStatus command

ServerMsg protocol is assumed throughout, which makes this
simplification no less general. HackProgram was already in
the wrong place, and this enlarges it, so moved it out now.

Reviewed By: @gabelevi

Differential Revision: D1421302
move declaration of cpu_set_t to ext_hotprofiler.h to fix OS X build

Summary: Fixes issue https://github.com/facebook/hhvm/issues/3079

cpu_set_t is used in ext_hotprofiler.h (line 18 of .cpp, line 129 of ext_hotprofiler.h) before it has been defined in ext_hotprofiler.cpp (at line 51).
Closes #3106

Reviewed By: @ptarjan

Differential Revision: D1422472

Pulled By: @fredemmott
flow stop, servermsg out of stop, flow command modules

Summary: Move nice_kill from ClientStop command functor to param module.

Reviewed By: @jwatzman

Differential Revision: D1421357
Make hhvm print errors and abort if an HNI systemlib is broken

Summary: A parse error currently just leads to everything in the systemlib not
being defined.

Reviewed By: @ptarjan

Differential Revision: D1421895
Fix support for parse_str; treat it like extract

Summary: Assume it trashes the variable environment, and in repo mode make it
part of the DisallowDynamicVarEnvFuncs scheme.  Also close a few holes in this
stuff in fb_rename_function and simple_function_call.cpp.

Closes #3081.

Reviewed By: eletuchy, ptarjan

Differential Revision: D1422197
Remove uses of RegNumber outside X64Assembler.

Summary: Prefer Reg64 (etc) instead.

Reviewed By: @oyamauchi

Differential Revision: D1421690
Remove blocking acquire of the write-lease in smashPrologueGuards

Summary: It was only needed to unprotect the tc, which we no longer do.

Reviewed By: @swtaarrs

Differential Revision: D1424510
Move ifThenElse helpers to code-gen-x64.cpp

Reviewed By: @jasone

Differential Revision: D1424833
Implement zend EG(error_reporting).

Summary: Use a macro and wrapper class to turn lval/rval use of EG(error_reporting)
into calls to setter/getter methods for class RequestInjectionData.
Closes #3126

Reviewed By: @swtaarrs

Differential Revision: D1424013

Pulled By: @fredemmott
Extend zend_call_function to handle method invocation.

Summary: Add a null pointer guard in the zend property getter,
as for example when the object doesn't have the given property.
Closes #3076

Reviewed By: @ptarjan

Differential Revision: D1413661

Pulled By: @LiraNuna
Introduce c_WaitHandle::asWHKind()

Summary: Move all static casts from c_WaitHandle to c_FooWaitHandle to a single
function called c_WaitHandle::asFoo(). Makes all these huge switches
more readable.

Reviewed By: @billf

Differential Revision: D1425048
Clear the locals vector in FrameState when translating a block with an unprocessed predecessor

Summary: We were clearing the snapshot in FrameState, but not FrameState::m_locals.

Reviewed By: @ottoni

Differential Revision: D1409019
Cleanup mcg creation/deletion

Summary: We recently added a call to mcg->code.unprotect(), with no
explanation of why it was needed, leading to a long debate. This moves
it to a more appropriate place, and adds a comment to explain why
its there.

We also weren't ever deleting JIT::mcg, even though its destructor does
real work (such as deleting the perf-pid.map file, if requested), and also
freeing memory (which will help with leak detection).

Reviewed By: @swtaarrs

Differential Revision: D1424033