Add folly experimental components
Make Block the main instruction container in HHIR

Instead of Traces holding a non-intrusive list of instructions,
have Blocks own instructions with an efficient intrusive list
so each instruction can only be in one block at a time.

Traces hold a list of blocks (which hold instructions); the overall
instruction order isn't changed.  However, use the Block api to
insert/remove instructions.

IRInstructions and Blocks point to their "parent" but the accessors
are named specifically (IRInstruction::getBlock and Block::getTrace).

Branches refer to a Block instead of a LabelInstruction.  Fields
of LabelInstruction were moved to Block, and LabelInstruction is
removed.  IRInstruction is now nonvirtual.

Several loops over trace->getInstructionList() were modified to
be nested loops over blocks, then instructions.

Removed the union of SSATmp[*|**] for destinations; instead, use
SSATmp* m_dst, which points to 0 or more destinations.  The
opcode still dictates whether the count must be 0, 1, or N.
Looping over multiple destinations now typically uses SSATmp&.
Renamed typedef SSARange to SrcRange and added DstRange.

Branch-patching state was moved out of LabelInstruction (or Block)
and is private to CodeGen now; each block has an associated patch
list.
Track predecessors of "join" blocks so we can follow use->def chains

In order to find the srcs that reach a given DefLabel destination,
we need to know the Jmps that reach the label.  This diff tracks them
in a singly linked list which stays up-to-date when setTaken()
is called.

Just to exersize the ability, I changed the prettyprint output
to print "phi" pseudio-instructions.  These don't exist in the
actual IR but its helpful to see them in the dump output..
Add a per-block likely/unlikely hint, use it for code placement.

Each Block has a new Likely/Unlikely/Neither hint that can be set
any time.  At codegen time, unlikely blocks are put in astubs.
Codegen takes care of inserting branches to/from them if necessary.

Updated the pretty-printing code to show AStubs code after each
block instead of after each trace.

Refactored the instructions that emit code into both a and astubs
so they work when a == astubs, by using a new unlikelyIfBlock
helper.
Add a top-level catch to RUN_TEST

A test was hanging on to the result of
std::string::c_str() past the lifetime of the string and then throwing
an uncaught exception.
This diff adds a top-level catch block to RUN_TEST to prevent things like
this from killing the test binary in the future.
Fixed 2 HHIR bugs that were causing crashes.

Fixes HHIR bugs that were causing perflab crashes: guards on
class types and tvBox.

We were ignoring stack guards on class, which was causing the IR to
lose track of types for classes on the stack and causing assertion
failures. Fixed by making class stack type guards into stack type
asserts.

tvBox was not returning the right value, causing VGetS to crash in the
IR.

Changed 1 test and added another to cover VGetS in verify_quick_hhir.
Use init_null_variant instead of null_variant

I'm experimenting with ArrayInit::add() and it behaves strange with null_variant
HHIR: Fixed potential problems with essential instructions

Fixed a few instructions in the HHIR instruction properties
table related to instructions that should not be moved or eliminated
by dead code elimination. Also made sure codegen can handle essential
instructions whose result are not used (i.e., instructions whose
destination registers are InvalidReg).
Fixed hphp/test/vm/static_sprop2.php test.

The test hphp/test/vm/static_sprop2.php needed a filter rule
file for a file path in its expected output. This was breaking tests.
RuntimeOption to disable TLSv1.2 in HPHP runtime, not in OpenSSL

Introduces a new server runtime option TLSDisableTLS1_2,
which is off by default. When on, it disables TLSv1.2
in the two places we curl_init().
Add constants asociated with idna functions. Port applicable tests from Zend.

The Zend versions of idn_to_ascii, idn_to_unicode and idn_to_utf8 take parameters whose valid values are defined by predefined constants and whose error codes correspond to
predefined constants. This change adds those predefined constants to hiphop. It also ports two of the applicable unit tests from the Zend code base to hiphop.
Reduce the number of copies of certain data

On the decompression+deserialization path one useless copy will be created in case the data is not compressed, but serialized. Uncompress always returns a platform native string, but if the data was serialized this platform string is not needed, since it will be unserialized into platform variant anyway.
This can be improved by unserializing the data directly from mc_msg_t in case it was not compressed.
Always generate Type::Arr instead of Type::StaticArr

Temporarily avoid generating static array to un-break PerfLab
Move assembly address info into AsmInfo

IRInstruction and Block have asmRange fields to record where
their assembly code got generated, but it's only used for
pretty-printing.  Do it with a side structure instead, indexed
by block (for block ranges) or instruction.

Gave each instruction its own range, to simplify pretty-printing.
Modified the pretty-printer to also print code following the last
instruction in a block but which is still in the block's range
(e.g. a jump to the next block)
Make hphp.y closer to zend

I'm going through the zend parser file and they are quite similar to ours:

https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y

It seems having our parser file being closer to theirs would help us keep parity. I also prefer less copy and pasting when possible.
script to import zend tests

I often want to make sure we are close to parity with zend so
importing their tests seems like a good idea. I used this for an
upcoming diff and it worked out well.

I just tried this on all the closure tests and it needs a bit
of hardening. It worked well though :)
make debug_backtrace go through ignored functions

We don't display the stack frame for ##isNoInjection()## functions, but the backtrace does set the previous call lines wrong.

This came up when I made the Closure::__invoke to be hidden, but the line numbers were wrong.
allow (new Foo)->bar()
Put the body of a closure on the class intead of in the __invoke of the closure

Instead of having the body of the closure be in the ##__invoke()## on the ##Closure## class, instead we make an anonymous function on the real class and put the body there. The signature for this function is:

  function methodForClosure$1234($arg1, $arg2, ..., $use1, $use2, ...)

and then ##__invoke## now just takes all the params that were passed to it, puts them as the first args to the anonymous function, then takes all the use variables it had saved up and passed them in as the next params.

I tried to not have an ##__invoke## at all, but I ended up basically doing the same parameter and use var repacking in iopFCall (and would have had to do it in x86 code too). I opted for doing the rejiggering in bytecode. If I did it in raw PHP I think it would have been much slower with many ##func_get_args()## and array operations.
handle reference closures

Handle a closure that returns by reference.