Convert resume and retransopt to vasm

Summary: resume and retransopt were simply macro operations that do a
service request by preparing a number of argumets, saving
vmsp and vmfp, then returning to enterTCHelper with a service
request opcode.

Add a RegMask argument to the ret{} instruction so we can exactly
model the lifetime of the return-value registers and service-request
argument registers.

This only ports enough of the old emitServiceReqWork functions to
support what was needed for resume and retransopt. Adding support
for ephemeral service requests will take a bit more fleshing out.

Reviewed By: @swtaarrs

Differential Revision: D1622304
is_object to return false for incomplete classes

Summary: This incompliance must be fixed for Symfony's FlattenException to work (checked by Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php).

Reviewed By: @jdelong

Differential Revision: D1574674
Make DateTime::modify work correctly

Summary: Right now, this code does not work in HHVM

```
<?php
$datetime = new DateTime();
$datetime->modify("2014-09-20 20:30");
echo $datetime->format('c');
```

It prints out the initial time upon construction as opposed to the modified time.

```
2014-10-16T17:29:03-07:00
```

PHP 5.6

```
2014-09-20T20:30:00-07:00
```

Fixes #3778

Reviewed By: @ptarjan

Differential Revision: D1622397
The HHIR CallsNative flag (N, NNT) is no longer needed.

Summary: Now that vasm-xls can see actual calls, we don't need the flag.

Reviewed By: @jdelong

Differential Revision: D1626565
Save the Typing_deps hashtable as well

Summary: I'm not sure how to create a case that fails without saving the
hashtable, but it seems like something that should be saved...

Reviewed By: @pikatchu

Differential Revision: D1610807
hh_server now accepts a list of files to recheck after load.

Reviewed By: @jwatzman

Differential Revision: D1610916
Don't pass root as an additional parameter.

Summary: It is already available from genv.options, so there's no point
in having it duplicated.

Reviewed By: @elgenie

Differential Revision: D1625185
Fix double-counting of expressions in coverage stats.

Summary: Dedup the count using a Map

Also add --coverage option to hh_single_type_check so we can write unit
tests for coverage results.

Also handle the edge case where there are no expressions at all in a
file.

Reviewed By: @elgenie

Differential Revision: D1625309
Remove unused is_local_array.

Reviewed By: @elgenie

Differential Revision: D1625183
memoize: add test to document serialize/unserialize brokenness

Summary: ... the behavior is rather hilarious :D

Reviewed By: @​psaltzman

Differential Revision: D1627177
memoize: ensure that memoize caches aren't serialized

Summary: .. by reporposing ## AttrBuiltin ## on properties as a flag
 for properties internal to the runtime, thereby excluding them from
 serialization

Reviewed By: @​psaltzman

Differential Revision: D1627415
Fix OSS build - Remove extra OR operator

Summary: D1627415 introduced an extra `|` operator that the OSS compiler does not like:

```
/tmp/hhvm_oss_sync_and_push/hhvm/hphp/runtime/base/object-data.cpp: In member function ‘void HPHP::ObjectData::getProp(const HPHP::Class*, bool, const HPHP::PreClass::Prop*, HPHP::Array&, std::vector<bool>&) const’:
/tmp/hhvm_oss_sync_and_push/hhvm/hphp/runtime/base/object-data.cpp:1721:9: error: expected primary-expression before ‘|’ token
         | AttrBuiltin // runtime-internal attrs, such as the <<Memoize>> cache
```

Reviewed By: @ptarjan, @paulbiss

Differential Revision: D1628431
Adjust PackedArray allocation policy

Summary: Try growing a packed array in place before reallocating memory, by taking advantage of the request-local memory manager allocation policy.
Maximize the initial capacity in emitNewArray if the capacity is within a threshold.

Reviewed By: @jasone

Differential Revision: D1601707
absorb fallback in jcc.

Summary: rewrite jcc->fallback to fallbackcc in vasm transformation

Reviewed By: @edwinsmith

Differential Revision: D1616310
Convert bindcall to vasm

Summary: Do bindcall using vasm, by converting emitBindCall to emit the
mainline vasm code to set up and call, and also generate the
REQ_BIND_CALL service request stub at codegen time. The stub
generation is done using a self-contained vasm unit, which we
lower to asm during codegen time.

Removed the Vout& vfrozen param from CodeGenerator, since it
was dead, but also pass in CodeBlock& frozen, since we need it
to generate the ephemeral service request stub. This would cause
an assert if vmain were actually pointing to frozen (marked Unused),
however we never do that.

Also, refactor x64::emitServiceReqImpl() to take a CodeBlock.
The tricky pointer manipulation is all for generating ephemeral
service request stubs, and it's simpler to just pass in a mutable
CodeBlock, which has meaningful base, frontier, and capacity members.

Reviewed By: @swtaarrs

Differential Revision: D1625531
CodeGenerators don't need to be virtual anymore.

Reviewed By: @jasone

Differential Revision: D1627033
Update third-party/ to bump folly version
Eliminate m_curInst

Summary: Why use a global when a local will work? This diff inches its
way towards breaking down the class-with-bytecode-methods organization
of CodeGenerator.

Reviewed By: @swtaarrs

Differential Revision: D1626666
Make sure we have non-zero exit status on hack build err

Reviewed By: @jwatzman

Differential Revision: D1617708
Convert IPC to HNI

Summary: fixes #3922

Reviewed By: @markw65

Differential Revision: D1602962