Autostart server on hack build, increase timeout

Reviewed By: @aryx

Differential Revision: D1336574
Fix a null pointer deref in SimpleXMLElement::getDocNamespaces

Summary: Needed a null pointer check.

Reviewed By: @fredemmott

Differential Revision: D1328311
Don't run past the end of the format buffer in string_printf

Summary: If the current char is a single quote it'll increment the index in the
loop body, and then increment it again in the loop step before accessing
the buffer.

Reviewed By: @fredemmott

Differential Revision: D1329727
Unbreak EVALSHA in Redis client

Summary: Keys in Redis::$map have to be all lowercase, because Redis::_call calls
strtolower on the method name before it looks it up in the table.
Closes #2704

Reviewed By: @fredemmott

Differential Revision: D1336714

Pulled By: @JoelMarcey
Remove spurious logging command

Summary: Oops.

Reviewed By: @pikatchu

Differential Revision: D1337484
document constructor inconsistency

Summary: Closes #2594
Closes #2592

Reviewed By: @JoelMarcey

Differential Revision: D1336439
First take at trying to enable precompiled headers.

Summary: Turn it on with `cmake -DENABLE_COTIRE=1`. Once this gets tested in many configs and verified it helps with compile times, we can enable it by default.
Closes #1932

Reviewed By: @JoelMarcey

Differential Revision: D1337629

Pulled By: @ptarjan
HPHPCompiler, update detect compiler.

Summary: Fix chrpath with apple.
Refactoring detect compiler GCC / Clang / Intel C++ / Visual Studio C++

Reviewed By: @ptarjan

Differential Revision: D1337974

Pulled By: @JoelMarcey
Corrected the implementation of stream_copy_to_stream

Summary: Our implementation of `stream_copy_to_stream` had a very weird bug: it read a post-buffered raw data from the input stream.
This diff corrects this by using `read` instead of `readImpl`.

Fixes #2602

Reviewed By: @fredemmott

Differential Revision: D1337301
Don't write-protect the TC when we drop the write lease

Summary: This is taking up to 16% of CPU time while running tests and hasn't
caught any real bugs that we can remember. It's also been a headache for making
inline caches and since it's debug-only it doesn't even help security-wise in
an opt build.

Reviewed By: @jdelong

Differential Revision: D1329793
Profile to find places we can guard on KindOfStaticString

Summary: If 100% of the Str values flowing through a guard in profiling
translations are KindOfStaticString, we change that guard to KindOfStaticString
in the optimized translation. In practice, most values are KindOfString with a
static _count but guarding on that is much more expensive and must be justified
with concrete savings. This diff just covers the cases that should be made
strictly better: the guard is the same size/cost, shouldn't fail any more often
than it used to, and the generated code will only differ in that there may be
fewer refcounting operations.

Reviewed By: @ottoni

Differential Revision: D1331820
Make number_format support multi-char and multi-byte separators

Summary: refs facebook/hhvm#2661

Reviewed By: @ptarjan

Differential Revision: D1334819
Get async functions working with the region JIT

Summary: There were a few issues:

  a) the resumed flag was not being set in HhbcTranslator, so it
     caused issues when translating eager and resumed regions back to
     back

  b) the complex IR control flow produced for Await was causing the
     post-conditions code to find multiple "main exits" for a
     profiling translation

  c) the TransCFG contained arcs between eager and resumed
     translations

Reviewed By: @jano

Differential Revision: D1328649
Make php_filter_unsafe_raw actually strip stuff

Summary: php_filter_strip() doesn't mutate its' arguments, so calling it and ignoring the result was rather pointless.

Fixes facebook/hhvm#2337

Reviewed By: @ptarjan

Differential Revision: D1337641
Make interface typehint error messages match php5

Summary: Fixes facebook/hhvm#1849

Reviewed By: @ptarjan

Differential Revision: D1334554
There are OSS Build errors from this soon-to-be reverted commit

Summary: This reverts commit b5ab4a786dbf5a7047df743db934d8d44d9f324e.

This breaks the OSS build.

missing endif() after line 20
c++: error: unrecognized command line option ‘-stdlib=libstdc++’ when building. Line 42 CMAKE_CXX_FLAGS for GNU

Reviewed By: @ptarjan

Differential Revision: D1338339
Pass numSlotsInFrame through Resumable helpers

Summary: Add an extra parameter to CreateAFWH to pass numSlots and
pass it as a constant from the in-TC call sites.

Reviewed By: @jano

Differential Revision: D1338608
Enable ZNC core by default, for real this time

Summary: This was supposed to have been turned on by default in change 7bdfc2d, but it
wasn't, possibly because ZNC was pretty broken at the time. It no longer is, so
it makes sense to make this the default.
Closes #2671

Reviewed By: ptarjan, seanc

Differential Revision: D1330150

Pulled By: @JoelMarcey
Add support for cloned closures in PGO mode

Summary: Cloned closures don't have actual prologues, and their prologue tables
point to translations of the corresponding function entries (main body
or DV funclets).  To support them in PGO, we just need to update the
corresponding entry in the prologue table when retranslating their
function entries in Optimize mode.

Reviewed By: aravind

Differential Revision: D1333821
Add camel caps search support to hh_client search

Summary: This adds a way to search for a long class name faster if you know the capital letters in it.

For example, you could search for FooBarClass by typing 'fbc' instead of the full name.

This was supported in monocle and I don't want to drop any features so I've added it to hh_client search.

Reviewed By: @jwatzman

Differential Revision: D1339161