hhi: remove extraneous type param for RescheduleWaitHandle

RescheduleWaitHandle<void> is not a thing. Closes #2378.

Reviewed By: @gabelevi
use ArrayInit in array_chunk

Reviewed By: @edwinsmith

Differential Revision: D1254743
Fix FTP extension

ftp_alloc()'s third param should be by-ref

Reviewed By: @fredemmott

Differential Revision: D1272363
fix https://github.com/facebook/hhvm/issues/2387 constructor fix

Josh is out and julien asked me to fix this ASAP so here it is.
Josh was correct in his diagnosis.

Reviewed By: @gabelevi

Differential Revision: D1271040
Blacklist PHP5 locale test that's broken on Travis

Its output doesn't match ("Simplified" vs "Simplified Han").

Reviewed By: @ptarjan

Differential Revision: D1271439
SrcKey: add resumed flag to indicate execution state

Add resumed flag to the SrcKey indicating whether we are in a resumed
state (i.e. resumed execution of async function or generator). Allows
deduplication of async function bytecode.

Reviewed By: @ottoni

Differential Revision: D1268985
Added JSON-Schema to test runner.

[JSON-Schema](https://github.com/justinrainbow/json-schema) is a framework used by Composer.
Closes #2415

Reviewed By: @ptarjan

Differential Revision: D1272730

Pulled By: @alexmalyshev
Fix Ratchet expected in test runner to reflect 100%

One of the expected tests was still expected to be an error, which returns thumbs down.

Ratchet is now 100%, so they should all be ```.```
Closes #2403

Reviewed By: @ptarjan

Differential Revision: D1272898
Added lessphp framework to test runner.

Already 100%
Closes #2417

Reviewed By: @ptarjan

Differential Revision: D1272803
Make regionizeFunc aware of region arcs

That's it.

Reviewed By: @bertmaher

Differential Revision: D1267063
Return a ReflectionExtension instance from ReflectionClass::getExtension

HHVM's version of ReflectionClass::getExtension always returned an empty string instead of an instance of `ReflectionExtension`.
This diff corrects the return value but still does not report the correct extension.

This allows the tests for PDepend to run.

Closes #1670

Reviewed By: @fredemmott

Differential Revision: D1271365
Adding PHP Depend to frameworks test runner

This diff adds unit tests for the framework/product PHP Depend (Referenced in #1670).
The framework does not pass yet because of issues with our implementation of `ReflectionClass::getExtension` and `ReflectionClass:getExtensionName()`.

Reviewed By: @ptarjan

Differential Revision: D1271177
variadic functions; standard calls only

Both interpreter and jit support for
 https://wiki.php.net/rfc/variadics for standard functions calls:

 * minimal shuffling: act rec num args is fixed up to include be
   nonvariadics + 1 (aka numParams) in case of extra arguments
   to variadic functions
 * additional extra args assertion
 * warning message about insufficient arguments changed to "at least" for
   variadics

Reviewed By: @paroski

Differential Revision: D1235901
variadic functions: call_user_func_array

call_user_func_array (and the associated FCallArray bytecode) are
 similar to standard function entry, except that the args array is
 used as the source of parameters rather than the existing stack.

 * minimal shuffling: act rec num args is fixed up to include be
   nonvariadics + 1 (aka numParams) in case of extra arguments
   to variadic functions
 * prepareArrayArgs changed into an inline static (and rewritten for
   clarity of logic) -- the variadic is initialized only when more than the
   non-variadic number of args is actually passed.

 For JITs: x64 uses a helper to jump into the interpreter functions
 for manipulating the ActRec, and ARM punts the FCallArray bytecode
 entirely.

Reviewed By: @paroski

Differential Revision: D1240730
variadic functions: test coverage for async and generators

Variadic async functions "just work" because the 'resume' entry into
 an async function happens after all the parameters/locals have been
 initialized (the first ## await ##). Similarly, generators unpack
 their parameters before entering the ## yield ##. However, it's
 worthwhile to have specific test coverage of these functions.

Reviewed By: @paroski

Differential Revision: D1252842
variadic functions: support in invokeFunc

When we use invokeFunc to reenter the VM (e.g. for
 cpp-implemented code that takes callbacks), we get an array of
 arguments. We definitely want to do the extra-args trimming on it
 while setting up the act rec, rather blowing the stack, so the jit
 prologue cannot be used.

 This diff also does a bit of code cleanup:
 - get rid of invokeFuncCleanupHelper
 - use cleanupActRecAndParams in prepareArrayArgs
 - use prepareArrayArgs in invokeFunc for greater code reuse

Reviewed By: @paroski

Differential Revision: D1242970
variadic functions: allow variadic closures

... the only thing required to get this to work is to make
 sure that the extra work the jit does (to assign $this) uses the
 correct offset that accounts for the variadic param.

Reviewed By: @paroski

Differential Revision: D1253343
variadic perf: AttrVariadicParam; m_numNonVariadicParams

This should be a faster due to direct access of fields.
 Additional perf testing in: {D1258915}

Reviewed By: @paroski

Differential Revision: D1258822
variadic functions: split "extra args" jit helpers

... since these branches can all be taken statically at jitting
 time, instead of during function calls

Reviewed By: @paroski

Differential Revision: D1257726
func entry: remove unnecessary use of variant in func entry

... it doesn't make sense to box and unbox just to use a
 static helper function.

Reviewed By: @jdelong

Differential Revision: D1253577