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
Print(Str|Int|Bool) can throw

Reviewed By: @jdelong, @swtaarrs

Differential Revision: D1603435
Add a macro to build with wholecfg on by default

Summary: So we can set up automated tests for it.

Reviewed By: @bertmaher

Differential Revision: D1603332
Define CAML_NAME_SPACE in hh_shared.c

Summary: From the OCaml manual: "It is recommended to define the macro
CAML_NAME_SPACE before including these header files. If you do not
define it, the header files will also define short names (without the
caml_ prefix) for most functions, which usually produce clashes with
names defined by other C libraries that you might use."

Reviewed By: @jwatzman

Differential Revision: D1602541
Make globals local where possible in hh_shared.c

Summary: I'm about to try and serialize global state, so the less state
there is, the better :)

Reviewed By: @jwatzman

Differential Revision: D1601865