Make Array(ArrayData*) constructor explicit

As a bonus this found lots of places where we should use the
marginally-more-efficient ArrayInit::toArray instead of
ArrayInit::create followed by an implicit conversion.

Reviewed By: @markw65

Differential Revision: D1248820
allow someone to make invariant() and func_get_args() in a namespace

Reviewed By: @elgenie

Differential Revision: D1244794
Added Mustache.php test runner

The framework is almost 100%, will be there when #1860 is implemented.
Closes #2208

Reviewed By: @fredemmott

Differential Revision: D1248703
Bump the variable that disables hhbbc

Facebook: This will enable it for the "H" release.

Reviewed By: @markw65

Differential Revision: D1248287
Make sure that NewElems never need to deal with KindOfUninit bases

There was a strange case in LvalNew that was producing
KindOfUninits inside of arrays, and the lvalBlackHole was KindOfUninit
instead of KindOfNull.  Looking around, nothing appears to be using
the fact that these are Uninit, but I noticed Uninit (and KindOfRef)
handling in IncDecBody and decided to clean it up as part of this.
Also this removes the unused Variant::lvalInvalid.

Reviewed By: @bertmaher

Differential Revision: D1235606
Fix some situations where EmptyArray allowed KindOfUninits into arrays

This was an unintentional difference from the old behavior in
these functions, and moves in the wrong direction.

Reviewed By: @jasone

Differential Revision: D1247639
Try to call __toString on objects passed to `file_put_contents`

Before it would just check to see if it was an object, raise a warning and then return false. Now it checks for a `__toString` method first, failing if it doesn't exist.

Fixes #1852
Closes #2251

Reviewed By: @fredemmott

Differential Revision: D1248715
Fixes for user filters

* Zend compatibility with property name dataLen -> datalen
* Ensures autoloader is invoked when adding filter

Resolves #2216
Closes #2217

Reviewed By: @fredemmott

Differential Revision: D1248706
Handle falsey values in stat and lstat

This is in the event of errors when constructing a file path might be propagated down. In any case, running these functions with the given test cases in Zend also returns false.
Closes #2212

Reviewed By: @fredemmott

Differential Revision: D1248705
Move most packed array code into a different module

Still uses a lot of code from HphpArray, and asPacked still
returns HphpArray*.  This is an intermeditate refactoring step for
having the layout differ from HphpArray more.

Reviewed By: @edwinsmith

Differential Revision: D1236653
Fix over-counting of HphpArray allocations in memory-profile.cpp

This code probably predated flat arrays, and wasn't updated.
Right now it's double counting the array payload for arrays larger
than HphpArray::SmallSize.

Reviewed By: @edwinsmith

Differential Revision: D1248333
ProxyArray needs to call escalateForSort on its inner arrays before sorting

zend_hash_sort is currently just calling sort directly on the
array, which means it has no chance to escalate.  It shouldn't call
escalateForSort on the proxy array itself (because we need to keep
keep the Hashtable* constant), so proxy array needs to do it on its
inner array any time you tell it to sort.

Reviewed By: @edwinsmith

Differential Revision: D1248308
Fix interpOne bugs for IncDecM

Apparently a long-standing bug.  Looks like analyze has been
getting IncDecM wrong forever.

Reviewed By: @markw65

Differential Revision: D1248464
Update README.md
Merge pull request #2292 from robocoder/patch-1

Update README.md
Revert "HHVM extension: Fix UTF-8 error recovery in json_encode."

This reverts commit b4b1dd707e83d510e21009b5ec870dd60bd31c75.

Its causing every diff to fail flib tests.

Reviewed By: @bgogul
add a test for interaction of async and finally

... to better expose issues with the behavior of the two.

Reviewed By: @jano

Differential Revision: D1246942
Tweak compare-ir to remove more irrelevant differences

I've been using this a lot to find perf regressions in the
control flow stuff.

Reviewed By: @edwinsmith

Differential Revision: D1249105
Fix a bug when decodeCufIterHelper throws

It needed a catch trace (although it can only throw
if autoload occurs, *and* it throws).

Reviewed By: @jdelong

Differential Revision: D1250436
Reshape FrameState's interface a little bit

This is in preparation for making the refcount optimizer unit-testable.
It needs to be able to construct a SinkPointAnalyzer without a real
Func.

- I made a few tweaks to FrameState's interface, mostly in deleting its
  default copy ctor and copy assignment operator, to make sure nobody
  accidentally uses them (they'll be copying a bunch of stuff that
  probably isn't meant to be copied). It also doesn't need an explicitly
  declared/defined destructor.

- The FrameState(IRUnit&) ctor was a bit counter to my aims: I want it
  to be clear when you're constructing a FrameState with and without a
  valid BCMarker. It was only used in two places, so I inlined it into
  those two places.

- SinkPointAnalyzer now takes a FrameState object explicitly, to
  (hopefully) restrict knowledge of whether we're dealing with real
  BCMarkers or not to the higher level (optimizeRefcounts).

Reviewed By: @bertmaher

Differential Revision: D1249856