Get rid of global register variable in function-entry-helpers

This rewrites some helpers to avoid using the global
rbx register. This is needed for lto support (or at least, we
would have to compile function-entry-helpers.cpp with lto
off). Its also needed if we want to compile with clang, and it
will help with the arm port.

This adds a few new arm failures, but also fixes some existing bugs.

Reviewed By: @jdelong

Differential Revision: D1045712
Clean up types of Block::back and Block::front

They returned IRInstruction*, while dereferencing a Block::iterator
gives IRInstruction&. This diff changes it to be consistent with every other
container. I also changed it so you can't get an IRInstruction& from a const
Block*. Luckily no code appeared to be depending on that.

Reviewed By: @jdelong

Differential Revision: D1049640
FPushCuf: Optimize the case where callable is an (obj, staticstr)

The pattern call_user_func(array($obj, "staticString"), ...)
is pretty common, and it's basically the same as FPushObjMethodD
except it warns instead of fataling when the method is not defined.
Catch this pattern and turn it into a similar IR sequence, and add a
template flag to methodCacheSlowPath to warn instead of fataling.

Reviewed By: @swtaarrs

Differential Revision: D1042143
Move o_properties out of ObjectData to side table

Pessimize dynamic properties in favor of smaller objects.
This goes with removing the vtable for ObjectData.

Reviewed By: @swtaarrs

Differential Revision: D1046746
Remove object data vtable

This is feasable now, after all the steps taken toward it
earlier.

Some subclasses still use vtables, so now we now have to take care to
do correct casts between ObjectData* and c_Foo*'s.  (HNI should
eventually let us change the c_Foos so they don't derive from
ObjectData at all.)  This diff changes things so that we have a custom
instance delete function (this replaces the late-bound ~ObjectData), a
bit in the object attributes that indicates whether it's got a native
subclass, and some additional metadata in PreClass telling us the
offset of the ObjectData subobject.  A variety of extension
destructors were also moved to headers so they could be inlined in the
appropriate delete_Foo functions (their only caller).

Reviewed By: @jano

Differential Revision: D1046763
Remove generic dtor helper stub

It appears this doesn't help us in HHIR.

Reviewed By: @ottoni

Differential Revision: D1047133
Fix reserialize() to properly handle the 'V' and 'K' serialization types

We hit an APC-related bug where reserialize() was being called on a
serialized collection during HHVM startup (when reading APC prime values
from a file), and this caused HHVM to fall over.

This diff fixes reserialize() and adds some test cases and comments.

Reviewed By: @markw65

Differential Revision: D1050281
Translate InstanceOf

Mostly can use opcodes we've made for InstanceOfD, with a few
other additions.

Reviewed By: @markw65

Differential Revision: D1050261
Remove CSE flag from LdClsCachedSafe

If this instruction returns null, it's not safe to CSE it if
something in between may have defined the class.

Reviewed By: @markw65

Differential Revision: D1050386
Accept paths without leading /, too

Paths without a leading / were being rejected by MakePathList.
This changes the code to match the original FileCache::writeDirectories
logic.  It also drops the "return the filename, too" scheme since the only
call site just throws it out anyway.

Reviewed By: @paroski

Differential Revision: D1050552
admin endpoint to change the log level

This is super useful for debugging ProxygenServer

Reviewed By: @jdelong

Differential Revision: D1049645
Fix LibEventServer takeover

I refactored the logic here and missed a case that sets m_accept_socket back to -1 for a server that takes over.  This doesn't affect it's operation, but makes it unable to yield its fd to the next server (eg: 2nd gen takeover was busted)

Reviewed By: @paroski

Differential Revision: D1050529
Disable FastCGI on aarch64

Summary: FastCGI doesn't currently build on aarch64 due to lack of Thrift support, disable it.

Reviewed By: @ptarjan
CMake fix for GCC 4.7.x

Summary: Fix GCC 4.7.x build on some platforms for the following error:
error: ‘sleep_for’ is not a member of ‘std::this_thread’

Closes #1264
make (array) of ArrayObject return the contents

I originally tried to use `o_get` but that isn't const, so I added a const version.

A side effect is `var_dump` of an ArrayObject now shows the inner array. Are we cool with that? I like it.

I also tried to move this class down to C++ but that is too much work for this.  @sgolemon is there an easy way to have the class in C++ but most of the impl in PHP?

Reviewed By: @jdelong

Differential Revision: D1041009
Streamline findForNewInsert and copy/grow loops.

Remove the inline restrictions from findForNewInsert(), and
pass in table & mask so the loads from m_tableMask and m_hash
can be hoisted out of the hashtable init loops in Grow & Copy.
Also, replace memcpy/memset with loops that operate on words
at a time. (no alignment checks, even #s of words).

Reviewed By: @jdelong

Differential Revision: D1047021
Fix build--redefinition of s_storage

Reviewed By: @edwinsmith

Differential Revision: D1050880
Fix performance of array operator+= when lhs has refcount of 1

The change to make this unconditionally allocate a new array
changes big-O behavior of user code in some situations.  Thanks to
lesha and andrewparoski for catching this.  An equivalent case for
array_merge shouldn't be possible because an inc ref always happens to
pass it to the builtin.

Reviewed By: @paroski

Differential Revision: D1046251
APC shouldn't show as loaded when disabled

This modifies get_loaded_extensions() to not show the APC
extension when Server::APC::EnableApc is false.

Closes #1103
Closes #1262

Reviewed By: @JoelMarcey

Differential Revision: D1050685

Pulled By: @scannell
Add string_data_eq_same function object

Similar to string_data_same, except uses exact equality first.

Reviewed By: @scannell

Differential Revision: D1048085