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
Update third-party to pull in proxygen as a submodule (and update folly and thrift)
Bump third-party again, typo in cxx flags
set proper expire for xdebug cookie

Summary: Transport::setCookie expects a unix timestamp, not simply a number of
seconds. It will also figure out Max-Age for us automatically.
Closes https://github.com/facebook/hhvm/pull/4151

Reviewed By: @sgolemon

Differential Revision: D1663923

Signature: t1:1663923:1415311101:172e40638cf7b37030a5691c0b06890ad20311e0
Add a isHack() method to ReflectionFunction and ReflectionClass

Summary: These methods return if the function/method/class was defined in a Hack
file, whether that is by starting it with <?hh or by setting
Eval.EnableHipHopSyntax to true.

Closes #2286

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

Reviewed By: @sgolemon

Differential Revision: D1656119

Signature: t1:1656119:1415311234:ca858120023fae957cef0ff86cb71252e8e2f3fb
Refactor sweepable so it is parseable.

Summary: APCLocalArray and some ObjectDatas also extend Sweepable,
which puts the Sweepable object first in memory, so make
it parseable.

before: [vtable][next][prev][persistentCount][pad:32][subclass...]
after:  [vtable][pad:24][kind][persistentCount][next][prev][subclass...]

Reviewed By: @jdelong

Differential Revision: D1660921

Signature: t1:1660921:1415311481:bc24a947ae79ea9d068596167f926bd7b0cdeda1
Remove unused parameter

Summary: I was auditing the use of check_mode in our server init phase,
and found this similarly-named but unused variable in hh_ide.ml

Reviewed By: @joelbeales

Differential Revision: D1664560

Signature: t1:1664560:1415307088:06cbddc35b0234fe16cba8a64c0b1ad1b5dbf7e7
Change mkdir() / rmdir() / unlink() raise warning behavior.

Summary: According to PHP5, mkdir() / rmdir() / unlink() raises warning only if dealing with plain files.

Fixed vfsstream framework test regressions.
Closes https://github.com/facebook/hhvm/pull/4145

Reviewed By: @sgolemon

Differential Revision: D1664121

Signature: t1:1664121:1415312841:5af0c151d3f1ac15114e33398c555c180c13dde9
typechecker: support stdClass

Summary: stdClass is a special builtin in that it's basically designed
 for dynamic properties. So, special case 'stdClass' in
 to bypass the declaration check for non-static members.

Reviewed By: @int3

Differential Revision: D1664175

Signature: t1:1664175:1415309554:52fc0b92cf403d8a158d8eec62fe0c5a011752f1
Make sure Typing_deps.trace is set if we are saving state.

Summary: This seems to be used by Hack build.

Reviewed By: @elgenie

Differential Revision: D1664562

Signature: t1:1664562:1415317119:891d4a5eb06b7b08e9b84a8613e158ba46f353ae
Add an intrinsic to disable inlining for specific functions

Summary: Disabling inlining of specific functions can be useful when
trying to write reliable, reproducible test cases. This diff adds the
ability to disable inlining for particular functions through the use of
the disable_inlining intrinsic, part of a new __hhvm_intrinsics
StandardExtension. The extension is hidden so that it won't be loaded
unless enabled with the Eval.EnableIntrinsicsExtension runtime option.

Reviewed By: @jdelong

Differential Revision: D1659302