Turn off MemeLim store sinking for now (it isn't right)

Summary: This is currently willing to move stores to places where the value
that would've been in the memory location is different.  We need to limit store
motion to blocks dominated by the old store, not just dominated by the value
that was stored, or do a more general version of this.

Reviewed By: @markw65

Differential Revision: D1654195
Fribidi extension for HHVM

Summary: Kind of a noob to this stuff but this is a straight port of pecl-fribidi.  I have some concerns over how the strings are being managed...  for a PHP extension you can specify whether or not the string being returned should be copied.  Not sure how to do that for HHVM.

Reviewed By: @ptarjan, @behnam

Differential Revision: D1632647
Optimization for non-typehinted functions

Summary: For functions with args and nullable return or no typehint, we need to do a slightly slower check of the cache to guarantee we're correct. However, async functions never return null since they always return awaitable. This lets us use the faster check for memoized async functions with args and no return type hint. There aren't very many of those in prod right now but there are a bunch in the codemod.

Reviewed By: @jano

Differential Revision: D1652958

Signature: t1:1652958:1414790937:58ac19de0cc39ee0887b9d54de0bad167a45a924
Remove findSuccOffsets from translateRegion.

Summary: It's dead.

Reviewed By: @jdelong

Differential Revision: D1653846

Signature: t1:1653846:1414803027:bf2fba4cd13b3ba8ca99b2547e6573d6d0a628de
Trailing spaces and comment fixups.

Reviewed By: @elgenie

Differential Revision: D1654554

Signature: t1:1654554:1415004436:f0364eb5296cbadc823ce9b34e56ef5740ed1d95
Convert array_multisort to HNI

Summary: fixes #3993

Also removed all MixedVariableArugument flags because it's no longer used

Reviewed By: @sgolemon, @JoelMarcey

Differential Revision: D1621857

Signature: t1:1621857:1414521500:d1f977cecba55458b5e7c92f6c79a303a52f0f4c
Convert POSIX to HNI

Summary: fixes #3933

Reviewed By: @markw65

Differential Revision: D1604628

Signature: t1:1604628:1414799212:5aefd092bdc9a672b65f681b9597a7ef7b6c214b
Convert DOMDocument to HNI

Summary: fixes #3745

Reviewed By: @ptarjan, @JoelMarcey

Differential Revision: D1638235

Signature: t1:1638235:1414612822:fd550de38c1167d73edc2c0e7cfbb9cb6cbc058c
Remove the memelim store sinking code for now

Summary: It is broken, and the wrong way to do this.

Reviewed By: @alexmalyshev

Differential Revision: D1654600
Convert file to HNI

Summary: fixes #3911

Reviewed By: @markw65

Differential Revision: D1598886

Signature: t1:1598886:1414799275:43aa503a9711056138e6f570639a108281fbcbca
Fix infinite loop in hh --color.

Summary: My previous algorithm assumed an invariant that did not actually
hold. I've made that invariant hold, in addition to describing it explicitly
in a comment.

Reviewed By: @jwatzman

Differential Revision: D1654746
Fix hphpd crash when printing systemlib classes

Summary: fixes facebook/hhvm#4075

Reviewed By: @paulbiss

Differential Revision: D1642223
Convert smart_new to use smart_malloc()

Summary: We need headers on every object to make the heap parseable.

Reviewed By: @jdelong

Differential Revision: D1654899
Add ** operator to the hack typechecker

Summary: Add the exponential operator to the hack type checker

Reviewed By: @elgenie

Differential Revision: D1647793
Move freeInline decision from translateRegion to hhbc-translator

Summary: One less NormalizedInstruction use.

Reviewed By: @alexmalyshev

Differential Revision: D1651076

Signature: t1:1651076:1414994554:e4ef2e98dbaa4bbcfa05f859394815b37d0b47d4
Make sure Type::Bottom is a subtype of everything

Summary: Specialized object types were failing this; possibly other cases.

Reviewed By: @alexmalyshev

Differential Revision: D1653805
Pull out enough of D1629737 to fix an minstr bug (BlockPauser)

Summary: I've run into this while working on getting rid of inner ref types.

I used a different name so I didn't need to rename the other callsites, but it
should be easy to merge.

Reviewed By: @alexmalyshev

Differential Revision: D1653906

Signature: t1:1653906:1414805508:2f03f689a323f69c991c7b69592c3978f04e1c37
Allow various PROGRAMs to decide what updates they want to receive

Summary: Previously all updates were being filtered and split into PHP updates and JS updates. This moves the responsibility to the `PROGRAM` that is receiving the updates

Reviewed By: @bhosmer

Differential Revision: D1650488

Signature: t1:1650488:1414711460:bec8da02074fb5b2e17ce14cf667f224c559b72d
Support GCC/LLVM stack-smashing protection

Summary: Turn it on with `cmake -DENABLE_SSP=1` Protection buffer/stack overflow exploits.

Starting with version GCC 4.9 there is support for more advanced protection from overflows `-fstack-protector-strong` (minor loss of performance), the version below only support `-fstack-protector`.
LLVM 3.6 supports `-fstack-protector-strong` prior to this worked as a stripped-down option `-fstack-protector`.

This option protects the stack from overflowing/exploiting/debug and implementation process for laying.
RHEL, CentOS, Ubuntu uses these options to build all binary deb packages in the delivery.

This optional (default=disabled), need more testing.

More info:
- [RELRO: RELocation Read-Only](https://isisblogs.poly.edu/2011/06/01/relro-relocation-read-only/)
- [Improve your software security with GCC Stack Protector Strong](http://www.simonroses.com/2013/04/appsec-improve-your-software-security-with-gcc-stack-protector-strong/)
- [Hardening overflowing/exploiting/debug](https://wiki.debian.org/Hardening#Stack_
Closes https://github.com/facebook/hhvm/pull/4091

Reviewed By: @sgolemon

Differential Revision: D1646057

Signature: t1:1646057:1415053149:366a56d35c1298db8192bb291c55f183b4c2f95f
Adding check for creating function called __construct

Summary: The typechecker allowed creating a function called `__construct`
outside of class scope. This change disallows creating
a function with name `__construct`.

Reviewed By: @jwatzman

Differential Revision: D1648756