Add functions for finding loop headers, and for inserting loop-preheaders.

Summary: Refactors the loopVisit function into a BackEdgeVisitor helper struct.

Reviewed By: @ottoni

Differential Revision: D1541026
Fix bogus EOF in bzip2

Summary: Check for EOF the way PHP-NG's bz2 extension does.

The C library is:
 - returning fewer bytes than requested
 - setting BZ_STREAM_END (if I use bz2_bzRead() instead of bz2_bzread()...
   ya rly...

When there's still data left. A read after the C library claims 'EOF' works fine.

I'm finding this by tar jcvf'ing hphp/test/frameworks/vendor/ and trying to extract with PharData (or __SystemLib\TarArchiveHandler) - but I can't get a more isolated repro case. I suspect there's multiple bzip2 streams in the file, but catting together multiple .bz2 files doesn't create this problem. I've also tried bunzip2 + bzip2ing it, and it still has the problem, so it's not something weird about how tar is bzipping.

Reviewed By: @ptarjan

Differential Revision: D1560065
Add special error for unset in strict mode

Summary: Folks keep trying to add this. Let's be more specific here.

Ref. https://github.com/facebook/hhvm/issues/2711

Reviewed By: @elgenie

Differential Revision: D1531155
Update NEWS for T-Pain

Reviewed By: @ottoni

Differential Revision: D1560117
Export treadmill.age counter

Summary: That's it.

Reviewed By: @​tracelog

Differential Revision: D1559739
Always populate m_constraints.typeSrcs for LdLocs added by insertLocalPhis

Summary: It wasn't adding an entry into the m_constraints.typeSrcs map when the
set was empty.

Also, dump the unit in IRBuilder::constrainValue if
m_constraints.typeSrcs doesn't have an entry for an instruction.

Reviewed By: @bertmaher

Differential Revision: D1559672
stop breaking ubuntu 10.04

Summary: A partial revert of https://github.com/facebook/hhvm/pull/3591 . I used `FindLibZip.cmake` as a template. I think for system defined libraries the old code was good enough, but if the thing is only installed in the CMAKE_INCLUDE_PATH then the macro@​radford was using won't work.

Reviewed By: @JoelMarcey

Differential Revision: D1560119
Admin command to forcibly madvise away APC prime file data

Summary: I think that perflab's RSS stats aren't very meaningful because we
have the APC prime file still in memory.  With this admin command we can get
rid of it, hopefully, at the right point in the pipeline to fix RSS
measurements without perturbing perf.

Reviewed By: @jdelong

Differential Revision: D1560265
Revert "Custom path to the installed folder"

Summary: I'm torn on this so want to use this for discussion. Should the INSTALL_PATH namespace where we get `/etc/hhvm/php.ini` from? I'm assuming it was added for someone on those other systems, but I do know that on apple things are read from `/etc` without namespacing to `/usr/local` so I'm assuming the rest of that is wrong. Thoughts?

Fixes https://github.com/hhvm/packaging/issues/71

Reviewed By: @paulbiss

Differential Revision: D1560037
Fixed ReflectionMethod debug info not compatible with PHP

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

Reviewed By: @ptarjan

Differential Revision: D1495043
Remove remaining internet dependencies for test runner

Summary: Requires use of the --cache-dir option

Reviewed By: @JoelMarcey

Differential Revision: D1560918
Fix segfault when calling hash_final twice

Summary: context is freed in hash_final. The second call tries to use the freed variable.

Fixes #3741
Closes https://github.com/facebook/hhvm/pull/3771

Reviewed By: @fredemmott

Differential Revision: D1560874
Fix spelling errors in comments.

Summary: Spelling errors are hard to ignore...

Reviewed By: @jwatzman, @elgenie

Differential Revision: D1560046
Remove Toran Proxy support

Summary: We're not using it, as it doesn't cache enough to improve our reliablity. Replaced with --cache-dir.

Reviewed By: @JoelMarcey

Differential Revision: D1561742
Make Framework::installDependencies() final, add <<Override>> where appropriate

Summary: The new hooks mean there's no need to override installDependencies(), and implementing the hook makes it clearer what's going on.

Add <<Override>> to isInstalled just for future safety.

Reviewed By: @JoelMarcey

Differential Revision: D1561812
Reserve / fix error codes.

Summary: Reserve error codes for an upcoming commit.

Also fix one instance of overlapping error codes.

Reviewed By: @elgenie

Differential Revision: D1563423
Tune pcre cache lookup

Summary: In the AHM for pcre cache, optimistically check for
StringData pointer equality before doing a full
comparison.

Reviewed By: @edwinsmith

Differential Revision: D1557919