Cleanup selectTraceletLegacy

It was taking a full RegionContext when it only needs the spOffset.

Reviewed By: aravind

Differential Revision: D1032271
Don't increment result of StLoc unless it is pushed

StLoc was producing an incref on its result even if the result
was not pushed on stack (consumed).

Reviewed By: @ottoni

Differential Revision: D1032861
Fix Shuffle bugs with unused dests and constants copied to DefLabel

Shuffle didn't handle two corner cases correctly:
1. unused destinations.  These could/should be eliminated upstream
but there's nothing incorrect about them, we can just ignore those
copies.
2. a DefConst feeding into a DefLabel needing 2 registers; We already
handled DefConst, but not when the destination doesn't have a known
type.  e.g. merge(1,"foobar") => {Int|StaticStr}, which needs 2
registers.

Reviewed By: @dariorussi

Differential Revision: D1032504
Extended Linear Scan Register Allocator

Based on Christian Wimmer's 2010 paper.

Reviewed By: @jdelong

Differential Revision: D997084
Refactor some more countable code

This is intended to be code cleanup, with no real change in
functionality, but should make the sign-bit-as-static-indicator
diff much smaller, and easier to reason about.

Reviewed By: @andralex

Differential Revision: D1030409
Be less aggressive in dropping types on OverrideLoc

The assert in the minstr translator was failing in
test/quick/poly-torture.php. The setup is: there's a CGetM whose base is
boxed, and before the CGetM there's an InterpOne that causes us to drop
all knowledge of refs' inner types in the frame. (This happens in x64
mode too if I force IncDecL to be interped.)

We can actually drop the inner types to InitCell instead of just Cell --
you can't have a reference to uninit. Then we can slightly weaken the
assert in the minstr translator, and it will pass. Weakening the assert
is justifiable; the codegen for LdRef knows that it shouldn't bother
emitting a typecheck if the box's inner type is InitCell.

Reviewed By: @swtaarrs

Differential Revision: D1033158
Add refcount validation pass

This adds a refcount validation pass. The pass creates an
approximation of a map from SSATmps to refcount-deltas for
each exit block. The validation consists of verifying that the
deltas are same before and after refcount optimizations.
This is run only in debug mode or under the runtime
flag Eval.HHIRValidateRefcount.

Reviewed By: @ottoni

Differential Revision: D1022219
Remove old cache code from hphp

Remove the old code (with a few lingering stubs to be cleaned up in a future change)

continuous build seems to be expecting bad strings in unrelated code

Reviewed By: bmaurer

Differential Revision: D1030191
Fix handling of non-int/array flags to filter_var

HHVM treats all non-int flags as arrays, but Zend treats all
non-array flags as ints, so HHVM handles e.g. string flags
incorrectly. Reverse the logic to match Zend.

Closes #1226

Reviewed By: @alexmalyshev

Differential Revision: D1034218

Pulled By: @scannell
Support systems without BFD_DECOMPRESS flag

Support systems without BFD_DECOMPRESS flag

Closes #1102
Closes #1225

Reviewed By: @markw65

Differential Revision: D1034235

Pulled By: @scannell
Translate FPushCuf in more contexts; add fast paths

Adds fast paths in native helper functions for some common
cases for FPushCuf; bails to the full vm_decode_function logic if
things are less than simple.

I also tried a fast path for strings with class names ("Foo::bar"),
which made those calls about 2x faster in micro-benchmarks, at the
expense of making "self::foo" about 3x slower.  It was in the noise on
perflab, and also required differences in autoload order, so I'm
leaving that one out for now.

Reviewed By: @bertmaher

Differential Revision: D1032035
Fix build break on aarch64

On aarch64, don't break the default build.

Reviewed By: @oyamauchi

Differential Revision: D1034887
Fix bug: "unbox()", not "innerType()"

I failed to appreciate the difference between the two (unbox works on
types that aren't necessarily boxed) in my last diff.

Reviewed By: @edwinsmith

Differential Revision: D1035871
Fix doc typos

Fix doc typos

Closes #1231

Reviewed By: @JoelMarcey

Differential Revision: D1035977

Pulled By: @scannell
Make collection mask bits a little clearer

Easier to see how many bits are left in o_attributes.

Reviewed By: @edwinsmith

Differential Revision: D1035048
Remove two unused hashtables from ExecutionContext

Reviewed By: @dariorussi

Differential Revision: D1035098
Let the HHVM debugger client/server listen on IPv6

We manually initialize the IPV6 sockaddr_in6 structure
as gethostbyname_r has problems with numeric IPv6 adresses
(http://sourceware.org/bugzilla/show_bug.cgi?id=5479). In the particular
case it fails with permission denied, while it works with the equivalent
ipv4 address.

Reviewed By: @mikemag

Differential Revision: D1030284
Patch unserialize so that it handles namespaced collections

We want to be able to unserialize both Vector and HH\Vector.

Patch unserialize to that effect.

Reviewed By: @elgenie

Differential Revision: D1031058
Translate FPushClsMethod

This adds new IR opcodes to lookup class methods from the TC
instead of interpreting.  LookupClsMethod basically does the same
thing as the interpreter; LookupClsMethodStatic is optimized for the
case where the call is in a static function.

Additionally, when the class input comes from a LdCtx we can get the
method slot at jit time and burn that into the TC.  This case is
pretty common since "LateBoundCls; FPushClsMethod" is a common
pattern.

Reviewed By: @jdelong

Differential Revision: D1035577
depthOne already checks that the depth is one

thats it

Reviewed By: @edwinsmith

Differential Revision: D1035861