Allow some easy and questionable printing for LowPtr classes in dbg

Reviewed By: @jdelong

Differential Revision: D1392954
Check surprise flags after I/O

Summary: Check surprise flags immediately after waiting for I/O and avoid
execution of any PHP code if the request timeout (or other error
condition) has occurred.

Reviewed By: @jdelong

Differential Revision: D1396843
Swallow exceptions thrown by raise_warning() error handler

Summary: Callbacks registered with asio are not supposed to throw PHP exceptions.
If they do, asio swallows them and reports a warning. The problem is
that the warning invokes error handler that can throw again. Let's
swallow these exceptions as well.

Reviewed By: @jdelong

Differential Revision: D1397053
Implemented xdebug_call_line

Summary: This diff implements the xdebug function xdebug_call_line.
If function g calls function f and function f calls xdebug_call_line,
the line where g calls f is returned.

Reviewed By: @fredemmott

Differential Revision: D1388259
designate "synthetic" class elements in "hh --show"

Summary: I've found it to be useful info
 * ::class is marked as ce_synthesized
 * DynamicYield is not, because we don't want overrides

Reviewed By: @jwatzman

Differential Revision: D1396749
remove normative "should" from <<override>> message

Summary: It's possible that the way to resolve the error is to remove
 the <<Override>> marking. "marked as" is more "neutral" than.

Reviewed By: @jwatzman

Differential Revision: D1396750
reflection cleanup

Summary: - remove wtf addition of ##isIterable##
 - match isIterateable implementation to PHP5 (http://3v4l.org/maasG)
 - added ## inherits / implements ## to ## ReflectionMethod ##
 - removed an unnecessary ## ReflectionClass ## instantiation from ## ReflectionClass::__toString ##
 - renamed ## _toStringHelper ## to ## toString ## and made it ## final ##
 - edit some copypasta in method doc strings

Reviewed By: @ptarjan

Differential Revision: D1396727
Make Map use a MixedArray for its buffer

Summary: This diff changes Map to use a MixedArray for its buffer instead of using
its own custom buffers. The intent is to clear the way for enabling fast
(usually O(1)) conversion between Maps and map-like arrays.

Making this work was a little trickier than it was to make Vectors use
arrays as buffers. Here is a summary of the significant changes:

 - Maps no longer define their own Elm struct, but instead use MixedArray's
   Elm struct.

 - The Map implementation has been refined to shrink its capacity under
   certain conditions. I noticed this was a problem when I looked at the
   Map::addAll(), and since I was ripping up and re-writing that part of
   the Map implementation anyway I decided to address this issue in this
   diff.

 - While Map logic still controls when growing, compacting, and shrinking
   are triggered, Maps now delegate to various MixedArray methods to
   actually perform grow, compaction, and shrink operations. Maps also
   delegate to MixedArray for findForRemove and eraseNoCompact.

 - A number of Map fields (m_used, m_cap, etc) were removed and instead
   we now just use the equivalent fields in the Map's MixedArray buffer.

 - Maps now keep track of whether there might be int-like string keys
   present. This was essential to make Map::toArray() efficient in most
   cases but still get behavior correct in the rare case where a Map
   contains int-like string keys.

 - While writing this diff I tripped over an issue where wordcpy() was
   going off the rails if you pass it a zero size, so I added asserts in
   various parts of the code to help avoid this pitfall.

 - There are more opportunities for code sharing between MixedArrays and
   Maps, but I've deferred a fair amount of that to keep this diff smaller
   and easier to review.

Reviewed By: @dariorussi

Differential Revision: D1383777
autoload_map: add line and file info to string for fatal errors ...

Summary: ... including a test case to illustrate hoistability-banned
 reorderings that can interact with the autoloader.

Reviewed By: @ptarjan

Differential Revision: D1396650
Disable flaky zend tests

Reviewed By: @bertmaher
Remove Translator::analyze()

Summary: I started by deleting Tracelet and then cleaned up anything that broke
as a result. I also moved RefDeps from tracelet.h to its own header since it's
still used and removed a few other things that are now dead.

Reviewed By: @edwinsmith

Differential Revision: D1372951
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