Fix gmdate timezone

Fix gmdate timezone

Closes #1139
Closes #1142

Reviewed By: @JoelMarcey

Differential Revision: D1000995

Pulled By: @scannell
Use std::atomic instead of google_base for shared counters

Gets rid of the dependency on google_base for atomic
increment.  Works around the fact that AHM values must be copy
constructible (and std::atomics aren't) by creating a wrapper class
with non-atomic copy construction to hold counters.

Reviewed By: @jdelong

Differential Revision: D1000766
Fix catch traces for mod

Each catch trace needs exactly one predecessor,
so they can't be shared.

Reviewed By: @edwinsmith

Differential Revision: D999095
Refactor smashable-jump code

Parts of the runtime other than codegen need to be able to read, write,
and smash jumps. I pulled this logic into its own module, jump-smash,
which hides platform-specific implementations behind a platform-agnostic
interface. This entailed a bunch of other Asm->CodeBlock changes too.

I can't be sure that I've found all the places where smashable jumps are
written -- we may have some places where it's just open-coded -- but we
can clean those up as we find them.

Reviewed By: @jdelong

Differential Revision: D997737
Remove bytecode invariant about fault funclet uniqueness

We used to need this because when executing an Unwind
instruction we tried to find a PC to re-raise the fault at based on
the offset of the fault funclet.  This didn't quite work (adjacent
fault regions weren't handled correctly), and was changed in D697005,
so I think we can drop this requirement now.

Reviewed By: @edwinsmith

Differential Revision: D1000915
Fix type prediction for constants in the region translator

Predicted types for constants came from analyze, and
were thrown away before we got to the region translator.
Move the predictions to the same routine that does the rest
of them.

Reviewed By: @swtaarrs

Differential Revision: D1001083
Add a FrozenVector extension class

FrozenVector is a Vector with immutable entries. Specifically, it implements the ConstVector interface.

Abstract the functionality common to both Vector and FrozenVector in a BaseVector class.

TODO:

  * enable literal syntax.
  * make FrozenVector play nicely with var_dump
  * make FrozenVector a collection.

Reviewed By: @paroski

Differential Revision: D986967
Get test/slow/ext_datetime/strtotime_leak.php working with PGO

This test was reporting a memory leak with PGO because a retranslation
was triggered between consecutive calls to memory_get_usage().  So
bump the PGO threshold for this test to avoid the problem.

Reviewed By: @bertmaher

Differential Revision: D1001851
Use the correct closure class name in the emitter

There were locals named clsName and className in this function, and
the call to setClosureClassName was using the wrong one. This could create two
classes with the same name: one in the file defining a trait with a closure and
any file with a class that uses the trait.

Reviewed By: @markw65

Differential Revision: D1002162
Increase spill area

From 32 to 64 cells.

Reviewed By: @edwinsmith

Differential Revision: D991291
Fix xmlwriter_open_uri signature

xmlwriter_open_uri should return a Variant, not an Object (it
can return bool(false) which fixes some Zend tests.)

Reviewed By: @JoelMarcey

Differential Revision: D1003258
Add missing constant PHP_MAXPATHLEN

Adds missing constant PHP_MAXPATHLEN

Closes #1143
Closes #1145

Reviewed By: @JoelMarcey

Differential Revision: D1003269

Pulled By: @scannell
Add several missing MYSQLI_ constants

All values current as of PHP 5.5.4.

I also found two other constants on php.net (MYSQLI_CLIENT_MULTI_QUERIES
& MYSQLI_NEED_DATA), but outside of that mention I can't find them...
they're not in the 5.5.4 or master source, and I can't find any
supporting documentation for them (or that they've been
deprecated/removed).

Closes #1144

Reviewed By: @JoelMarcey

Differential Revision: D1003188

Pulled By: @scannell
ARM implementations of a few more IR opcodes

I ran test/quick and found a whole bunch of failures due to repeated
codegen failure, meaning there are some IR opcodes that have to appear
even when everything is interp-one'd. This implements a few of those.

This entailed implementing a few core bits of infrastructure, including
smashable jumps, which you can read all about in jump-smash.cpp. I came
to this approach because the jump offsets that ARM allows are too small
for our purposes. The fact that this skirts around the delicate parts of
concurrent modification and execution is a side benefit.

I'm putting off the implementation of GuardRefs for this diff because
it's very complex and I want to investigate factoring out shared logic.
But I stopped it from punting in codegen just so execution would get a
bit further.

Reviewed By: @ottoni

Differential Revision: D1002619
Add a few new functions to variantcontroller api

Helpers for dealing with static strings and empty arrays.

Reviewed By: andrii

Differential Revision: D1003287
make ()-invoke and call_user_func a bit more uniform ...

A `$var` containing a string, a closure, and (by
 happenstance?) functor instance, worked when invoked directly by a
 pair of parens afterwards. This diff extends that behavior to also
 support the ##array($instance, 'method')## and ##array('Class',
 'method')## callable syntaxes.

 It would be nice if we had a facility for
 explicitly creating function pointers in the runtime.

Reviewed By: @jdelong

Differential Revision: D984939