Allow redefining a constant from an interface if theres a superclass in the way

Summary: php5-compat

sadpanda

Fixes https://github.com/facebook/hhvm/issues/2998

Reviewed By: @JoelMarcey

Differential Revision: D1395608
--no-steps flag and better error msg on bad step name

Summary: Adding arg for build.

Reviewed By: @aryx

Differential Revision: D1394962
Allow trialing comma in type list in HHVM

Summary: As per title. This give really confusing error messages, and is accepted by hh.

See https://www.facebook.com/groups/hackforhiphop/permalink/689199427795342/

Reviewed By: @elgenie

Differential Revision: D1393253
IteratorIterator->current() is supposed to return null after end of iterator

Summary: Fixes #2993
Closes #2996

Reviewed By: @ptarjan

Differential Revision: D1397183

Pulled By: @JoelMarcey
Fix recursive deletion of dead symlinks, bad hash for mediawiki tests

Summary: - Mediawiki was redownloading every time because short hash !=== full hash :p
 - Redownloading was broken because getRealPath() returns false for a dead symlink - also, we were deleting the symlink targets, not the symlinks themselves.

Reviewed By: @JoelMarcey

Differential Revision: D1397616
Disallow ?mixed as a type hint.

Summary: Disallow ?mixed a a type hint. ?mixed is equivalent to mixed and so is redundant, and its use could lead people to become confused about the nullability of mixed.

Shipping this needs to wait until all the ?mixed are out of www. I removed them all once, but more were added.

Reviewed By: @jwatzman

Differential Revision: D1395363
Cleanup callbacks

Summary: Avoid code duplication so that it's easier to add new callbacks.

Reviewed By: @billf

Differential Revision: D1397179
Introduce {ExternalThreadEvent,Sleep}WaitHandle on{Create,Success,Fail} hooks

Summary: Introduce ability to hook to create/success/fail events of {ExternalThreadEvent,Sleep}WaitHandles. This is useful for profiling I/O events.

Reviewed By: @billf

Differential Revision: D1397203
Autocomplete Refactor - add hooks in naming

Summary: Same idea as D1392915 but in naming.

Reviewed By: @jwatzman

Differential Revision: D1393879
Add Redis::_serialize()

Summary: See https://github.com/nicolasff/phpredis#_serialize.
Closes #3010

Reviewed By: @ptarjan

Differential Revision: D1397231

Pulled By: @JoelMarcey
Fixed bug in unwind_builtin_frame caushing a crash in debug mode

Summary: Previously calls to unwind_builtin_frame would fail if hhvm was compiled in
debug mode and the builtin function had any arguments. hphpd_break is the only
function this currently applies to, but I need unwind_builtin_frame for
xdebug.

unwind_builtin_frame would only be called if after hphpd_break you used the
"next" command. Continuing doesn't result in a mode switch.

The issue was that unwind_builtin_frame calculated the top of the
evaluation stack incorrectly. It popped from the eval stack until
hitting the top of the frame, and so it freed local variables
e.g the arguments. When it later tried to free the local variables,
they were already freed (and garbage was written over in debug mode).

This diff fixes the calculation of the eval stack top and adds
a call to pop off the slots properly.

Thanks to @jano for helping me debug this.

Reviewed By: @jano

Differential Revision: D1390958
Change Pear revision

Summary: I think it's testing the same code.... looks like they did a rebase and force push.

Reviewed By: joelm, ptarjan

Differential Revision: D1398293
Fix printing of Ref-to-Boolean RuntimeTypes

Summary: I hit an assert here while tracing when this tried to print the value
of a Ref-to-Boolean.  The problem is that valueType() unboxes, but valueBoolean
asserts that the type is not boxed.

Reviewed By: @jdelong

Differential Revision: D1394892
more resilient temp dir handling

Summary: I think we're trying a double-delete as Pear fails to install.

Reviewed By: @JoelMarcey

Differential Revision: D1398162
Fixed casting Closure to Array

Summary: When casting an object of type Closure to an Array, the result should be an array containing the closure.
This diff also fixes incorrect var_dump output for Closure to make the test pass.

Fixes #2918

Reviewed By: @ptarjan

Differential Revision: D1391371
Fix /stop when bind fails, redux

Summary: Third attempt at fixing this problem.  The IP and AdminPassword are missing in the stop url.  This causes a 60 second delay starting a new HHVM as it waits to kill based on the pidfile.

Added a callback class 'ServerEventListener' which gets a call when a server is about to close the listening socket.  HttpServer uses this callback to remove the pidfile.  The timing of removing the pidfile is sensitive as we have to remove it before a new HHVM thinks it created it.

Fixing this now in the context of a mysterious startup crash that happens when devs get impatient and restart the server multiple times. t4483583

Reviewed By: @bertmaher

Differential Revision: D1377159
Unclown mustache test

Summary: Should be reliable with per-run tempdirs

Reviewed By: @JoelMarcey

Differential Revision: D1398401
Change order of wait handle processing from FIFO to LIFO

Summary: Process most recently woken up wait handles first.

Reviewed By: @billf

Differential Revision: D1394032
Implemented xdebug_call_function

Summary: This diff implements the xdebug function xdebug_call_function.
If function g calls function f and function f calls xdebug_call_function,
the name "g" is returned.

Reviewed By: @sgolemon

Differential Revision: D1388555
Remove unused util/pool.h

Reviewed By: @ptarjan

Differential Revision: D1396961