Remove CppCall's indirect call kinds, move to its own header

Summary: IndirectReg and IndirectVreg were both unused, and CppCall is big
enough to deserve its own header.

Reviewed By: @edwinsmith

Differential Revision: D1593286
Restore Instr_TC stat counter

Summary: I'm a little concerned that this is going to result in a bunch of extra
work for the sake of accuracy. The old counter (plus an alternate
implementation that I tried) would overcount in the presence of side
exits, because it incremented the counter in bulk at the beginning of
each block. I guess this is OK though since it's only going to result in
extra code if stats are enabled.

Reviewed By: @swtaarrs

Differential Revision: D1594333
Don't parse cli options twice in the compiler

Summary: @markw65 found a bug in D1555790#89 where I was parsing the cli config options twice causing erroneous nodes.

Reviewed By: @markw65

Differential Revision: D1594447
adding ReflectionClass.hhi

Summary: ... reflection classes are fairly complex builtins, so
 the typechecker can deliver some value by knowing about its details.

Reviewed By: @​michalburger1

Differential Revision: D1593046
fixup VirtualHost lookup

Summary: Too many interations on the previous diff and I missed getting the real virtual host at least once so GetCurrent would return the right thing

Reviewed By: @markw65

Differential Revision: D1593559
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
Kill HHIREnableCalleeSaveOpt runtime option

Summary: It isn't used anymore.

Reviewed By: @swtaarrs

Differential Revision: D1593488
Use precomputed static strings for chr

Summary: We already have these to support $str[$idx]. Might as
well use them for chr($chr) too.

Reviewed By: @swtaarrs

Differential Revision: D1595026
Allow shutdown function registration during shutdown

Summary: Closes #2981

Reviewed By: @ptarjan

Differential Revision: D1561536
Fix typo in builtins_async_mysql.idl.hhi

Summary: This was blocking the Codex parser from indexing the file.

Reviewed By: @jwatzman

Differential Revision: D1588349
typechecker: empty is analagous to isset

Summary: ... from the typechecker's perspective (since we don't
 distinguish between false and true at the type level). Also group
 together the handling of isset/empty/unset, since they're all
 pseudo-functions that actually correspond to different bytecode.

Reviewed By: @paroski

Differential Revision: D1596294
reflection support for first-class enums: ReflectionClass::isEnum [2/2]

Summary: The controversial portion of {D1589055}.
 * method ReflectionClass::isEnum : similar to is{Trait|Interface|Abstract}

Reviewed By: @paroski

Differential Revision: D1591338
support for 'abstract final' classes

Summary: PHP5 prevents having both `abstract` and `final` modifiers on a class at
 the same time.

 However, there are coding patterns that include classes that are
 intended to be used only as a collection of static utility methods,
 especially for pre-namespace, or namespace-avoiding, code.

 * Like an 'abstract' class, these cannot be instantiated directly.
 * Like a 'final' class, these cannot be generally inherited.
 * Unlike either an abstract class or a final class with a private
   constructor, whole program static analysis should be able to easily
   determine that any return / parameter typehints referring to this
   class are prima facia incorrect because there *cannot* be instances
   that satisfy them.
 * Unlike a trait, public static functions, when invoked directly, can
   use self:: and/or static:: to access protected/private static
   functions.
 * Unlike a trait, these classes can inherit from other abstract /
   concrete classes.

 In this diff, the 'abstract final' class is not allowed to declare
 non-static functions/props on its declaration (but can inherit such
 functions/props due to traits and parent classes). It's also expected
 to not have any remaining abstract static functions.

Reviewed By: @paroski

Differential Revision: D1594095
Tell hhbbc about enum type hints

Summary: It assumed they were type object, but they're not.

Reviewed By: @swtaarrs, @elgenie

Differential Revision: D1596140
Fix ArrayData pretty printer for string keys

Summary: typo

Reviewed By: @mxw

Differential Revision: D1595875
Use binary searches in vasm-xls

Summary: Turns several O(N) searches into O(lgN) to improve big-o time
when compiling large units. Also takes advantage of SSA by
only trying to insert one spill-store, at the position of the
exactly-one def of an SSA interval.

Reviewed By: @markw65

Differential Revision: D1586464
Don't keep copying the sourceLocTable

Summary: There doesn't seem to be any point

Reviewed By: @jdelong

Differential Revision: D1596565
Add delay timing knobs to throughput performance benchmark driver.

Summary: Change the plumbing so that the $options are pushed around more uniformly
into the workers' constructors, and use properties from the $options
directly.

Add various knobs to control delays before/after most sub-process
launches, delays waiting for responses from the server, delays on the
fcgi channel, and the like. These knobs are reflected as command line
arguments to perf.php. The chosen default values seem plausible or
are historical.

These knobs have proven necessary to support slower systems, or a hhvm
UUT that is itself compiled for debugging or coverage, or is profiling
the PHP being executed.

Add knobs to:
  * override the temporary directory name;
  * plumb subprocess output to files, as using pipes leads to deadlock;
  * trace the subprocess invocations.

If these delay knobs are used, then issue a warning message that
the timing results are unsuitable for benchmark comparisons.

Make changes for hack style guide:
  * add , at end of all formal parameter lists, and most act
Closes https://github.com/facebook/hhvm/pull/3850

Reviewed By: @ptarjan

Differential Revision: D1578204
Properly shutdown debugger threads on exit

Summary: When the server quit we were leaving the proxies
running. This led to an assertion in dbg builds when the
proxy was destroyed, and random crashes in release builds.

Reviewed By: @jdelong

Differential Revision: D1596601
Fix more hhbbc issues with enums

Summary: Name-only resolutions weren't handled in the last diff.

Reviewed By: @markw65

Differential Revision: D1596483