Let hhbbc know that invariant_violation always fails
commitc6900bba94a721534f4e67fc62ef611da1a5a679
authorJan Oravec <jan@fb.com>
Fri, 3 Oct 2014 01:57:27 +0000 (2 18:57 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Sat, 4 Oct 2014 00:00:26 +0000 (3 17:00 -0700)
treed16cf0646f6a5dcb9b1b44b901d75ff0d35b9608
parent522ff52a36bdb462eb2facbc5b568d1dc105ee5e
Let hhbbc know that invariant_violation always fails

Summary: hhbbc does not know about call_user_func_array(), so when

  invariant(condition(), ...);

is rewritten as

  if (!condition()) {
    invariant(false, ...);
  }

it has trouble figuring out that invariant(false, ...) never
falls through.

After this diff, hhbbc figures out correctly that invariant(false, ...)
returns TBottom, but still cannot fully use this knowledge.

Reviewed By: @ptarjan, @elgenie

Differential Revision: D1595071
hphp/system/php/lang/invariant.ns.php