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
Stop cloning timelib_tzinfos

Summary: They're readonly, and we keep a cache of them, so just
use the cached ones.

Reviewed By: @jdelong

Differential Revision: D1689771
Fix leak in tvCoerce*

Summary: We cant delete DeleteUnwinderExceptions

Reviewed By: @jdelong, @edwinsmith, @swtaarrs

Differential Revision: D1690785
Add sparse_id_set and sparse_id_map containers

Summary: The map version can replace some StateVector usage with less
construction cost (StateVector has O(N) creation), and it can replace linear
scans for things like refineLocalValues in frame-state (or a similar thing for
load-elim).  The sparse set might be useful but I don't have a specific use
case right now.  I suspect there are a lot of hphp_hash_sets or maps keyed on
SSATmps we could replace in various passes, too.

Reviewed By: @edwinsmith

Differential Revision: D1672139

Signature: t1:1672139:1416059793:91fe214d1ac1d0e31f9c9e15c59298eda4544f6e
Add a pass to assign ids to abstract locations and compute may-alias info

Summary: Change the store elimination stuff to use it, which means it can
eliminate dead stores to heap locations (at least in contrived examples).  (The
LocationAnalysis doesn't need to be recomputed every time we do store or load
elimination, so it'll probably be an argument to optimizeMemory eventually, but
not for now.)

Reviewed By: @swtaarrs

Differential Revision: D1684012