Updated the package version in CMakeLists.txt

Summary: This should be `3.4.0` in the 3.4 branch.
Closes https://github.com/facebook/hhvm/pull/4181

Reviewed By: @JoelMarcey

Differential Revision: D1669153

Signature: t1:1669153:1415514126:b9abcf702f328ac51c6ead9966b5d43238d788fe
Move MInstrState from C++ stack to RDS header

Summary: Move MInstrState to be with the other VM registers in the RDS header,
rather than reserving space for it on the native stack in enterTCHelper. This
is one step on the way to allowing arbitrary rsp manipulations during
tracelets. I also removed MInstrState's tvVal and tvResult members since
they've been unused for a while.

Reviewed By: @jasone

Differential Revision: D1665434
Only ignore hashbang line in cli mode

Summary: @​see https://github.com/php/php-src/blob/master/sapi/cli/php_cli.c#L606
Closes https://github.com/facebook/hhvm/pull/4183

Reviewed By: @JoelMarcey

Differential Revision: D1669155

Signature: t1:1669155:1415548679:cbc90bcbd8331cd54018590dab2747f7d6a28813
Improve fix for issue #4111

Summary: Closes https://github.com/facebook/hhvm/pull/4180

Reviewed By: @JoelMarcey

Differential Revision: D1669151

Signature: t1:1669151:1415548684:b89950d6e0f02fa8a4fc4bc0a9b17d4fb5835a07
issue,4156: xml skip white option also skips new lines'\n' charachters a...

Summary: ...s well,By avoiding this php and hhvm now behave the same.
Closes https://github.com/facebook/hhvm/pull/4185

Reviewed By: @JoelMarcey

Differential Revision: D1669156

Signature: t1:1669156:1415548942:aee891116a06f9eedc66c65ca4491785b3e0c443
Fix fribidi dependency includes

Summary: Fribidi depends on glib, but we're not adding the header file include dirs into our paths.  This makes cmake find glib for us.  Without this, the build fails to find glib.h (on gentoo) and halts.
Closes https://github.com/facebook/hhvm/pull/4187

Reviewed By: @JoelMarcey

Differential Revision: D1669177

Signature: t1:1669177:1415549048:7bff25565005cd0ec28326c41e48f561f5061775
GetPrimaryIP is IPv4 only

Summary: GetPrimaryIP uses gethostbyname which is IPv4 only.  Now we cache
both the IPv4 and IPv6 address of the host so SERVER_ADDR can be set based
on the request being made.  Without this change, $_SERVER['SERVER_ADDR']
on IPv6 only hosts would return the hostname instead of an ipaddress
for xbox-server and libevent-server.  Unfortunately with libevent-server,
access to the remote client fd would allow getting the server's
address, but it is not, so use this hack for now.

Also, retire safe_inet_ntoa in favor of folly:IPAddress

Reviewed By: @bmatheny

Differential Revision: D1658651

Signature: t1:1658651:1415566504:ab034dbef2e19613b4d1fc14899c4df852158e96
Don't leak HashContexts

Summary: HashContext is allocated via the global operator new,
and it contains a std::shared_ptr, so we need the default
sweep behavior, which is "delete this".

Reviewed By: @bertmaher

Differential Revision: D1668713

Signature: t1:1668713:1415417867:13da80e72cce887104b547e737fbbd37fcbd52cc
Initial support for "$obj->:xhp-attr" syntax

Summary: This diff adds initial support for "$obj->:xhp-attr" syntax. As a first
step, this syntax will desugar to "$obj->getAttribute('xhp-attr')" to
support using the new "$obj->:xhp-attr" syntax to read attributes from XHP
objects.

Future plans include supporting "$obj->:xhp-attr" syntax for writing to
attributes on XHP objects and incorporating XHP attributes more with the
core runtime (ex. storing attributes inline inside the object similar to
normal object properties), but this will come later.

Reviewed By: @elgenie

Differential Revision: D1641268
Fix bug with "list($this) = .."

Summary: In some cases, trying to assign to "$this" via list assignemnt can cause
HHVM's bytecode emitter to encounter errors. This diff fixes the bytecode
emitter errors and makes HHVM match PHP5's behavior.

Reviewed By: @elgenie

Differential Revision: D1667214

Signature: t1:1667214:1415391466:d4ca1852a2ddc3ac560949d049f27c8c55c40b83
Remove unnecessary wrapper functions from ext_collections

Summary: Now that HHVM doesn't use the mangle map scheme for extensions defined in
.idl.json files, we can eliminate a bunch of unnecessary wrapper functions
in ext_collections.

Reviewed By: @jdelong

Differential Revision: D1665279

Signature: t1:1665279:1415492122:752981f56cace95bed4163612ca6710bf1fded46