Unbreak hh tests in trunk

Summary: Support for idx() is now built-in inside Hack. It should also be HHVM
built-in, so this method should not be needed.

Reviewed By: @markw65

Differential Revision: D1640360
Convert SQLite3 to HNI

Summary: fixes #3965

Reviewed By: @ptarjan

Differential Revision: D1615600
Convert thread to HNI

Summary: fixes #3967

Reviewed By: @ptarjan

Differential Revision: D1615782
Convert XML to HNI

Summary: fixes #3971

Reviewed By: @ptarjan

Differential Revision: D1615864
Convert XMLReader to HNI

Summary: fixes #3972

Reviewed By: @ptarjan

Differential Revision: D1615944
Increase JitPGOThreshold to 100

Summary: Although I wanted to have a higher threshold to allow collecting more
profiling information before producing optimized translations, we
initially settled with a threshold of only 10 based on perflab
experiments.  Now that perflab got smarter about HHVM warmup, it seems
to like 100 better.  (I also tried bumping this up to 1000, but that
didn't seem to provide further wins.)

Reviewed By: @swtaarrs, @alexmalyshev

Differential Revision: D1635551
code cleanup - remove sweep node from StringData

Summary: Remove SweepNode from StringData and make new stringData specific
list node. Remove StringData as friend of MemoryManager

Reviewed By: @edwinsmith

Differential Revision: D1629988
stop ir-opcode-generated from being dirty in my tree

Summary: At Facebook we don't have the top level .gitignore so this has to live in the hphp dir for us to see its benefit.

Reviewed By: @paulbiss

Differential Revision: D1639452
Fixed crash on debug_backtrace() after a declared parameter was unset

Summary: Repro:
1. Pick a function with at least one parameter.
2. Inside the function, unset the parameter, then eval a code that does `debug_backtrace(..)`.
3. Invoke the function.

Failing test:
  src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php

Reviewed By: @markw65

Differential Revision: D1640030
Expose thrift methods to read structs

Summary: The existing thrift methods are great for sending/reading method
calls, but don't work well for thrift processors which need the seqid and
message type that is thrown away by the existing methods. This diff exposes
methods that only read structs and don't expect a message header, for both the
binary and compact protocols.

Reviewed By: @​mcduff

Differential Revision: D1638636
Fix race condition in get_subpat_names()

Summary: A race condition in get_subpat_names() would have caused occasional
incorrect match results and memory leakage. Build the array in a
temporary variable and then atomically swap it in to the shared entry,
instead of overwriting the shared pointer and then progressively building
the array while the cache is in a broken state.

Replace the const_cast with a mutable, since the const_cast is what made
me realise something fishy was going on here. Also make the return value
const, since it points to shared memory, so callers should not modify it
without access to the std::atomic.

Split from D25515 per Bertrand's request.
Closes https://github.com/facebook/hhvm/pull/4067

Reviewed By: @bertmaher

Differential Revision: D1640291
Have BCMarker::operator== take a const BCMarker&.

Summary: It was taking a BCMarker, which wreaked havoc with gdb. Running
a.BCMarker::operator==(b) was returning false, even when
memcmp(&a, &b, sizeof(BCMarker)) was returning 0 (all in gdb).

Reviewed By: @bertmaher

Differential Revision: D1636559
Construct IRBuilder with a BCMarker.

Summary: We're passing in a stack offset and a Func*, this sounds like a BCMarker.

Reviewed By: @ottoni

Differential Revision: D1641166
Silence warning from CMake Policy CMP0026

Summary: get_target_property(... LOCATION) is deprecated and
throws a warning as of CMake 3.0.0.  Switch to using the generator
expression $<TARGET_FILE> instead to silence the warning.

Reviewed By: @JoelMarcey

Differential Revision: D1641895