Make stats.json on the admin server return valid json

Summary: Can't have two object members with the same key.
fixes facebook/hhvm#3331

I assume this isn't a serious backwards-compatibility break, given every JSON implementation I tried can't read the existing data.

Reviewed By: @bertmaher

Differential Revision: D1685785

Signature: t1:1685785:1416286600:1e264b2917e94df9565aa0ed8f9b8fad31dc67f1
Fix parent::__cOnStRuCt and similar with PHP4 constructors

Summary: Fixes facebook/hhvm#4260

Equivalent bug in PHP5: https://bugs.php.net/bug.php?id=40784 (fixed in 2007)

Reviewed By: @paulbiss

Differential Revision: D1685113

Signature: t1:1685113:1416253624:c07844c8ab21fb0d0dda4b683f9d9b1a72d908f4
Improve segaddr fixing for 32-bit destructors

Summary: CMake actually mangles this line in ways we don't want it to.
Use the commas to mangle it in ways we DO want it to.

Reviewed By: @paulbiss

Differential Revision: D1686486

Signature: t1:1686486:1416274212:df33c36917486ed85f46d805b0c5b48956edf314
Update generate-buildinfo.sh for mercurial

Summary: This uses the manifest to generate a hash based on
the file contents + the output of "hg diff -- hphp".

This isn't quite right, because committing any changes will
change the hash, even though the file contents haven't changed,
but is better than using the time of day.

Also got rid of unwanted output from hhvm-land.

Reviewed By: @jasone

Differential Revision: D1687893
add additional iterator interfaces

Summary: This adds additional interfaces according to the PHP manual. It also fixes the ArrayIterator to use the new SeekableIterator interface

Reviewed By: @elgenie

Differential Revision: D1675544

Signature: t1:1675544:1415777887:5e30ee1f5ea989f26da4737aff3e0a0c7f88aeb8
Type strlen's return value.

Reviewed By: @jwatzman

Differential Revision: D1684676

Signature: t1:1684676:1416267418:92a95a89da8d767474ec3c3f63569f227204cb51
Add makeConst() template for other integral types

Summary: MacOSX doesn't know how to cast unsigned long to uint64_t :(

Be patient with it and add a template to hanbdle arbitrary integral types.

Reviewed By: @paulbiss

Differential Revision: D1686511

Signature: t1:1686511:1416344857:878d82abf31d83eec2692edddc9d379fa05d4e04
Don't add DebugHeaders in smart_malloc

Summary: They are added by the underlying allocator api. Using two DebugHeaders
is not the end of the world but it makes things confusing and harder
to refactor in the short term.

Reviewed By: @jdelong

Differential Revision: D1688065

Signature: t1:1688065:1416336505:ff5c1856c594554bca3ed9ea4b93a2da11257f6a
Implement remaining straightforward vasm ops in llvm backend

Summary: This is a followup to D1683817. We now emit llvm code for all the
straightforward vasm instructions, where "straightforward" is defined as not
relating to service requests, weird stub calling conventions, floating point
comparisons, and maybe a few others I'm forgetting. I also fixed a few other
issues that were blocking llvm codegen for a large number of tests. Things
worth pointing out:

- code-gen-x64 no longer directly emits shlq and sarq. Like idiv, these
  instructions have a hardcoded operand (%cl).
- Don't use CC_NS for a refcount comparison where CC_GE will do the same
  thing.
- Put the syncpoint for NativeCall in its vcall rather than emitting a
  syncpoint instruction directly.

Reviewed By: @jasone

Differential Revision: D1686955

Signature: t1:1686955:1416330185:9940240dcd4a24b066c2dfa8f37de570663630b3
Fix issues with private properties and apc

Summary: APCObject was storing non-unique Class*'s with private
properties, which meant that if the file containing the class was
changed in any way, there would be a new Class*, and we wouldn't
be able to fetch the object from apc.

Reviewed By: @alexmalyshev, @jdelong

Differential Revision: D1688805