Add option to run perf to hhvm_wrapper

Summary: HHVM wrapper is handy for compiling a bytecode repo and running
hhvm with that repo in one easy step. Often times we'd like to run perf
record on just the hhvm step. Adding a CLI option will make that easier.

Reviewed By: @jdelong

Differential Revision: D1611783
Minor fix to variable name in Huffman benchmark

Summary: Some benchmarking tools depend on the regular naming of the benchmark suite
variable in each benchmark. Huffman breaks the rule, so we need to fix it now.

Reviewed By: @edwinsmith

Differential Revision: D1611826
Unroll AKExists into a series of comparisons on small static arrays

Summary: This is meant to go hand-in-hand with my other change to transform calls
to `in_array` into AKExists, though of course this will benefit organic
uses of AKExists too.

The CFG this generates is suboptimal. It generates a series of diamonds
(one per element of the haystack array) whereas it would ideally result
in something like this:

```
B1 --F--> B2 --F--> B3 --F--+
|         |         |       |
T         T         T       |
|         |         |       |
v         v         v       v
             Bdone
```

I'd have to expose additional API in IRBuilder to do this (since the
HhbcTranslator code would have to create and append its own Blocks) and
I wasn't sure it would be worthwhile. The worst that will happen is a
few redundant unconditional jumps, which we should actually be able to
optimize away downstream.

Reviewed By: @edwinsmith

Differential Revision: D1599893
Added support for ReflectionFunction::getClosureThis() [closes #3476]

Summary: PHP supports ReflectionFunction::getClosureThis() since version 5.4.0.
Added one test to slow section in norepo mode, since closure binding does not work in repo yet (3e290683d8504c74570343aee66da45863db8adf).
Closes #3476.
Closes https://github.com/facebook/hhvm/pull/3943

Reviewed By: @paulbiss

Differential Revision: D1608061
Allow non-variant args when inlining NativeImpl

Summary: Change CoerceStk to call a (new) version of tvCoerceParamInPlace
which throws an exception on failure instead of returning false.

Update the unwinder to handle tvCoerceException in CoerceStk's
catch block. Add CheckSideExit to allow for this while also
branching to the unusual cleanup behavior required for inlined
builtins in the case of regular exceptions.

This should noticeably reduce the HNI call overhead
and open up the rest of the conversions to continue
without hurting perf.
@sgolemon@swtaarrs got this most of the way there already,
just cleaning things up a bit.

Reviewed By: @swtaarrs

Differential Revision: D1414528
Use a FixedVector for EHEnt m_catches

Summary: It was using a std::vector, so switching to FixedVector cuts the size
down from 48 to 32 bytes.

Reviewed By: @jdelong

Differential Revision: D1605194
Add missing ini for XSL tests.

Summary: Signed-off-by: Arthur Loiret <arthur.loiret@ens-lyon.fr>
Closes https://github.com/facebook/hhvm/pull/3962

Reviewed By: @paulbiss

Differential Revision: D1612394
Fix is_callable for interface and abstract methods

Summary: Functions without a body can't be called
Fixes #3956

Closes https://github.com/facebook/hhvm/pull/3957

Reviewed By: @paulbiss

Differential Revision: D1610550
Fix issues with shutdown/postsend functions

Summary: The comment was wrong, you could remove elements
from the array as well as add them.

It also seems plausible that the entire m_shutdown array could be
reallocated (eg by registering the first postsend function while
iterating the shutdown functions), invalidating the array reference
that we were iterating over.

Reviewed By: @jdelong

Differential Revision: D1610874
Don't allow deserialization to violate static analysis

Summary: If HardPrivatePropInference is on, we shouldn't allow people to
unserialize objects where the fields have types that aren't visible to ahead of
time analysis, or it can crash the VM.

Reviewed By: @markw65

Differential Revision: D1611626
Move (most of) ext_asio to HH namespace

Summary: Move ext_asio to HH namespace. Everything except the base WaitHandle class.

Reviewed By: @jano, @elgenie

Differential Revision: D1240837
WaitHandle -> HH\WaitHandle

Reviewed By: @jano

Differential Revision: D1574162
An async method's return annotation (if there is one) must be "Awaitable"

Summary: This takes the first step for improving return type enforcement for async
functions. We enforce that if there is a return type annotation, it must be
"Awaitable" or "Awaitable<T>".

This diff also adds some missing plumbing for return annotations for
closures and lambdas.

Reviewed By: @elgenie