Fix a frame state tracing bug I introduced

Summary: If you turn tracing up too high now you get folly::format exceptions.

Reviewed By: @bertmaher, @alexmalyshev

Differential Revision: D1708102

Signature: t1:1708102:1417061596:3674837cec575ff003de9845fe73f02139d5d58e
Revert "Move all inlining work to translateRegion()"

Summary: This reverts commit 7a17649306b003c961a86e9e33b5bb92e979192e.

Perflab says it broke lots of things.

Reviewed By: @jdelong

Differential Revision: D1709049

Signature: t1:1709049:1417208800:3f72a2a4d47968d7db9ae906c71ab28c54929041
Fix predicted local type invariant failure (test/slow/ext_collator/1810.php)

Summary: It looks like this test is failing in trunk?  This fixes it, and is
definitely a bug fix (because we might only have Gen for the local now even if
we had a LdLoc that knew more earlier, so taking this prediction could lead to
an invariant violation of exactly this sort).  I didn't think through all the
details of why exactly it failed though.

Reviewed By: @markw65

Differential Revision: D1708111

Signature: t1:1708111:1417210961:f0d864b7a9cd844d83f21411e050079150f3255b
Lazy-init freelist headers

Summary: It's a clear regression to initialize a free header every time we
push onto the freelist (a few alu operations plus an additional store),
so do it lazily before parsing the heap.

This effectively moves the cost from the mutator to the allocator,
and the amortized cost depends on how often we parse the heap instead
of how often we free objects.

Reviewed By: @jdelong

Differential Revision: D1709018

Signature: t1:1709018:1417204521:321b84f8a86d857481d5487a0b22acff08dac47b
^^cmake phase never completed
Improve the property accessing API of Class.

Summary: Affects Class methods getDeclPropIndex(), findSProp(), getSProp(), and
zGetSProp(). They were taking two boolean arguments by reference and setting
them: visible and accessible.

visible is unneeded. It was set iff the property existed, but that could be
checked against the return values of those functions (either "value == nullptr"
or "slotIdx == kInvalidInd").

That left returning a some representation of the property (either a Slot,
TypedValue*, or RefData*) and the accessible flag, which I turned into a struct
templated on the property.

Reviewed By: @jdelong

Differential Revision: D1708784

Signature: t1:1708784:1417282914:1782c28704245b9b2a50520936dcabc155e13a77
Fix for issue when file or directory name is "0"

Summary: If name of file or directory is `0` - this name shouldn't be removed in `::resolveDotDots` method.
Solution is to use `strlen` function as callback in `array_filter` - it will works similarly, but keeps values of 0 (zero).

Likely, should be backported into 3.3 LTS branch (I can add another pull request against 3.3 branch if this is OK).
Closes https://github.com/facebook/hhvm/pull/4266

Reviewed By: @fredemmott

Differential Revision: D1687469

Signature: t1:1687469:1417307697:14f3413565305ff2289b271c91b188c28bdc688f
Remove a warning from msg_receive function

Summary: Remove a warning from `msg_receive` function for consistency with php:
https://github.com/php/php-src/blob/a770d29df74515197c76efdf1a64d9794c27b4af/ext/sysvmsg/sysvmsg.c#L377-L379
Closes https://github.com/facebook/hhvm/pull/4325

Reviewed By: @fredemmott

Differential Revision: D1700537

Signature: t1:1700537:1417318587:0560094192f76da223b5c379bd9da929f28f1b1e
Make options with dashes show correctly on option error.

Summary: There is a bug in at least Boost 1.54 where options with dashes `-` in them are
not handled correctly. Basically all but the last substring after the last dash
is returned.

See: https://github.com/facebook/hhvm/issues/2864

So our error string when an option had an invalid argument was just plain wrong.
Since we can't fix boost very easily and are not planning to upgrade yet, we
workaround it with this fix.

Fixes: #2864

Reviewed By: @paulbiss

Differential Revision: D1681063

Signature: t1:1681063:1416505169:7664cff3c23b8fdfec995c54897eb276d44f92d6
Match PHP5 implementation of SoapVar class

Summary: Get rid of NativeData since PHP5 treats this as a glorified
stdClass object.

Closes #1515

Reviewed By: @JoelMarcey

Differential Revision: D1696892

Signature: t1:1696892:1416934277:ddaa1943a6e2c6a475fb55c1523a073f890365be
Fix repo-schema again

Summary: Actually use the command, rather than the variable name

Reviewed By: @edwinsmith

Differential Revision: D1710008

Signature: t1:1710008:1417456845:d34d21f651f2b984f54472709701c869c6a58bc6
Add support for `fallback' to vasm-arm

Summary: code-gen-arm can generate this instruction, which just aborts the
process right now.

Reviewed By: @bertmaher

Differential Revision: D1707290

Signature: t1:1707290:1417041764:d0fb4e0e1611af800add18984946b04e9c018dfc
Remove IRREGULAR_INSTRS and PSUEDOINSTRS

Summary: Normalize how everything calls hhbc-translator, so we can generate it.
Some of the blockers to doing this earlier are gone (inlining is no longer in
ir-translator), so most of this is just straight-forward; the one bummer is
some bits of information are still only available in NormalizedInstruction
right now, so we have to make HhbcTranslator have access to it on each
bytecode.  We can gradually weed that out later.

Reviewed By: @swtaarrs

Differential Revision: D1701003
Use OPCODES instead of REGULAR_INSTRS

Summary: Now that everything is supported we don't need a separate macro to
generate this.

Reviewed By: @alexmalyshev

Differential Revision: D1701007
Remove IRTranslator

Reviewed By: @alexmalyshev

Differential Revision: D1701009
Automatically look up Ids for AA and SA args

Reviewed By: @alexmalyshev

Differential Revision: D1701011
Remove translator-instrs.h, expand macros at only remaining use site

Reviewed By: @swtaarrs

Differential Revision: D1701013
Move interpone-related code to hhbc-translator-interpone.cpp

Reviewed By: @swtaarrs

Differential Revision: D1701443
Make HhbcTranslator not (effectively) a global variable

Summary: Clean up stuff slightly, so that HhbcTranslator's lifetime is
associated with a lexical scope.  Also fix a few easy things that were members
of Translator for no apparent reason.

Reviewed By: @bertmaher

Differential Revision: D1702328

Signature: t1:1702328:1416944361:d42a042f42e1fed4817ce14d878eb2adc463a516
Make translateRegion not a member of a Translator::

Summary: This seemed easy enough but I'm leaving the rest of mcg and tx alone
for now (I'm trying to de-monolithify HhbcTranslator, not these ;)

Reviewed By: @alexmalyshev

Differential Revision: D1702341

Signature: t1:1702341:1416879534:b6692222517fa5ebf68ddb085f7695a00d7cb4ea
Move MInstrEffects to its own .{h,cpp}

Reviewed By: @alexmalyshev

Differential Revision: D1707003

Signature: t1:1707003:1417041990:52bbdbd615384a1508e1193ef9e0fb6b14cb142f