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
Make ob_start function signature PHP 5.6 compatible

Summary: The `erase` parameter was removed in PHP 5.4. There is now a `flags` parameter.
We didn't use `erase` and we don't use `flags` yet either (that is for another issue).
But we are call compatible now.

Fixes #3694

Reviewed By: @paulbiss

Differential Revision: D1677599

Signature: t1:1677599:1415836259:d232548c902e1fdb8a0a3e0cb59d96e7e961253b
Add fixed-point analysis to FrameState

Summary: Adds FrameState::computeFixedPoint, which takes a BlocksWithIds& and
produces a fixed-point analysis. IRBuilder::reoptimize is now making use
of it.

Reviewed By: @jdelong

Differential Revision: D1629737
Output clowntown-notests when all the tests we requested were skipped

Summary: "Running" only skipped tests is as bad as not running any tests.

Closes #4280

Reviewed By: @paulbiss

Differential Revision: D1688529

Signature: t1:1688529:1416343178:9b84ea619da31001c878e549c584bf2c9bdcf5ff
parity: match php 5.6 in treatment of array_fill with num = 0

Summary: ... also update the warning text to match

Reviewed By: @paulbiss

Differential Revision: D1687282

Signature: t1:1687282:1416288526:250a0430a81bf906d5ea8699b492553c431a551d
Fix make-parser.sh

Summary: third-party is no more. use third-party2 instead, and
be more robust about finding the latest build.

Reviewed By: @edwinsmith

Differential Revision: D1690734

Signature: t1:1690734:1416409624:24b161fa3d737e3fa659b8beca7b80a170a043fc
Revert "Add fixed-point analysis to FrameState"

Summary: This reverts commit cac907bc7eae1636dad6ad2c596c1577a410d4fd.

Reviewed By: @markw65

Differential Revision: D1690790

Signature: t1:1690790:1416412566:e0a56bbf66c2e38ed3d51c50cfe934cf2b14c86f
Don't throw an exception on unknown IP address for OSS

Summary: We've been getting by fine without one till now...

Also fix a logic inversion in GetPrimaryIP()

Closes #4261

Reviewed By: @JoelMarcey

Differential Revision: D1688666

Signature: t1:1688666:1416344847:cae9516c8f78ea8f1e716e920e1ddccdbd9adc2b
Trie Search - optimizations for JS

Summary: Add the key optimization for '.', since the dot character will be used in the javascript index like :: was for PHP.

Also: made the keys for the trie always lowercase, since search is case insensitive.

Reviewed By: @jwatzman

Differential Revision: D1685443

Signature: t1:1685443:1416267556:37d2c30e37b2caafe42242a491869201ea85fc96
Remove genv dependency from dfind

Summary: It was never being used.

Motivation is I want to reuse the dfind code without all the dependencies that adds.

Reviewed By: @jwatzman, @int3

Differential Revision: D1685387

Signature: t1:1685387:1416262437:4741b0be29cc17d8a13d2c3089ddb89d9998161c
No more perpetual clown in test runner

Summary: The previous call to `Status::getResults()` was returning an empty array (scoping,
I think). So just pass in the `$results` array directly from the callsite like we
do with `print_failure`.

Reviewed By: @edwinsmith

Differential Revision: D1690858

Signature: t1:1690858:1416415518:f7da929467c72283280f60c7a5c8ed4e4db07a90