Rearrange DebugHeader to have a kind byte.

Summary: Allow it to be parseable.

Reviewed By: @bertmaher

Differential Revision: D1670071
Add "Xzibit" changes to NEWS

Reviewed By: @ottoni, @paulbiss

Differential Revision: D1672107

Signature: t1:1672107:1415679414:f05fac79c8db692681742e097c9d3f5761b256b1
typechecker: declaration location in extend_final error

Summary: ... to avoid forcing the reader to look it up

Reviewed By: @jwatzman

Differential Revision: D1664597

Signature: t1:1664597:1415660397:2b8cc4493de5dd1ddf8c686459bc8248ce3dad1b
Remove wildcard matching of Typing_defs.ty

Summary: Using a wildcard (_) in pattern matches makes it difficult to add new
types because you aren't sure of all the places where you need to
update. So I went through the typing folder and fixed all the relevant
cases I ran into.

Reviewed By: @int3, @elgenie

Differential Revision: D1671948

Signature: t1:1671948:1415695678:9a2996e8110c22611fe2e98c7134946f928d24cf
Prevent m_nextKI from going negative in MixedArray

Summary: The "next free element" in mixed arrays should never be negative.
Add a check for the array_pop() case (test 001), and for the promotion
from empty array case (test 002).

Closes #3588

Reviewed By: @JoelMarcey

Differential Revision: D1671899

Signature: t1:1671899:1415684115:8dec1102aed9dffc975ea1c40d4b1258de4bf758
Make RefData fields private.

Reviewed By: @jdelong

Differential Revision: D1672593

Signature: t1:1672593:1415719832:0f5596f36529c6f63dd352b70c0e422c366e58b8
Fix a few memory management issues in DOMDocument

Summary: php_dom_create_object wasn't inserting the new object in the orphan
set if it already existed. This was causing certain objects obtained with
DOMNode::removeChild() to leak permanently.

DOMNode::replaceChild() wasn't removing the newly inserted element from its
orphan set, potentially causing a double-free during sweep. And it wasn't
inserting the old, unlinked element into the orphan set, causing that object to
leak.

Reviewed By: @paulbiss

Differential Revision: D1664798

Signature: t1:1664798:1415311959:80b81c412f82fad7e57a75c72ad17375c5654828
Avoid deleting hack/bin/README when doing `make clean`

Reviewed By: @jwatzman

Differential Revision: D1672271

Signature: t1:1672271:1415731388:7cca4b1aaaba5eac37e9257ed7224db13dea2467
Add hh_server --version

Reviewed By: @jwatzman

Differential Revision: D1671853

Signature: t1:1671853:1415731292:b43c0e7e6c265bc51a276ca2a711f0e0fa8a3ab0
typechecker: ReflectionClass hhi fixup

Summary: ... implements Reflector was missing.

Reviewed By: @​mhabmajer

Differential Revision: D1672768

Signature: t1:1672768:1415732865:d233e4f3241c6bdaf11f10c4e896c3cf5f13e9ce
Updated win32-cygwin patch Fixes Issue #4062

Summary: https://gist.github.com/steelbrain/b16cb9bd6fcc4fb5b1b2
Closes https://github.com/facebook/hhvm/pull/4188

Reviewed By: @sgolemon

Differential Revision: D1673132

Signature: t1:1673132:1415735948:034ab904b65558e12dec1b04c6d9e852a7dfd261
Allow nested namespaces with sane behavior

Summary: Continue to allow nested namespaces but make the behavior logical by
concatenating nested namespace names. (See new test for example)

Fixes #2260

Reviewed By: @JoelMarcey

Differential Revision: D1669100

Signature: t1:1669100:1415682581:f0d3b408e2751af398081ea3ea6bf72742c14144
Introduce immediately executed async lambdas

Summary: Introduce syntax for immediately executed async lambdas, where this:

  async { ... }

is equivalent to:

  call_user_func(async () ==> { ... })

Useful especially when awaiting multiple non-trivial async blocks.

Reviewed By: @elgenie

Differential Revision: D1672843

Signature: t1:1672843:1415731520:e8ff6ac7ff20cad91f057058dbfb3359ad405188
Fix some bugs in hhbbc support for http_response_code, php_errormsg

Summary: It was neglecting to handle parameters with volatile names when
creating function entry states.  So it would assert as soon as it analyzed the
first use of the parameter (e.g. the VerifyParamType).

Reviewed By: @bertmaher

Differential Revision: D1662140

Signature: t1:1662140:1415342486:8e945a41eb01d77251ba7dc79029982d79ed1bd8
Fix mysqli_options. Stop asserting.

Summary: D1660924 eliminated defaults in datatype switches. This started causing
assertions on 5 good zend tests.

P17123886

The reason is because no matter what happened in the switch, we would always hit
`not_reached()`. That's not right. :)

So use a `goto` to make sure we can get out gracefully if we hit a valid data
type.

Reviewed By: @paulbiss

Differential Revision: D1668749

Signature: t1:1668749:1415686958:5ebffda9dbbc4676c1290329f28ae0fedc300bd0
Honor the Redis timeout

Summary: The timeout is there to make sure we don't sit too long without having anything to
read. This wasn't being honored; so waiting to read a non-existent key would go
on indefinitely.

Fixes #3094

Reviewed By: @sgolemon

Differential Revision: D1667533

Signature: t1:1667533:1415414331:208ce6076688321dd92b0dc19d63bdaa12793e61
implement custom propEmpty logic for SimpleXML

Summary: The PHP documentation for empty() says the following:
"That means empty() is essentially the concise equivalent to
!isset($var) || $var == false."

Surprise surprise, SimpleXML doesn't work that way:
$xml = new SimpleXMLElement('<foo><bar/></foo>');
var_dump(isset($xml->bar));  // true
var_dump((bool)($xml->bar)); // true
var_dump(empty($xml->bar));  // true, wat?!

To solve this, we do the same thing as ObjectData::clone by
defining an HasPropEmpty attribute and checking for it in
ObjectData::propEmpty.
Closes https://github.com/facebook/hhvm/pull/4204

Reviewed By: @JoelMarcey

Differential Revision: D1672895

Signature: t1:1672895:1415741237:a4b8ab13ab654ea5dcba64aefe907b5889079028
Document type variant

Summary: Some interesting background on what's going on here.

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

Reviewed By: @elgenie, @int3

Differential Revision: D1665859

Signature: t1:1665859:1415326879:4cf92330907287029b5709cd8d3bb8b362e86ed2
Adopt PHP7's looser handling of return values in user session handler

Summary: Explicitly handle 0/-1 return values and throw a warning
on anything but those or true/false.

Per #3055

Reviewed By: @paulbiss

Differential Revision: D1673400

Signature: t1:1673400:1415737574:61b8900d99dcffb36f1aec0ac3a4c3b3c75a3e1f
Remove a few 'sometimes guarded load' cases, make LdElem non-essential

Summary: Just a few flags changes.  (I think we can plan on eventually
collapsing all three of these load instructions into LdMem now that we have
pointer types.  Unless we think it's useful that LdElem requires that it's a
ptr to unboxed?)

Reviewed By: @alexmalyshev

Differential Revision: D1664692

Signature: t1:1664692:1415386780:066afdedc6365e0cf7774cfa42801bbe8b740a17