Convert server to HNI

Summary: fixes #3948

Reviewed By: @ptarjan

Differential Revision: D1615453
Convert LDAP to HNI

Summary: fixes #3931

Reviewed By: @ptarjan

Differential Revision: D1615345
Eliminate Vmeta

Summary: It was useful during transition to vasm, when we needed to
track program points across multiple Vunits. No longer useful.

Reviewed By: @swtaarrs

Differential Revision: D1631688
Don't pass userdata to callback in array_walk unless it was specified

Summary: Fixes #3022

Reviewed By: @ptarjan

Differential Revision: D1634275
Move CodeGenerator::m_unit and m_frozen to CodegenState

Reviewed By: @jdelong

Differential Revision: D1631629
Standardize on lea for address computations (including sp adjustments)

Summary: It's the same size in every situation we use it in, it doesn't modify
eflags, and Intel explicitly recommends using it for values that will be used
as pointers in loads or stores later on down the line.

Reviewed By: @edwinsmith

Differential Revision: D1631697
Tweak to enable more refcount optimizations

Summary: When a value is known to exist in many places, observeValue() will not
insert any IncRef before a DecRef. That's bad because it ends up
preventing some IncRef/DecRef pairs from being eliminated because the
IncRef is pushed down past the DecRef.  This diff makes sure that we
always drop an IncRef before a DecRef, which then enables more
IncRef/DecRef pairs to be eliminated.

Reviewed By: @swtaarrs

Differential Revision: D1631498
Add native data serialization support

Summary: If a native data class contains the following function, it is considered serializable.

Variant sleep()
void wakeup(const Variant& content)

All serialized native content will be stored along with other user-defined serializable properties.
Native content is stored using a reserved key "[underscore][underscore]native".
The key value pair [underscore][underscore]native will not appear in the serialized map if sleep() returns null.

Reviewed By: @elgenie

Differential Revision: D1582161
Add a thread filter to the ring buffer

Summary: Typically you just want to know what was happening recently on
the thread that crashed, so add a thread parameter. 0 means all threads.

Reviewed By: @swtaarrs

Differential Revision: D1634720
emitFuncGuard should use prepareForSmash

Summary: We don't want to recreate the alignment logic
in lots of places, and we need to tag the guard so that
future relocations know its alignment requirements

Reviewed By: @swtaarrs

Differential Revision: D1634806
Add ReflectionClass::getAttribute to HHI

Summary: Already there for functions and parameters, was missing for classes. Fixes facebook/hhvm#4049

Reviewed By: @jano

Differential Revision: D1634952
Micro-optimize InitPackedArrayLoop

Summary: Its okay to use SIMD registers to move values from the stack to
the array, because PackedArray doesn't use TypedValueAux's m_aux
field. Use the flags from subqi instead of cmp(0,j).

Once those changes were done I noticed an xchg crept into the
code (due to lack of phi-hinting), so fiddled the initialization
order to suppress the xchg.

Reviewed By: @mhahnenberg

Differential Revision: D1632139
LZ4_uncompress is obsolete, breaks build with out-of-tree LZ4.

Summary: LZ4_uncompress() has been replaced 1:1 with LZ4_decompress_fast().  When
you use an out-of-tree liblz4 r122 or beyond, LZ4_uncompress doesn't exist
anymore.  From bottom of lz4.h:

 [...]
 /*
 Obsolete decompression functions
 These function names are deprecated and should no longer be used.
 They are only provided here for compatibility with older user programs.
 - LZ4_uncompress is the same as LZ4_decompress_fast
 - LZ4_uncompress_unknownOutputSize is the same as LZ4_decompress_safe
 */
 int LZ4_uncompress (const char* source, char* dest, int outputSize);
 [...]

LZ4_decompress_fast() is already present in third-party's copy, so even if this
is not breaking a build with an internal lz4, it is for Debian and any other that
may have the library outside of the HHVM tree detected by CMake.

Closes: https://github.com/facebook/hhvm/issues/3610

Reviewed By: @ptarjan

Differential Revision: D1628566