fix XMLWriter::startDocument with null encoding

Fixes facebook/hhvm#1961

Reviewed By: @ptarjan

Differential Revision: D1263235
Implement CURLFile

fixes facebook/hhvm#1859
refs guzzle/guzzle#538

Reviewed By: @ptarjan

Differential Revision: D1264554
Don't crash on unhandled exceptions

Most php exceptions were already trapped and dealt with. If
a header callback has been installed, and nothing gets flushed while the
php code is running, we can end up calling it after the request has
finished, and (if it threw an exception, or fatalled) we would then
fail to call hphp_exit_context.

Trap all exceptions, add some logging, and always call hphp_exit_context.

Reviewed By: @jdelong

Differential Revision: D1264609
Use bool instead of auto for constexpr

Reviewed By: @ptarjan

Differential Revision: D1265274
Happy New Year (in april)
fix bad make-parser.sh merge
add trailing comma,
fix bad merge (from 2.5 years ago?)
remove the extra C that snuck in

accidentally added in d15d5e045bd2004b503a3bc975287082ac1a1500
include missed test
put correct licence headers back
remove +x on README.md
fix util/safesort.h licence
remove files missed in a previous rename diff
fix zend test updater

I renamed the directory so that needed fixing.

This script now prompts you to use the zend output or not. There are 0
files that it prompts you on.

Running it with php-5.4 gives: P2102186

Reviewed By: @markw65

Differential Revision: D780038
Allocate SIMD regs for doubles on ARM

Turns out vixl already had gpr<->simd and simd<->mem instructions for
the uses cases we need. This was just a matter of making the SIMD
registers available to the register allocator and handling them in a few
places in codegen.

We're not allocating SIMD registers to hold Cells yet. vixl has no
support at all for 128-bit-wide SIMD registers, so I'll have to
implement that separately. This diff also doesn't add support for
passing doubles to builtins on ARM; that'll come next.

I also got rid of some now-useless isConst handling from ARM codegen.

Reviewed By: @edwinsmith

Differential Revision: D1262941
Make translateRegion follow the arcs specified in the region

With bytecode control flow enabled, translateRegion was considering
all the arcs in the entire subgraph induced by the region blocks as
being part of the region. This diff changes translateRegion to
actually follow the arcs specified in the region.

This diff also adds support for regions containing multiple blocks
corresponding to the same SrcKey.

Reviewed By: @bertmaher

Differential Revision: D1256319
Convert Zend compatibility layer to HNI

* Convert zend compat to HNI
* Remove support for IDL-based zend compat extensions. It would have been more work to support it than to remove it, so Sara said it was OK to remove it.
* Convert existing extensions to HNI, writing their ext_*.php files, with a little bit of help from Sara Golemon's idl-to-hni.php. The files were extensively edited after they were generated.
* If MINIT is going to register function pointers for Native, then it needs to be done pre-compile. But that means that HPHP::Class pointers will generally not be available during MINIT. Lazy-load them instead.
* A few places were using ce->hphp_class just to get the class name. That's really not necessary, since ce->name has a pointer to the data of the exact same static string.
* Added FIXME note to totally broken zend_lookup_class()
* Updated documentation
* Do not register pcre_zend_compat as an actual extension, because REGISTER_LONG_CONSTANT() etc. is no longer a no-op, and causes duplicate definition warnings at runtime.
Closes #2276

Reviewed By: @sgolemon

Differential Revision: D1253812
Test runner improvements for guzzle

- run sequentially - the tests spawn a server on a fixed port which they share.
- set PHP_BINARY as they're on phpunit 3.x

Reviewed By: @JoelMarcey

Differential Revision: D1265597
Remove invalid memory usage check

This check succeeds under interp, but fails under the JIT (both under my
pseudomain diff and if wrapping it under a main function).

Reviewed By: @ptarjan

Differential Revision: D1265975