Add hfsort to .gitignore.

Summary: Add hfsort to .gitignore.
Closes https://github.com/facebook/hhvm/pull/4146

Reviewed By: @sgolemon

Differential Revision: D1663371

Signature: t1:1663371:1415295773:22d534a602ab05709b93fb318e05087203b64dbf
http streams: only split headers into two pieces

Summary: Limit header explosions to two pieces to avoid truncating header data containing colons.
Closes https://github.com/facebook/hhvm/pull/4147

Reviewed By: @sgolemon

Differential Revision: D1663374

Signature: t1:1663374:1415295777:e15ae52ba0709f440ae0c8ae4ebece29884ff84a
Ban trailing commas in type parameter lists

Summary: HHVM rejects this, we should too -- it seems much more likely
indicitive of an error than trailing commas on functions.

Fixes https://github.com/facebook/hhvm/issues/3168

Reviewed By: @int3, @elgenie

Differential Revision: D1662701

Signature: t1:1662701:1415253151:71fafd8e490a6b014753b9e2c7e7b90ead74c20d
Fix exhaustiveness checks on first-class enum switch

Summary: We need to expand thru tyvars and check across unresolved here.

Reviewed By: @int3, @elgenie

Differential Revision: D1661633

Signature: t1:1661633:1415253666:32eb74f02129508f9e4a07c59b701c8e454c5c8a
Fix mis-parsing of '{$' constructions in String2

Summary: During string interpolation, just `$foo` is a special beast --
notably `"$foo->x()"` is a //member// lookup on `$foo` followed by two
literal parens. That's why we have `encapsed_expr`. But, if it's
surrounded by curlies, then it is in fact a real expression again, and
we should use the full expression parser on it.

The new test cases show the three variations here, by way of errors: one
is a failed member lookup, one a failed function call, and one just
doesn't parse at all.

Fixes https://github.com/facebook/hhvm/issues/2972
Fixes https://github.com/facebook/hhvm/issues/3669

Reviewed By: @elgenie

Differential Revision: D1662433

Signature: t1:1662433:1415287920:d226bfd8f0c4b22130592ec9a15291f311c561dc
Add namespaced name to closures

Summary: Fixes facebook/hhvm#1669

Reviewed By: @paulbiss

Differential Revision: D1662546

Signature: t1:1662546:1415235548:93421bc3160e3dbec7aa582a14f4cd8afba83706
Yell when catching an uninstantiable class

Summary: Same check as instanceof.

Reviewed By: @elgenie

Differential Revision: D1661501

Signature: t1:1661501:1415297384:e6ff49b7f3e70b488731065ab784c81f1bce2c08
typechecker: more instantiability tests

Summary: * the typehints for class members should be checked for instantiability
 * add an optional param for testing instantiability to typing_hint

Reviewed By: @jwatzman

Differential Revision: D1663959

Signature: t1:1663959:1415299374:32bfb660288df0d661ca51c3f16749c0ba4d6fe1
getWrapperMetaData() for UserFile returns StreamWrapper object.

Summary: Change getWrapperMetaData() to return Variant type.
Passing vfsstream tests.
Closes https://github.com/facebook/hhvm/pull/4149

Reviewed By: @sgolemon

Differential Revision: D1663533

Signature: t1:1663533:1415302687:10861880d59f5376d9579b36f1dd3f03572c2481
Make hh_server use relative paths.

Summary: This allows us to save hh_server state on one machine, distribute
that saved state to other machines, and load a new hh_server there from the
saved state but with a different root directory.

I have verified (i.e. written tests) that demonstrate that typechecking still works
after restoring from a saved state. hh_format has been tested too. However, more
work may be required for the IDE services.

Reviewed By: @elgenie, @jwatzman

Differential Revision: D1654587

Signature: t1:1654587:1415297603:87d57901bed43b16cd966fa95eff223c1ad53cc3
Convert GuardLoc and friends to DELEGATE, add ARM lowering pass

Summary: This is the first time we need a lowering pass for ARM, as we start generating
cmp{b,l}im vasm opcodes. The implementation is very simple. vasm is super well
coded!

Here's a possible issue. I tried converting DbgAssertRefCount, but I found it
generates suboptimal code when run through the x64 backend + the lowering pass.
It does two cmplim's, so it loads the refcount, does the -127 comparison, and
then loads the refcount again to do the other check. The native ARM
implementation does the smart thing and only loads the refcount once. I worry
this kind of suboptimality is going to appear in a lot of places as we continue
doing this conversion. It may not end up being a real problem but I'll keep an
eye out for it.

Reviewed By: @edwinsmith

Differential Revision: D1662260
Refactor ClientStart to make adding new options easier

Summary: ClientRestart is basically a thin layer over ClientStart; it's not
very useful to give it its own env record type. Using the same record type
also means that we don't have to manually copy the fields from one record to
another, and it makes it less awkward to add extra fields to ClientStart.env.

Also, I made start_server take a single env record so adding new fields to
ClientStart.env won't require modifying the signature of that function.

Reviewed By: @jwatzman

Differential Revision: D1663410

Signature: t1:1663410:1415299128:2184017f1ade82932186a71b92b950993c62d4aa
Make integration test restore state at a different root directory

Summary: Also modify the way we check test results -- instead of stripping off the root prefix of the file paths in the test output, we fill in what the root should be in our expected output. Thus the test ensures that we are not saving the wrong absolute paths to disk.

Reviewed By: @jwatzman

Differential Revision: D1654589

Signature: t1:1654589:1415139391:64e0e1afc254878a7a0fdc6b19f733897f57c41c
Save and restore search state correctly.

Summary: This involved de-functorizing SearchUtils because OCaml's type
inference across modules is kind of janky. In particular, it could not
be convinced that Fuzzy.SUtils.term and HackSearchService.SUtils.term
were the same type.

Reviewed By: @elgenie, @jwatzman

Differential Revision: D1658166

Signature: t1:1658166:1415147857:5d6661e3c2a56e1b8f7ade55e5f09bbe302199cd
Separate client- and server- side options in the build process.

Summary: I am going to add an additional field to ClientBuild.env, and I don't
want to duplicate it unnecessarily on the server side.

Reviewed By: @jwatzman

Differential Revision: D1663412

Signature: t1:1663412:1415299227:a6bc7f9846e9ff7e2e557c999f4e371886102d60
Add tests for the other IDE services.

Reviewed By: @jwatzman

Differential Revision: D1658440

Signature: t1:1658440:1415142872:bb1d929ec344b99c6e38c9cf3334042b6bcd9dde
version of memcpy-x64 optimized for the tail end of 7,6,5,4 bytes in a N byte copy

Summary: I see a performance win of 2-3% on wordpress-3.6 with this version of memcpy. In this particular case I have optimzed the memcpy for the tail end of 7,6,5,4 bytes when a N byte copy is requested.

I have another revision where I optimized all the cases for <7 bytes and <63 bytes tail ends however I see an increase on L1 cache misses, with it.
Please review this on the FB workload. If a histogram is available for the byte copies that take place I could specifially optimize it for those cases.

Closes https://github.com/facebook/hhvm/pull/4137

Reviewed By: @markw65

Differential Revision: D1661080

Signature: t1:1661080:1415295604:debcb26bfd4075434400368b77463edd411b3727

Pulled By: @sgolemon
add basic README.md to frameworks tests

Summary: fixes facebook/hhvm#3522

Reviewed By: @paulbiss, @JoelMarcey

Differential Revision: D1664543

Signature: t1:1664543:1415306909:24a54ed1be784e560afc5067c927091c863fa105