Use an Array to wrap the TargetCache::s_constants array

In defCns this adds one place where we'll do two lookups
instead of one; the whole thing appears to be on a cold path though.

Reviewed By: bertrand

Differential Revision: D978026
Don't use HphpArray to store static locals; translate StaticLoc* better

Reviewed By: bertrand

Differential Revision: D974604
Implement closure static locals using object props instead of HphpArray

Reviewed By: @edwinsmith

Differential Revision: D976430
Use Array instead of HphpArray to implement f_get_method_names

Reviewed By: @edwinsmith

Differential Revision: D978122
Remove duplicate call to destructObjects

In hphp_context_exit, we've already called this (before
requestEventHandler shutdowns).

Reviewed By: @paroski

Differential Revision: D979838
Make 86pinit and 86sinit invocation not use a raw HphpArray

I had been thinking of changing these to get the information
out of the class without allocating an array (e.g. using special
bytecodes), but it turned out to be easier to do this without changing
that than I thought.

Reviewed By: @edwinsmith

Differential Revision: D979874
Move class constants tables to TargetCache, use Array instead of HphpArray

This was going to make Class 408 bytes, and it seemed
plausible that that could be causing some red cpu time numbers in a
early perflab, so as part of this diff change declInterfaces not to be
a std::vector to pay for it.

Reviewed By: @edwinsmith

Differential Revision: D979850
Wrap array init with assertions about array escalation

{Packed,}ArrayInit is now the only way to create arrays while
assuming no write barriers are needed.  To ensure it's safe, beef up
the assertions in their use.  Fixed a few cases that had incorrect
size estimates.

Reviewed By: @markw65

Differential Revision: D980262
fix gdb script for ObjectData

It looks like this changed out from under the script. Does this look right?

Reviewed By: @markw65

Differential Revision: D985305
Remove useless error array

I decide to scrub the entire zend error message, so this array is stupid now

Reviewed By: @markw65

Differential Revision: D985567
Properly support surprise flags in hhir

hhir used to do a slow exit whenever a surprise flag check
succeeded. This is fine for most things, but can be all sorts of bad news for
PHProf. This diff adds support for calling the surprise flag hooks without
leaving the trace, and should restore some sanity to profiling results.

Reviewed By: @markw65

Differential Revision: D985446
pretty ResourceData in GDB

Can you think of anything better to print than the ID? I can't figure out how to call the `o_toString` methods, and do we want to?

Reviewed By: @markw65

Differential Revision: D985495
Clean up headers a bit.

Moved nontrivial methods out of class definitions, and reduced what cse.h
includes to be closer to IWYU, and avoid circular dependencies in another
diff I'm working on, on top of this one.  Also moved definitions of a few
functions declared in cfg.h from ir.cpp to a new cfg.cpp file.

Reviewed By: @jdelong

Differential Revision: D983927
fix many flakey zend tests

I went through the latest "failed at step" emails and updated those tests to stop sharing filenames and ports.

Reviewed By: @markw65

Differential Revision: D985394
Add support to profile and retranslate prologues in PGO mode

This diff implements support for profiling and regenerating prologues
in PGO mode.  The new kind of profiling prologue ("Proflogue")
translations are generated in the aProf code region and include a
profile counter, but they don't trigger a retranslation.  Instead, the
prologues are retranslated when the function body entry triggers
retranslation.  At that point, all prologues that had been generated
for that function are regenerated, immediately before the new,
optimized function body is generated.  The prologues are generated in
ascending order of profile count, so that the hottest prologues are
placed closer to the function entry.  Also, for prologues with
associated DV funclets, the corresponding DV funclets are generated
right after the prologue.

Reviewed By: @swtaarrs

Differential Revision: D977255
Move trace ownership to irfactory

This is the first step in making IRFactory be the compilation
unit container for the IR.  IRTrace is not a tree node; the
main trace has exits, but exit traces don't.  Lots of code uses
the main trace as a container for the IR entry point block.

Reviewed By: @jdelong

Differential Revision: D985668
s/IRFactory/IRUnit/

Rename IRFactory.  No code changes, just renaming.

Reviewed By: @ottoni

Differential Revision: D986168
Tidied up includes.

Changed '#include "..."' to '#include <...>' where possible.
Where not possible, and where the included file was not obviously local,
marked the include as being Open Source Software.

Reviewed By: @jdelong

Differential Revision: D986815
Filter out 'out of date' message from composer

We don't want the test failing every 30 days.

Reviewed By: @ptarjan
Recompute YieldExpression/AwaitExpression labels on every analysis pass

One of the optimization passes in hphp can remove unreachable
(Yield|Await)Expressions. This leaves the FunctionScope's yield label count in
an inconsistent state, so relabel/count the yields on each pass.

Reviewed By: @markw65

Differential Revision: D982747