Fix linking libfreetype for ext/gd
serialize and load hphpd macros correctly

sosorry

I didn't test macros at all and didn't really think about them during migration.

Reviewed By: @edwinsmith

Differential Revision: D1259041
XSL extension: use a custom error handler.

The previous error handler was causing a segmentation fault when importing an
invalid stylesheet.

This pull reqest is a candidate for both 3.0.1 and 3.1.0.
Closes #2239

Reviewed By: @fredemmott

Differential Revision: D1248712

Pulled By: @ptarjan
set default HTTP_VERSION in fastcgi transport

Flushing the output buffer before the end of request requires a
HTTP_VERSION of 1.1 in HHVM. FastCGI will currently set this to an empty
string when it is not specified in webserver configuration.

If we don't get a HTTP_VERSION header, just set it to the default
Transport HTTP version.

Closes #2256.
Closes #2310

Reviewed By: @fredemmott

Differential Revision: D1258381

Pulled By: @alexmalyshev
Fix ip2long() behavior to be compatible with PHP5.

Fixes #2209.
Closes #2303

Reviewed By: @fredemmott

Differential Revision: D1258331

Pulled By: @alexmalyshev
Add a match() function for use by IR optimizer tests

This avoids the cumbersome testing of each component of an instruction
to ensure it matches the expected output.

The one thing this can't quite accomplish is comparing ExtraData. The
root of the problem is that IRExtraData subclasses don't generally have
an equality function, and as far as I can tell you'd need to implement
one manually for each subclass.

You could imagine something even more wack like extending this mechanism
to entire Blocks. I haven't spent much time seeing how feasible that is.

Reviewed By: @edwinsmith

Differential Revision: D1257438
Add a new admin command to dump the meta info out of APC

Often times the exact contents of the keys in APC isn't as useful as the sizes of the values, whether the item is in memory or in the archive, and the TTL. This adds a new admin command that can dump the meta information about APC in a space separated file. This can then easily be parsed by a variety of tools to do offline analysis. The short term goal is to run this on a few webis infrequently to dump the conents of apc to scuba so we can get a view of where the problems in APC are. A similar approach was done for memcache through the memcached composition analysis tables. This resulting investigation resulted in large efficiency improvements in the Cache tier. Note that the unit tests seem to be peremently postponed so I am marking this diff as override-unit-failures.

Reviewed By: @dariorussi

Differential Revision: D1257692
EZC: add stubs for some stream functions

* Merge main/php_streams.cpp and main/streams/streams.cpp. Only the
  latter has an equivalent .c file in PHP.
* Add stubs that unconditionally throw. Several of them were needed for
  Mongo to link without "undefined reference" errors. All the Mongo
  tests now pass, which tells you something about the test coverage.

Submitted on behalf of a third-party: The PHP Group
Source: PHP 5.6.0-dev
License: version 3.01 of the PHP license
Closes #2275

Reviewed By: @fredemmott

Differential Revision: D1253816

Pulled By: @ptarjan
Convert ext/standard/errorfunc to HNI

Closes #1724

Reviewed By: @fredemmott

Differential Revision: D1248723

Pulled By: @ptarjan
Properly map the parameters and result from access to stat and back

Since stream wrappers only implement stat. Fixes #2304.

I'm not sure how to do unit tests for this, since the file permissions do not seem to be guaranteed on the test server, and definitely not when using repo authoritative mode. I also don't see tests for is_writable and friends, so I've not implemented any here.
Closes #2305

Reviewed By: @fredemmott

Differential Revision: D1258349

Pulled By: @alexmalyshev
Add a few more jump simplification tests

Firm up the jump simplification testing in case someone ever feels like
improving it. Most of the codepaths in simplify{Query,Cond}Jmp are
tested, except for the wide variety of stuff inside simplifyCmp.

I also switched the order of arguments to the EXPECT macros in some
places -- the expected value should come first. I got this wrong
originally.

Reviewed By: @edwinsmith

Differential Revision: D1259323
Split out tar code from PharData, add read-only Zip support

Composer test improvement. Next step: write support.

Reviewed By: @ptarjan

Differential Revision: D1249892
Add support for creating zips with PharData

Makes Composer slightly happier

Reviewed By: @ptarjan

Differential Revision: D1250345
Convert ext/standard/class_object to HNI

Also moves get_called_class() out of function and into this, as that's
how the PHP docs groups it.

Part of #1480

Closes #1625

Reviewed By: @fredemmott

Differential Revision: D1248722

Pulled By: @ptarjan
Corrected the implementation of ReflectionMethod::getClosure

The implementation of ReflectionMethod::getClosure was incorrect as well as missing an argument.

Fixes #1353

Reviewed By: @fredemmott

Differential Revision: D1258207
Support calling functions with double args in the JIT

Per amd64 ABI, shove stuff into xmm registers now too

This doesn't add support for double return values (yet), that's
coming in a followup.

Reviewed By: @edwinsmith

Differential Revision: D1257666
Fix drupal test runner

could not find tests, breaking all test runs

Reviewed By: @JoelMarcey

Differential Revision: D1260516
Simplify VarEnv handling in async functions and continuations

When async function or continuation is initially suspended, move
attached ExtraArgs or VarEnv inside. Remove special-casing of
func_get_args() inside generators, as ExtraArgs is now fully functional.

Also, remove "skipThis" non-sense. The same Func object cannot have and
not-have the same local var name at the same time unless it is
a Schrödinger's func.

Reviewed By: @jdelong

Differential Revision: D1250858
HHMeasure: HHMeasure for Open Source

Moved hhmeasure sources into fbcode/hphp/tools from www so we can release it as open source

Reviewed By: @mikemag

Differential Revision: D1177760
Start jsonizing the framework test runner

This is the first of a few diffs that will begin to move to parsing a json format for test output instead of relying on a bunch of fragile regex to get our output.

First up: Have the test command create the temporary json files that will be needed when we squash together the results into one big file.

Reviewed By: @fredemmott

Differential Revision: D1259518