Enable ASAN for smart allocator

Summary: Route all smart allocator allocations and frees to malloc for ASAN builds

Reviewed By: @edwinsmith

Differential Revision: D1657895

Signature: t1:1657895:1415905951:b356d1944253bc341fe0ac62751e4f8ba6a7d42a
Disable broken test

Summary: It fails on my devserver 100% of the time. php5.5 agrees
with hhvm's output too.

As far as I can see, it only works if you have LC_ALL set, and
set to some value other than "C" (both under PHP5 and under hhvm).

Reviewed By: @alexmalyshev

Differential Revision: D1684338
Implement a bunch more vasm instructions in llvm backend

Summary: Nothing too interesting here. I added an srem instruction to take the
place of the 'cqo; idiv' sequence since both of those instructions have
hardcoded inputs/outputs. And we force inline freeing of locals regardless of
count to avoid dealing with the weird calling convention of the decref stub for
now. I also removed a few dead vasm instructions.

Reviewed By: @edwinsmith

Differential Revision: D1683817

Signature: t1:1683817:1416055219:a2d3cb4ddda65410eb17663d796512b124ec4895
Detect StringData flat/shared modes using only m_data.

Summary: I want to change the meaning of the m_capCode field, but
the special value of capcode==0 meaning shared, is inconvenient.
Detecting shared by looking at m_data is the same number of loads,
assuming StringData* is already in a register.

Reviewed By: @markw65

Differential Revision: D1684273
Add session initialization check

Summary: Treadmill::finishRequest() crashes while serving static content. We should not do any hphp session cleanup when no hphp sessions are created.

Reviewed By: @markw65

Differential Revision: D1683404
Remove dead method String::lastToken()

Reviewed By: @mclarkelauer

Differential Revision: D1684912

Signature: t1:1684912:1416241984:c73874b9bdc8de6d6b140b00c2a29e65c01965af
Fix comparison between doubles and hex numeric strings

Summary: This pattern already exists in here for ints & hex numerics,
duplicate it for doubles.

Closes #4252

Reviewed By: @JoelMarcey

Differential Revision: D1684171

Signature: t1:1684171:1416259812:b74d9ed40854f0cc3924226a48dc3676e04432d3
Remove nullptr check from SmartPtr::operator->()

Summary: If the null pointer exception fires, it's just as much of
a bug as the sigsegv, so move faster and crash harder.

Reviewed By: @markw65

Differential Revision: D1684957

Signature: t1:1684957:1416244268:3f973856bda05f2009620e065bf80029662cc85b
Add tests for Hdf -> Ini name conversion code

Summary: I thought it was misbehaving on Eval.JitLLVM so I wrote a test to make
fixing it more convenient. It turned out to be doing the right thing all along,
but tests are cool even when they don't fail.

Reviewed By: @JoelMarcey

Differential Revision: D1678147

Signature: t1:1678147:1415842877:93b51c15749ae84e0414fc49a033de0fb68388c1
Member access is `->` followed by lvar, not word

Summary: Minor parser tweak; you're not allowed `-` in variable names.
See comment in new lexer rule.

Also removes a couple unused definitions while I'm at it.

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

Reviewed By: @int3

Differential Revision: D1683429

Signature: t1:1683429:1416113309:0098f9c4715bd9f6e3d5cc5d13d744a24d4c9c22
Fix default SOAP HTTP client

Summary: The root of the problem is properly dealing with 4xx responses.
If exceptions are enabled, we were just throwing out the actual
response and replace it with a generic error body.

PHP5's SOAP client is slightly more clever and looks at the
response content type and/or file magic to see if it looks
xmlish and passes through the body in that case.

Closes #2316

Reviewed By: @paulbiss

Differential Revision: D1682450

Signature: t1:1682450:1416001950:18293dc6819a4430735a4224bb18d18932bd98bf
Code cleanup.

Summary: * Add an mli for Typing_redecl_service
* Remove `fast` as a parameter from functions in Typing_decl_service that do not use it
* Remove unused `make_bucket` functions
* Fix a miscellaneous whitespace errors & outdated comments.

Reviewed By: @jwatzman

Differential Revision: D1684241

Signature: t1:1684241:1416266142:f65659232714517826b64b921db826cd4f5eaa0c
Log the timing of each phase during startup.

Summary: We already do this during rechecking; it would be nice to have
it for startup as well.

While I'm at it, also convert the logging code in the rechecking
phase to use "%!" in the format string instead of invoking
`flush stdout`.

Reviewed By: @jwatzman

Differential Revision: D1684077

Signature: t1:1684077:1416266012:3de89d77b4f606c36aa17bd6597c6f1be075162a
Log the size of the heap during init.

Reviewed By: @jwatzman

Differential Revision: D1684242

Signature: t1:1684242:1416266186:d7745680452316c1f879894633984490535da30e
Add on to the comments in hh_shared.c

Reviewed By: @jwatzman

Differential Revision: D1684251

Signature: t1:1684251:1416266261:4bdf63fb5516de9ee7fb7f8ed82830d131bb94f7
Improve memory_effects, make it talk in terms of abstract memory locations

Summary: Also teaches it to distinguish between may/must information for both
loads and stores, so it can be used for more than just DSE.  Audited all
instructions for effects on array elements and object properties, but a few
cases are still probably overly conservative for now (it's not clear to me that
we'll need to give up on array elements ever for instructions that might
re-enter).  This diff updates memelim to use the new interface.

Reviewed By: @edwinsmith

Differential Revision: D1669287
Don't JIT functions that use $php_errormsg or $http_response_code

Summary: The way we're handling these things doesn't quite work right in all
cases, and adds more complexity.

Reviewed By: @alexmalyshev

Differential Revision: D1679396
Add an analysis module for functions that query information about the IR

Summary: We've been throwing these into simplify.cpp generally, but they aren't
really part of that and I need to add a new one.  This seems to sit on about
the level as mutation.{h,cpp}.  I'm leaving getStackValue over there for now
because I think we want to delete it in the near future.

Reviewed By: @ottoni

Differential Revision: D1680648

Signature: t1:1680648:1416259182:99129ceedba54887041f69405c5d58525e6cc4b4
Add findDefiningBlock to analysis module

Summary: See documentation on the function.

Reviewed By: @ottoni

Differential Revision: D1680737

Signature: t1:1680737:1416003114:5fdceaa8bacbae7b376874618f7e0a42eabe45be
Fix CSE to be aware of where SSATmps are known to be defined

Reviewed By: @ottoni

Differential Revision: D1680740