Add operator|(PhysReg) and a few other overloads, and use them.

Summary: Makes RegSet manipulation a bit clearer.

Reviewed By: @swtaarrs

Differential Revision: D1636964
Fix findPrecedingFPI

Summary: Its possible that the first fpi region contains the
region we're after. Initialize fe to nullptr, and start from 0.

Reviewed By: @jdelong

Differential Revision: D1636070
Make uniqueStubs for bindCall

Summary: Most of the information compiled into the bindCall stubs can be computed from the callee ActRec. Once thats done, we only have two stubs; one for immutable calls, and one for non-immutable calls. So make a uniqueStub for each.

Reviewed By: @edwinsmith

Differential Revision: D1633348
Allow unlimited memory for the warmup requests

Summary: I guess it wasn't as bad as I thought.

Reviewed By: @bertmaher

Differential Revision: D1636748
Initial foundation for merging CodeGenerator classes

Summary: This is a real idea, but if people hate it I can pursue something else.

The plan is to gradually convert as many opcodes as possible in the ARM
class to DELEGATE_OPCODE first, before eventually merging the classes.
This will make the eventual merge go as smoothly as possible. Here's how
I envision it:

- Turn as many opcodes as possible into DELEGATE_OPCODE on the ARM side,
  both ones that are currently punting and ones that have real
  implementations. This will probably entail adding an x64->arm lowering
  pass to allow to use more of the x64 implementations unmodified.

- When that's done, merge the classes. Everything will go through
  x64::CodeGenerator. For the opcodes that still have divergent ARM
  implementations, we'll create things like cgBlahX64 and cgBlahARM,
  mechanically

- For those divergent opcodes, we can gradually replace them with mostly
  merged versions, with a little bit of branching in the middle.

Reviewed By: @edwinsmith, @swtaarrs

Differential Revision: D1635576
Make sure type is right when emitting testbi.

Summary: If the argument to testbi is larger than 1 byte we need to truncate it.

Reviewed By: @markw65

Differential Revision: D1636186
Fix logging

Summary: We were clearing some of the stats before logging them

Reviewed By: @jano

Differential Revision: D1637551
Remove tc-space reporting of astubs

Summary: Astubs hasn't existed for almost 6 months now, so it's about time to
retire this stat.  We can always synthesize it in ODS if needed.

Reviewed By: @ottoni

Differential Revision: D1631327
Use operator= instead of clear to reset MM.m_instances

Summary: clear() doesn't guarantee to release the underlying storage of the
map, whereas operator= with a new empty map should.
Only do this if m_trackingInstances, to avoid construction unless needed.

Reviewed By: @shai-d

Differential Revision: D1631356
Use operator= instead of clear to reset xmlErrorVec

Summary: clear() doesn't free storage, so this could grow steadily over time.

Reviewed By: @edwinsmith

Differential Revision: D1632303
backport PHP bugfix #43540

Summary: We need to properly set newlength.

See:
- https://github.com/php/php-src/commit/898ff10dc0f799ecf997cb3c64a96f2751884187
- https://bugs.php.net/bug.php?id=43540
Closes https://github.com/facebook/hhvm/pull/4014

Reviewed By: @ptarjan

Differential Revision: D1626102

Pulled By: @fredemmott
Fix incorrect LOCK_UN for user-land stream wrappers

Summary: We were passing native LOCK_UN value, but PHP's value differs.
These should be probably switched to k_* once constants idl is ported.

Closes #3887.
Closes https://github.com/facebook/hhvm/pull/4034

Reviewed By: @fredemmott

Differential Revision: D1630986
Fix highlight_string function for proper highlighting - #3160

Summary: This should resolve #3160.
Closes https://github.com/facebook/hhvm/pull/3959

Reviewed By: @fredemmott

Differential Revision: D1624101
Port fixes for EXIF bugs from PHP

Summary: Official fixes PHP bugs 60150 and 65873, plus extra line breaks. This is
just to be prudent, I haven't found an actual security vulnerability in
HHVM. In the case of 65873, reproduction depends on allocator details,
and HHVM's allocator is probably not vulnerable at present.

Submitted on behalf of a third-party: The PHP Group
Source: http://svn.php.net/viewvc/?view=revision&revision=319534
Source: https://github.com/php/php-src/commit/cbcf6e1880e35ed7cd052e127b037eee7cef61c9
License: version 3.01 of the PHP license

Closes: #1154
Closes https://github.com/facebook/hhvm/pull/4020

Reviewed By: @fredemmott

Differential Revision: D1627130

Pulled By: @paulbiss
Add Histogram of NoInfo sizes to ArrayTracer

Reviewed By: @edwinsmith

Differential Revision: D1636990
Add remaining CALL_OPCODEs for ARM

Summary: In theory, anything that's a CALL_OPCODE on x64 should be the same on
ARM and it should work without problems. I just copied the whole
CALL_OPCODE section from code-gen-x64.cpp and it seems to have worked.
(That resulted in a lot of reordering, so the best way to see what's
changed is to concentrate on the removed PUNT_OPCODEs.)

Reviewed By: @edwinsmith

Differential Revision: D1637822