Require LLVM codegen when EvalJitLLVM >= 3

Summary: This will help ensure people don't accidentally regress the llvm
backend by introducing punts in code we already support.

Reviewed By: @jasone

Differential Revision: D1673489

Signature: t1:1673489:1415737138:2ea17521b6d3c917b92dd149102e5c693b7068d9
Add support for syncpoints and exceptions in the llvm backend

Summary: Both are fairly straightforward and mostly involve parsing information
out of the data sections emitted by LLVM. As far as I can tell, LLVM just emits
the exception tables into memory we give it and doesn't actually register any
of the exception information with the runtime. This means we can allocate all
data sections it asks for with malloc and free them once we extract the
information we need, rather than leaking them in globalData.

Reviewed By: @maksfb

Differential Revision: D1678102
Remove a comment that predates removing analyze()

Summary: This seems to be saying TransProfile + GuardRelaxation didn't work in
analyze().  Should we keep the EvalJitRegionSelector check or not?

Reviewed By: @swtaarrs

Differential Revision: D1651369

Signature: t1:1651369:1415219871:6c35b3497972db8290a9a1cdf98853db0ff59df4
Rename vasm's end instruction to fallthru

Summary: It conflicts with non-member use of end() on STL-style containers.

Reviewed By: @edwinsmith

Differential Revision: D1669397

Signature: t1:1669397:1415620123:5a835c9db286c4f752b75788202bc874265376dc
Simplify ArrayGet on constant arrays

Summary: I saw an IR snippet doing ArrayGets on an array we knew was static.
(Hhbbc also knew, but doesn't constant propagate anything out of minstrs, and
that'd be harder right now.)

Reviewed By: @markw65

Differential Revision: D1654328

Signature: t1:1654328:1414891382:4baf7e0dc880be238aa17b7d1eb43a5cf00f12bc
Fix some bugs in intersecting specialized types

Summary: If you intersect two arrays of different kinds you should always get
bottom, so it was being unnecessarily pessimistic.  If you intersect two
non-exact specialized classes that could be interfaces, you can't return bottom
unless you prove that there's no mutually derived classes.

Reviewed By: @swtaarrs

Differential Revision: D1669253
Record init time in log output.

Summary: Just as a convenience.

Reviewed By: @jwatzman

Differential Revision: D1679360

Signature: t1:1679360:1415908403:24729f009b26c52c902696f6b7f1740f34fced4d
Fixing Memcache::get() returns NULL for an empty string problem

Summary: Fixes #4175
Closes https://github.com/facebook/hhvm/pull/4232

Reviewed By: @JoelMarcey

Differential Revision: D1676834

Signature: t1:1676834:1415918294:5a1c59a5a478e9085cc4687475ae2c58944bbb14
Better error message for invalid array subscript

Summary: Both `[` and `{` are valid for array subscripting in PHP. Hack
only supports the former, but we can give a somewhat better error
message on the latter.

Fixes https://github.com/facebook/hhvm/issues/3407

Reviewed By: @int3, @elgenie

Differential Revision: D1679267

Signature: t1:1679267:1415912784:9726d5b7c9a36c57719ae230066d0da10d2bc705
Fix a couple of tests

Summary: One didn't work if you borrowed a machine that someone else
occasionally ran tests on (due to permission issues), another doesn't
work on internal FB build servers which have an older libxml.

Reviewed By: @paulbiss

Differential Revision: D1680048

Signature: t1:1680048:1415916748:8fbddd359d35672b03b697de4eb10e527e144143
Add loaded file name to Scuba.

Summary: This allows us to track how many people are loading which states +
how long it takes for them to do that compared to starting from a fresh state

Reviewed By: @jwatzman

Differential Revision: D1679348

Signature: t1:1679348:1415908364:a7f0c3a1982db5cb806f9e5c5221d1aa682493af
Have hh_client invoke the startup script with the right options.

Reviewed By: @jwatzman

Differential Revision: D1674800

Signature: t1:1674800:1415836637:4bf77bd7e2341d401a21b60b5a541c4b39e8115d
Cleanup sock and pid files on graceful exit from FastCGI

Summary: Notify the HTTPServer that we are terminating so that it will remove any pid
file, additionally cleanup unix socket file if necessary.

Fixes #3327

Reviewed By: @bertmaher

Differential Revision: D1672110

Signature: t1:1672110:1415903725:5ea192140219b9e1bc3c32a2c5ed978006987f86
Remove bad assert from BaseVector::data()

Summary: BaseVector::data() had an assert that was checking if m_data[0] was a Cell.
This assert is bogus because the Vector could be empty, and in such cases
it is not valid to dereference m_data[0]. It turns out that this assert was
redundant anywhere because the only place that uses BaseVector::data()
already asserts that each element in the Vector is a Cell (also, there are
a bunch of asserts throughout ext_collections that make sure that each
element is a Cell).

Reviewed By: @elgenie

Differential Revision: D1680393

Signature: t1:1680393:1415922724:0331eb4ed100231a24517cf4870736a07f56e275
htmlentities() should output valid ISO-8859-1 characeters to appropriate entities

Summary: Right now, when we call `htmlentities()`, we only output appropriate entities for
any ISO-8859-1 character below 0x80. Anything above, we output the empty string "".
But there is a range from 0xA0 to 0xFF that can have entities that should be output as
well.

Fixes #2186

Reviewed By: @paulbiss

Differential Revision: D1675303

Signature: t1:1675303:1415936937:4d6f5b6d74e80d7a527940b5308e4c0c9926bb24
Add missing argument to DOMXPath::{query,execute}()

Summary: These functions now take a third argument to bypass automatic context
registration. The fix is basically exactly what PHP 5 does with this argument.

Fixes #2810

Reviewed By: @JoelMarcey

Differential Revision: D1680720

Signature: t1:1680720:1415940166:d499bfa1576bfbdd54465b41f32a37fdca4e784c
Skip unreachable blocks in IRBuilder::reoptimize()

Summary: Unreachable blocks may contain instructions with inconsistent operand
types, but such blocks may not be eliminated until reoptimize turns
conditional jumps into unconditional ones.  So we need to make
reoptimize work in such scenarios, and this diff accomplishes this by
keeping track of which blocks are reachable during reoptimize, and
then skipping the unreachable ones.

I was able to repro this with the new test case, but I had to hack the
profile-based ArrayGet specialization to stress test it.  So I'm
adding a runtime option to for that.

Reviewed By: @jdelong, @alexmalyshev

Differential Revision: D1680327
Shrink StringData::m_cap to 24 bits to make room for kind

Summary: Use the packedCap trick to reduce StringData's cap field.
Fixes a bug in smartMallocSize() where the debugHeader recorded
the requested capacity instead of the returned capacity.

Reviewed By: @jdelong

Differential Revision: D1646907
Add zlib.output_compression ini option

Summary: We had `zlib.output_compression_level`, but that should only be used if
`zlib.output_compression` is set to "On". Add this option.

This doesn't perform the gamut of the option, but it is a start. I have a TODO
to add more functionality for the option.

http://docs.hhvm.com/manual/en/zlib.configuration.php

Fixes #3744

Reviewed By: @paulbiss

Differential Revision: D1677334

Signature: t1:1677334:1415931492:a151c55a03ccb03b83efc54107f598e9b01150e3