document func_get_args() difference

Summary: This is a known wontfix, and generally indicates code that should be
rewritten for clarity anyway.

Also, fix the fact that we can't count to 10.

Reviewed By: @sgolemon

Differential Revision: D1569484
Improve vasm pretty-printing

Summary: This gives each Vinstr an IRInstruction* instead of a SrcKey for the sake
of keeping track of where each vasm instruction came from. AsmInfo has
also been split out into its own header along with some additional
helper functions. We've also added mappings from IRInstruction to
TcaRange and from Block to TcaRange for cold and frozen code regions.

Also fixed a bug where were uninentionally duplicating a Vout struct,
causing us to miss setting the origin IRInstruction for many of the
Vinstrs while emitting vasm.

Reviewed By: @edwinsmith

Differential Revision: D1525064
Include PDOException in stdlib hhi files.

Summary: Closes https://github.com/facebook/hhvm/pull/3719

Reviewed By: @ptarjan

Differential Revision: D1547324
Make APC's StoreValue smaller

Summary: Go from 40 bytes to 24.  I haven't looked at how big the struct it's
embedded in inside tbb is though.

Reviewed By: @bertmaher

Differential Revision: D1566443
Remove #define TBB_PREVIEW_CONCURRENT_PRIORITY_QUEUE

Summary: It only affects tbb.h which we don't include.

Reviewed By: @bertmaher

Differential Revision: D1566748
Document the ConcurrentTableSharedStore entry points; delete unused ones

Reviewed By: @bertmaher

Differential Revision: D1567448
Make APC's StoreValue even smaller

Summary: Primed APC keys always have a zero expiration time, and non-primed
keys never need to use the lock.  Document that the lock is guaranteed to be
zero when unlocked so we can union it with expiry, and reduce the number of
bits we allow for expiry.  Also, rename 'expiry'.

Reviewed By: @edwinsmith

Differential Revision: D1567742
Remove cache_id argument from various apc functions; remove EnableDnsCache

Summary: We have two apcs, and our apc API doesn't match standard php.  It
looks like it might have been only there for an internal DnsCache feature that
isn't on.  Nothing appears to use this stuff, so remove it.

There's still some left over to clean up here (I think the whole "SharedStores"
thing can just go away now) but I figured I'd put this up before pulling more
of it out in case someone (asukhachev?) knows of any possible use I missed...

Reviewed By: @edwinsmith

Differential Revision: D1568138
Move jit/translator_tests to hphp/runtime/tests

Summary: We already have non-jit tests in here, and it's nicer to have fewer
link jobs with how slow we link, so I'd rather add non-JIT (APC) tests to this
binary than add a new one.

Reviewed By: @edwinsmith

Differential Revision: D1568468
Fix a bug in apc_cas for primed values

Summary: If it had to deserialize something, it was going to dereference a null
pointer when trying to free the old APCHandle.  The code for inc() had the same
layout, but no real bug, because we never have file-backed values for which
isNumeric would've returned true.

Reviewed By: @edwinsmith

Differential Revision: D1568469
Add Closure::bind() to news

Summary: .

Reviewed By: @ptarjan

Differential Revision: D1567365
Implemented constant HHVM_VERSION_ID

Summary: Closes #3758
Closes https://github.com/facebook/hhvm/pull/3806

Reviewed By: @ptarjan

Differential Revision: D1568916
cotire 1.6.6

Summary: Closes https://github.com/facebook/hhvm/pull/3817

Reviewed By: @ptarjan

Differential Revision: D1569826
Fix SplFileInfo::setFile/InfoClass

Summary: Use infoClass and not fileClass everywhere
Also throw proper exceptions

This fixes an issue in zf2 (most likely)
Closes https://github.com/facebook/hhvm/pull/3814

Reviewed By: @ptarjan

Differential Revision: D1569299
SSA for GetCtxFwdCall and GetCtxFwdCallDyn

Reviewed By: @alexmalyshev

Differential Revision: D1568547
Provide an option to not have the default runtime options specified by the wrapper

Summary: Right now we always set these options:

```
    $flags .=
      '-v Eval.EnableHipHopSyntax=true '.
      '-v Eval.EnableHipHopExperimentalSyntax=true '.
      '-v Eval.JitEnableRenameFunction=0 '.
      '-v Eval.GdbSyncChunks=1 '.
      '-v Eval.AllowHhas=true '.
      '';
```

Let's provide an escape hatch just in case we want something just a bit more vanilla

Reviewed By: @jdelong

Differential Revision: D1570066
libxml error handler

Summary: after looking at the memory profiling, i found a lot of allocations coming out of the vector used for collecting libxml errors for later use.

- add new libxml_suppress_errors(bool $enabled) to control discarding errors recieved from libxml/domdocument

one oft-used idiom is:

  libxml_use_internal_errors(true);
  // do something that could possibly generate a lot of libxml errors
  libxml_use_internal_errors(false);

the libxml_use_internal_errors(false) call discards all the errors that were collected.
there's no reason to allocate storage to copy them into the request just to throw them away.

- change storage of xmlError structs to folly::fbvector. the pattern used is:

  v->resize(v->size() + 1)
  auto& e_copy = v->back();
  // manipulate e_copy

perhaps fbvector's reduced growth factor will help a little here. not benchmarked.

- pre-allocate storage for libxml_get_errors()

Reviewed By: @jano

Differential Revision: D1539513
grep for error: and warning: before checking for binary

Summary: I also changed from looking for `Error` on a `make` line to looking for the cmake error which will be ` error: `. Hopefuly this will surface the real reason for failure.

Reviewed By: @edwinsmith

Differential Revision: D1568139
Fix some tests in asan builds

Summary: zend-url.cpp was reading past the end of a string without verifying
its length. The other two tests were overflowing the VM stack, since it's
smaller for valgrind and asan. The new, smaller versions of the tests should be
just as useful. There are still a few more issues relating to C++ stack size
but I don't have time to get those right now.

Reviewed By: @edwinsmith

Differential Revision: D1566405
Fix Memcache return values/types

Summary: Part 1: Memcache was previously returning all values as a string, no matter what they were input as.  Now their original value is saved into the flags and restored when pulled back out from cache.
However,@fredemmott suspects this might break some internal Facebook PHP code, so someone from Facebook probably should try this out and make sure it doesn't.

This change also disables compression for integer/float values (emulating the pecl extension functionality).

Part 2: Memcache was previously always returning integers for the increment and decrement functions.  Now they return mixed/variants of int or bool (for failures).

Fixes #3789.
Fixes #3790.

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

Reviewed By: @ptarjan

Differential Revision: D1568454