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
Kill fgets_socket_variation1.php with fire

It's flaky on contbuild

Reviewed By: @edwinsmith

Differential Revision: D987629
Refresh ringbuffer tracing

The binary ringbuffer tracing had bitrotted a little with the
transition to the IR. I also reorganized RingBufferEntry a little to hold more
information and cleaned up the printing code to print more information about
SrcKeys.

Reviewed By: @jdelong

Differential Revision: D985433
Make test/zend/good/Zend/tests/bug36759.php less flaky

This recently started failing on my devserver but not on contbuild. I
traced it down to a dependence on the iteration order of
ExecutionContext::m_liveBCObjs. Wrapping it in a function make the objects'
destruction order deterministic.

Reviewed By: @ptarjan

Differential Revision: D987785
Fix how 'pipes' argument is handled in proc_open

Zend PHP ignores whatever the 'pipes' reference is pointing to
in proc_open, and just fills it with an array of resources, but
only if they are not null.

Also rename the ChildProcess's classname to lowercase 'process'
to match Zend's output.

This fixes a fatal in Symfony unit tests.

Reviewed By: @ptarjan

Differential Revision: D984996