hhir, patch cgJmpZeroHelper when operands are constant

Problem occurs since there isn't a late run of simplification
to identify this, change it to a direct jump, and eliminate
any following IR.

This is a patch to materialize the condition in the flags reg
and then jcc.  After the simplifier's extra pass is implemented,
this if stanza can be removed or become an assert(false);
Remove LabelInstruction::m_trace

This field is only for the DefLabel instruction, and is always
the same as m_parent, so we don't appear to need it.
Some fixes for comparison ops with objects

When comparing objects with strings, we can re-enter, and may
throw or run arbitrary user code.  We shouldn't CSE or DCE any of
these cases, and we need to pessimize memelim and do a spillStack for
the exception case.
Change HhbcTranslator to own its TraceBuilder

It's looking like having a stack of TraceBuilders in
HhbcTranslator might be nice for stuff I'm trying with inlining, but
rather than do that intertwined with those changes I separated it out.
Most of the lines changed here are m_tb becoming a pointer instead of
a reference.  Also removed a little bit of cut&pasted things and
unneeded includes in irtranslator.cpp while waiting for things to
compile.
Allow IR dumping to use something other than std::cout

traceInstruction was hardcoded to use stdout, via printf. Abstract that out.
Everything's still going to stdout, but we can now change that to any other
std::ostream if we want.
Reduce irtranslator's dependency footprint.

It looks like irtranslator copied translator-x64's headers. Its
concerns are a lot more cleanly separated, so let's exploit that. The
vestigial "log.{cpp,h}" were also sitting around taking up precious git
repo space.
IR translation for ContEnter, tweak translation for ContExit

ContEnter is pretty straightforward after my change to use call/ret in tx64. The
change to ContExit is to generate slightly simpler machine code (now that I know
what DefSP actually does).
Fix and re-enable CreateCont translation

I disabled this back when I was messing with continuations. It's really not
complicated at all.
Finish removal of IRInstruction::m_type, and remove ExtendedInstruction

Finishes moving value types from IRInstruction into SSATmp
(changing the other m_type uses to use m_typeParam), and allows any
instruction to have any number of srcs.  Also consolidates creation
overloads for out different IRInstruction shapes into one helper, so
we need fewer constructors/wrappers.  Adds an outputType() routine
that gives the return type of an instruction given its src types and
type parameter.  (We may want to change outputType() and
assertOperandTypes() to be table-driven---I was initially expecting
more instructions would have logic there, but they are all really
simple.)
s/ASSERT/assert
Restore previous frame if Class::newClass throws

Unit::defClass sometimes needs to set up a top-level ActRec
before calling Class::newClass, because newClass can
throw. Previously, the old ActRec would remain in place and the
VMExecutionContext would eventually get confused and try to execute
memory that didn't have valid bytecode in it.
Do LdFunc/LdFixedFunc before AllocActRec

They can reenter. Make sure the reentry happens before the logical write to the
stack, or else we'll reenter with an incorrect vmsp.
Remove unsed variable
Reduce allocations for ImmutableMap and VectorData

ImmutableMap was doing 3 mallocs (one for the ImmutableMap
itself, one for the hash table, and one for the buckets). In
addition, it was pointlessly rounding up the number of
buckets to the next power of two. Reduce it to one malloc,
and only allocate the required number of buckets.

Similarly SharedVariant::VectorData was doing two mallocs. Reduce
to 1 by inlining the data.
Remove IRFactory argument from InstructionBuilder

This was an artifact from a mid-refactor stage when
ExtendedInstruction wasn't gone yet (it always needed an IRFactory to
be created).
Fix data flow when a try block returns

We approximate the dataflow for try/catch by adding
edges from the start and end of the try block to the start
of every catch. But a top level return in the try block will
kill the edge from the end.

This diff explicitly adds edges from a return in a try block
to every catch. This is sub-optimal, and still misses a
hopefully unlikely case; I'll follow up with a bigger fix to
control flow.
Add new MarkerInstruction subclass for HHIR Marker

The Marker opcode's fields did not overlap with DefLabel,
nor do we ever branch to a Marker; so give it a separate
subclass and clean up the code.
Guard saving persistent PDO connections which are invalid.

Handle a couple edge cases where an active PDO handle dies
before request shutdown can put it back into the persistent
connection pool.
Dont create VarEnv's for functions that dont expect them

Inside Unit::mergeImpl, a ReqDoc would create a new local
VarEnv if the current function didnt already have one. That was
wrong because the unit must have been required via either ReqSrc,
ReqMod or fb_autoload_map. In addition, it meant that we were
attaching a VarEnv to a function that might not be marked
AttrMayUseVV - with the result that we would leak the varenv.
Document the guard instructions