Fix await/yield operator precedence

Summary: Do not rely on magic, declare operator precedence correctly.

Reviewed By: @elgenie

Differential Revision: D1403498
Handle mismatching fromLoad state in refcount opts

Summary: It can actually be legit to have mismatching fromLoad states, as long as the
realCounts are suitable.  Includes a minimized test case for the case that's
been occasionally killing our flib runs.

Reviewed By: @swtaarrs

Differential Revision: D1404995
Fix running multiple tests at the same time

Summary: Broke runnign quick tests as part of the framework runner. Broken when adding suppport for spaces.

Reviewed By: @JoelMarcey

Differential Revision: D1405906
Adapt Xenon to use asio changes

Summary: Remove unused m_asyncInvalidCount from Xenon.  Went away with new asio changes.
Added wait sample to Xenon.
Modified Xenon::log to handle wait samples.

Reviewed By: @jano

Differential Revision: D1403928
Band aid for C++ exceptions while unwinding PHP exception.

Reviewed By: @markw65

Differential Revision: D1406669
Fix subtyping "newtype X as Y" with nullables

Summary: The order matters here.

Reviewed By: @elgenie

Differential Revision: D1406629
functorize client stop command

Summary: Functorize Hack client stop command.

Reviewed By: @jwatzman

Differential Revision: D1398492
Add checks that Enum subclasses are being used properly

Summary: Do a bunch of checks on classes extending Enums to make sure they are being used at least somewhat reasonably. This means checking that all constants are actually compatible with the declared type, enforcing that only int, string, and mixed can be used, and only allowing int and string constants when the type is mixed.

We also make the declared Enum type the type for each of the constants.

We also want to allow abstract types to be used if the actual underlying type is int or string, which requires some pretty tasteless abstraction breaking.

Reviewed By: @elgenie

Differential Revision: D1388879
Revert "Fixed error output for json_encode"

Summary: This reverts commit 0c1c211537bc49e50bd16676c5ec74a0df426b4d.

Reviewed By: @jdelong

Differential Revision: D1406161
AsyncIterator vs. AsyncKeyedIterator

Summary: Move AsyncIterator to AsyncKeyedIterator and introduce AsyncIterator
that is typed only over yielded value.

Makes it possible to type most of the async generators in lightweight
way without having to specify key type:

  async function foo(): AsyncIterator<int> {
    yield 42;
  }

Reviewed By: @billf

Differential Revision: D1405410
Clean up list assignment

Summary: Deduplicate two instances of list assignment implementation.

Reviewed By: @billf

Differential Revision: D1406278
Fix some Type::Null stuff, LbGbl guard relaxation

Summary: - We were being sloppy with Type::Null in isKnownDataType and toDataType,
  mostly for historical reasons. I cleaned that up and nothing seemed to break.
- IsType<Null> was just checking for KindOfNull. I fixed it to check for <=
  KindOfNull to also get KindOfUninit.
- LdGbl is roughly the same as LdLoc but we weren't tracing through it in guard
  relaxation.

The new test is fixed by having either the second or the third item, since it
was a combination of both causing issues.

Reviewed By: @ottoni

Differential Revision: D1401528
Disable flaky zend test

Reviewed By: @bertmaher
Fix bug in cgStoreTypedValue

Summary: This was introduced by D1401528 but missed because of a sandcastle
bug.

Reviewed By: @dariorussi

Differential Revision: D1407977
Expand documentation on Value::merge in refcount-opts

Summary: Explain why it's ok for the pendingIncs vectors to differ.

Reviewed By: @bertmaher

Differential Revision: D1408000
Added HTML5-PHP test suite

Summary: Closes #3042

Reviewed By: @fredemmott

Differential Revision: D1407665

Pulled By: @JoelMarcey
cellToBool, simplifyConvArrToBool, tvCastToBooleanInPlace don't match on NVTW

Summary: simplifyConvArrToBool and cellToBool call ArrayData::empty(), but
tvCastToBooleanInPlace has a comment saying it is intentionally
calling ArrayData::getSize() and having PHP5-incompatible behavior for
NVTW. This diff changes the first two to match the third.

Reviewed By: @oyamauchi

Differential Revision: D1406933
Fix cgIsScalarType assuming its argument is not const

Summary: Causes a test to fail with the simplifier disabled.

Reviewed By: @bertmaher

Differential Revision: D1406946
Add support for class constant shapes to hhvm.

Summary: Add support for using class constants as field names in shapes to HHVM.

Test failures already present.

Reviewed By: @jdelong

Differential Revision: D1381174
Reduce from four ways to look up Unit*'s to one

Summary: The 'eval' vs. 'lookup' distinction doesn't make
sense---neither of them did any evaluation.  I also didn't know what
an "include root" was or why you'd want to look one up.  Refactor
things so there's just lookupUnit (still on ExecutionContext for now).

Reviewed By: @bertmaher

Differential Revision: D1384187