Better errors on runtime generics.

Summary: Closes https://github.com/facebook/hhvm/issues/3711

Reviewed By: @jwatzman

Differential Revision: D1565849
SSA for ExtendsClass and LdFuncCachedU, enable asserts in vasm-check.cpp

Summary: This is the last of the conversions; vasm is required to be SSA now.

Reviewed By: @alexmalyshev

Differential Revision: D1502355
Require SSA in vasm-fold-imms

Summary: Remove the workaround

Reviewed By: @alexmalyshev

Differential Revision: D1571744
Bumping `ProxyManager` version to a version that correctly handles HHVM's `Closure::bind()` support

Summary: Closes https://github.com/facebook/hhvm/pull/3824

Reviewed By: @fredemmott

Differential Revision: D1571955
Remove keyType assert in getKeyType()

Summary: We've talked about removing this assert in the past and I think it's
finally time for it to go. It's caught some real bugs but we're in a much
better place wrt weird types now. In the case of the new test I added, keyType
was {Int|Dbl} on ARM, since the AddO was getting interpOned.

Reviewed By: @edwinsmith

Differential Revision: D1570728
Make numStackArgs() assert in ARM codegen more verbose

Summary: This is triggering intermittently in some framework test runs and we
have no idea why. This will help debug.

Reviewed By: @ptarjan

Differential Revision: D1570865
hh_ide.js - Reduce memory usage

Summary: We're starting to bleed here again on Chrome webworker memory usage.

This will bring us down a bunch.

Idea is: If we're adding a file in the background that's only a dependency, we don't keep the it in the parser heap, or the file contents hashtable.

We don't call any other functions on that file unless it gets hh_add_file'd later.

In another diff, I'm going to remove the file contents hashtable all together.

Reviewed By: @pikatchu

Differential Revision: D1567415
TRACE_PUNT when refcount optimizer can't handle a region

Summary: In this case, the JIT was retrying the translation without bytecode
control flow, but that doesn't work in general because the region may
not be a trace.

Reviewed By: @alexmalyshev

Differential Revision: D1571163
Get rid of ClassInfoVM and MethodInfoVM

Summary: These are hangovers from when most runtime functions were implemented
in terms of them.

Reviewed By: @jdelong

Differential Revision: D1570176
Fix lto build

Summary: Even though we forced a fake call to const_load, and marked it
EXTERNALLY_VISIBLE, the lto build still optimized the call away
and then gold's --gc-sections option caused it to be removed.

I tried NEVER_INLINE, and it didn't help; apparently g++ notices that
its a no-op, and doesn't bother calling it (which I suppose is not the same
as inlining it).

This just forces a reference to its address, which makes it stick around.

Reviewed By: @edwinsmith

Differential Revision: D1571856
ArrayObject::exchangeArray should always return an array

Summary: It would return the object, if an object was used. PHP however returns an array nevertheless.
Closes https://github.com/facebook/hhvm/pull/3819

Reviewed By: @ptarjan

Differential Revision: D1570374
make trailing commas optional in format_hack

Summary: now all the tests pass and generate php that parses correctly
Depends on D1567229

Reviewed By: @paroski, @pikatchu, @elgenie

Differential Revision: D1568966
Make Either<> use a configurable tag bit---APC can't use the low order bit

Summary: Some file-backed deserialization is broken in trunk because we're
trying to steal the low bit to tell if something is file-backed.  But the data
is only byte aligned.  Use the high bit instead.

Reviewed By: @swtaarrs, @mclarkelauer

Differential Revision: D1573026
Cleanup thisReturn()

Summary: GuardLoc and friends don't define a new FP anymore.

Reviewed By: @alexmalyshev

Differential Revision: D1572128
FrameState::startBlock should take a LocalStateHook

Summary: It'll null out local values if it enters a loop header, so we want to
pass in a LocalStateHook so that it can clear its locals too.

Fix refcount-opts so that it correctly consumes all locals when
startBlock nulls them out.

Reviewed By: @swtaarrs

Differential Revision: D1550496