Remove the Essential flag in favor of a switch statement

Summary: The Essential flag and IRInstruction::isEssential are DCE-specific
pieces of information, so this diff moves that information where it belongs.

Reviewed By: @jdelong

Differential Revision: D1752612
Move SideExitJcc conversion optimizations to vasm

Summary: This enables us to get rid of a bunch of SideExitJmp* IR
instructions, and moves us closer to being able to run jump opts
whenever we want.

Reviewed By: @edwinsmith, @jdelong

Differential Revision: D1741308
Remove align-16 attribute from ObjectData

Summary: Less coupling between the allocator and ObjectData. This constraint was
added so the jit could use movdqa to load and store TypedValues into
XMM registers, however we switched to movdqu a while ago. We don't have
evidence that using movdqu on an aligned address is any slower than
movdqa.

Reviewed By: @jdelong

Differential Revision: D1756285

Signature: t1:1756285:1419366514:035de81134fcd8cd10468b8f2dd9cafcd3eb1545
Implement Phar::running()

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

Reviewed By: @mxw

Differential Revision: D1709234

Signature: t1:1709234:1419550599:446e79b4a8e94a2390f4a7fe05b668eb4e442349

Pulled By: @sgolemon
RequestInitDocument 404 friendly reminder

Summary: 404  don't friendly reminder when RequestInitDocument   file don't exsists,we can't quickly positioning problem,so modify this function friendly reminder.
Closes https://github.com/facebook/hhvm/pull/4494

Reviewed By: @sgolemon

Differential Revision: D1753403

Signature: t1:1753403:1419556980:e34cd738458fe8ae92773e468cf1b48bb636382d
look in /usr/lib64 in FindGLIB.cmake

Summary: glib won't be found on fedora/centos without it.
Closes https://github.com/facebook/hhvm/pull/4522

Reviewed By: @sgolemon

Differential Revision: D1757717

Signature: t1:1757717:1419556976:9f53a117ef8d625abd48f3358fbff25dd9f78ca8
Implement Memcached::quit

Summary: Closes #4455
Closes https://github.com/facebook/hhvm/pull/4473

Reviewed By: @sgolemon

Differential Revision: D1743479

Signature: t1:1743479:1419557100:f12b5a03590b672bdccf4f19196bd4ca24eca321
Fixes issue with gdb segfaulting when reading debug symbols

Summary: Changing the gcc debug optimization level to -gO (enables some optimizations
that do not interfere with debugging). gdb no longer segfaults.
Closes https://github.com/facebook/hhvm/pull/4450

Reviewed By: @sgolemon

Differential Revision: D1742603

Signature: t1:1742603:1419577719:b486deec56efeb9650a71dd55a2b82a95c1aa25f
typechecker: include more UserAttribute functions in reflection hhi

Summary: - added getAttributes, getAttributeRecursive, getAttributesRecursive to ReflectionClass
 - added getAttributes to ReflectionFunctionAbstract
 - added getAttributeRecursive, getAttributesRecursive to ReflectionMethod
 - included a few more return types for ReflectionFunctionAbstract

Reviewed By: @int3

Differential Revision: D1754642

Signature: t1:1754642:1419292410:9ae87bb7950305a4404be3a13068f0bd6b2cdcdc
Have dfind use the same set / maps as the rest of the code

Summary: This avoids having to convert a DfindEnv.SSet into a
Utils.SSet by copying its members.

Reviewed By: @elgenie

Differential Revision: D1754873

Signature: t1:1754873:1419639676:148ca8db979eebfae35475237253167636e6946c
Don't have an optional param that's an option type

Summary: OCaml implements optional parameters as option types, so the
additional layer of option-ing is unnecessary.

Reviewed By: @elgenie

Differential Revision: D1758445

Signature: t1:1758445:1419723236:52b99d34e318be0b127b280cb82d01f934c30f4c
Improve fatal exception handling

Summary: Currently, when the server fails to generate a response, it
doesn't close the socket, leaving the client waiting indefinitely on the
open socket. This creates a poor user experience; some people wait for
many minutes (or retry the same command multiple times) before they give
up.

This diff ensures that we close the socket, as well as providing a
helpful suggestion (`hh_restart`).

Reviewed By: @elgenie

Differential Revision: D1758513

Signature: t1:1758513:1419719643:67136011c1621cddc36a39736ca3fd72f313ca0b
Remove the 16-byte alignment requirement from ResourceData

Summary: This was leftover from when Resources were represented using
ObjectData.

Reviewed By: @jdelong

Differential Revision: D1757694

Signature: t1:1757694:1419726294:f7fcff846673213ff11749024d2d25e619956bd9
Parameterize rds in helper functions.

Summary: plumb the rds base register down into helpers, instead of assuming
it's always rVmTl. This centralizes the decision of how to access RDS.

Reviewed By: @jdelong

Differential Revision: D1758651
Fix realpath lookup

Summary: Actually use the realpath to load the file

Reviewed By: @jdelong

Differential Revision: D1758587

Signature: t1:1758587:1419725692:4a5b40338b3f78fea038055149ee0d943f3b4707
Add Vconst class so Vunit can hold several kinds constants.

Summary: Supports the existing i8 and i64 constants, adds a ThreadLocal
constant type, and fixes a bug in vasm-xls where byte constants
were wrongly cast to bool. (we only used bools for now, so it
wasn't breaking anything yet).

Reviewed By: @jdelong

Differential Revision: D1758662
vasm Branch fusion

Summary: Simplifications at the vasm level:
  jcc{E,  testb{setcc{cc, flags}}} => jcc{!cc, flags}
  jcc{NE, testb{setcc{cc, flags}}} => jcc{cc,  flags}

Removed HHIR fused-branch instructions.

Reviewed By: @jdelong

Differential Revision: D1758029
Use vasm to fold indexed loads when index is a const.

Summary: Convert load{base[index+disp],d} => load{base[disp],d} if index is
a known const and index+disp doesn't overflow int32.

Reviewed By: @jdelong

Differential Revision: D1758779

Signature: t1:1758779:1419810411:c847b609f59071ea66a0dad978ff02adcd4da7fd
fix builds against sqlite 3.8.x

Summary: This seems to fix the build against SQLite 3.8.x versions
when using a Debug build.

This is just a proof of concept, since I don't
really know what I'm doing with SQLite or HHVM's code.

Is there any value in using RepoTxnQuery for PRAGMAs though?

It seems that SQLite doesn't like reading the value of journal_mode
in RepoTxnQuery, immediately after setting it.

The documentation for journal_mode only says:

"Note also that the journal_mode cannot be changed while a transaction is active."
http://www.sqlite.org/pragma.html#pragma_journal_mode
Closes https://github.com/facebook/hhvm/pull/4507

Reviewed By: @sgolemon

Differential Revision: D1757718

Signature: t1:1757718:1419833319:e19a0ffb9af315fa5d7eb69a40b56febc79e35e3
move HHVM version constant test to quick tests

Summary: This should stop issues like https://github.com/facebook/hhvm/issues/4521
from happening again.

This was suggested by@jwatzman in the same bug report.
It should also be applied to the 3.4 branch too.
Closes https://github.com/facebook/hhvm/pull/4530

Reviewed By: @JoelMarcey

Differential Revision: D1758492

Signature: t1:1758492:1419834081:8a545c709f117da8d468e15702cd39159909d1a9

Pulled By: @sgolemon