Fix a couple more issues exposed by wholecfg region selector

Summary: - traceEnd() should only be called in Trace mode, since the last region block may not be a region exit

- allow tracked local types to become Bottom in FrameState

- don't try to pre-optimize LdLocs with incompatible types

Reviewed By: @swtaarrs

Differential Revision: D1601028
fix jemalloc stats xml

Summary: forgot to put a "/" to close the low_allocated tag. Causeing xml to not
parse properly.

Reviewed By: @bertmaher

Differential Revision: D1599874
Revert various HNI conversions

Summary: We can't handle a throw through a CoerceStk, so need to revert these for now

Revert "Convert APC to HNI"                                   : de2fb9ff58389c
Revert "Restore some mixed typed arguments with ?string type" : 042433fb53e92b
Revert "Convert string to HNI"                                : f0f3f6d7a938d3
Revert "Get rid of mangle map stuff"                          : 5ea8a1d993fd1f

The mangle map diff is a victim; things wouldn't build unless I reverted that too.

Reviewed By: @bertmaher, @jdelong

Differential Revision: D1601800
Add an ini_get_all test which gets everything

Summary: In order to ensure we are not landing breaking changes to config options, particularly
to names of those options, let's have a test that simply outputs all of the options
and their values when the test runner runs.

This test will only work with a vanilla, non-repo mode test run, so we have a `.norepo` file for this test.

Broke this up into three test parts to avoid pcre limitations when regex-ing over one big file.

Reviewed By: @ptarjan

Differential Revision: D1591831
Remove hphp/test/frameworks/perf

Summary: Moved to https://github.com/hhvm/oss-performance

Reviewed By: @oyamauchi

Differential Revision: D1599732
Hardcode array_map typing into typechecker - argument typing

Summary: As in title, see comment in .hhi file and unit tests for explanation.

Reviewed By: @elgenie

Differential Revision: D1566676
Fix in_array->array_key_exists conversion

Summary: It needs a static array, not a smart-allocated array with
the static bit set.

This also ensures that we only get one copy of each distinct array.

Reviewed By: @swtaarrs

Differential Revision: D1602742
Remove some helpers in datatype.h

Summary: One isn't used and one had a single caller.

Reviewed By: @mxw

Differential Revision: D1597974
Remove some MIN/MAX macro uses in the emitter

Summary: <algorithm> has preferable type-safe versions that don't double-eval
their args.

Reviewed By: @paulbiss

Differential Revision: D1599803
Remove now-unneeded MAP_ANON defines in read-only-arena.cpp

Summary: This should've gone away when it was switch to use malloc instead of
mmap.

Reviewed By: @bertmaher

Differential Revision: D1601873
Use smaller HHBC arena chunks by default

Summary: Why so big

Reviewed By: @bertmaher

Differential Revision: D1601886
Fix ini_get_all_first_third.php.expectf

Summary: There was a commit race between the diff that added this and a diff
that changed the default value.

Reviewed By: @JoelMarcey

Differential Revision: D1602809
Deal with trait incompatibilities

Summary: #5306996 has the best description. In short, if you have a memoized method in a trait with no args, and override it in a class with something like `<<__Memoize>>function foo($arg = null) {}` you get a fatal because the cache prop in the class and the cache prop in the trait are initialized with different values. This fixes the issue by disambiguating the properties

Reviewed By: @jano

Differential Revision: D1602174
Only run the get everything ini test internally for now

Summary: Related to: https://github.com/facebook/hhvm/commit/087cebc0b545f0a921bf565a991f49c098ea45bc

We have Facebook only RuntimeOptions that don't exist otherwise. This causes the test to fail miserably in OSS-land.

So add a skipif to run this test only internally for now, until we can think of a better system to have the test run
correctly both internally and externally.

Reviewed By: @swtaarrs

Differential Revision: D1603111
Fix parsing of postfix operators.

Summary: Based on what I understand of the parser's reduce code, this should be the
right way to parse things...

It might look like expr_postfix_unary is completely disregarding precedence,
but that's because the functions calling it handle precedence already.

In `$a->b++`, reduce() 'shifts' `$a->b` onto the stack, finds out that `++` has
lower precedence than `->`, then returns. So expr_postfix_unary gets called with e1
set to `$a->b`.

In `$a && $b++`, when parsing $b, reduce() sees that `++` has higher precedence
than `&&` and so creates `$b++`.

Finally, the precedence of a postfix operator should not affect the remainder
of the parse. I.e. we should parse `$a && $b++ === $c` as `$a && ($b++ === $c)`
rather than `($a && $b++) === $c` -- even though `++` has higher precedence
than both `&&` and `===`, we decide to shift `===` based on the relative
precedence of `&&` and `===`, and `++` does not come into the picture.

Reviewed By: @pikatchu

Differential Revision: D1598832
Benchmark gardening

Summary: The php-octane benchmarks should behave better when included
multiple times in the same VM invocation.

Modified the normalization factor for DeltaBlue because we weren't
getting enough precision after normalization + rounding.

Duplicated run.php to harness-run.php which includes only a single
(non-existent) include.php file. This layer of indirection will allow
tools to more easily control which benchmarks are run in a single VM
invocation by dynamically generating include.php with the desired files.

Also added a suites.json file to document the benchmarks that exist in a
way that's amenable to scripting.

Reviewed By: @jdelong

Differential Revision: D1600694
Corrected socket connect for IPv6 hosts

Summary: This diff uses the standard method of fetching a host name via
`getaddrinfo` and looping over all the hosts found until one is
successfully conntected.

Reviewed By: @ptarjan

Differential Revision: D1459761
Periodically clear the PCRE cache

Summary: Steady growth of the PCRE cache can cause HHVM to start swapping after
sufficient uptime.  This diff adds a configurable expiration interval for the
cache, which simply clears the whole thing every N seconds.

The advantage of this policy is that it's simple; we don't have to do any real
bookkeeping to keep the cache under a particular size, and we don't have to
worry too much about a cache size versus performance tradeoff, since the cache
can grow up to a generous max size within the time interval.  Instead, it takes
care of slow, steady growth over time.

Of course, the disadvantage is that right after the expiration interval, some
hot regexes will need to be recompiled.

Reviewed By: @jdelong

Differential Revision: D1590095
Remove unused global options.

Summary: Part of my ongoing effort to identify what global state needs
to be saved and restored

Reviewed By: @elgenie

Differential Revision: D1603816
Shrink EHEnt by packing fields

Summary: Goes from 56 bytes to 48 bytes.

Reviewed By: @jdelong

Differential Revision: D1602278