Add a BreakTrackHint hhbc instruction

HHBBC sometimes infers that functions return Bottom
(i.e. infinite loop or always throw).  In this case, after the FCall,
I want to insert a String "static analysis error"; Fatal sequence, but
that sequence ends up included in the Tracelet that does the FCall.
One way to break it is to have the analyze pass / region selectors
recognize this pattern, but it seems that this might come up in other
contexts where ahead-of-time analysis may have good reasons to suggest
tracelet breaks (e.g. to avoid our "double tail" problem on control
flow diamonds, or maybe StaticLoc?).

Reviewed By: @swtaarrs

Differential Revision: D1029595
Another bytecode spec tweak for WFooIter instructions

I messed up how they treat %4 in the last update.

Reviewed By: @dariorussi

Differential Revision: D1029665
Add support for more assert types opcodes; fix assert stack offsets

Option types, static string and static array, and specific
class types.  And AssertTStk was not correctly computing the Location.

Reviewed By: @swtaarrs

Differential Revision: D1029072
Add a NopDefCls opcode, for use with always hoistable classes

Every PreClass structure contains an Offset pointing usually
into the psuedo-main, to the DefCls for that PreClass.  For closures
it points to the opcode after the CreateCl (perhaps unintentionally?).
If a merge-only unit fails to define a class, it "fakes" like it was
running the psuedo-main, and sets PC to this offset before raising the
error.  Right now, a Nop is placed in the bytecode for this.  This
changes things to have a new instruction for this case, so that static
analysis of the bytecode can see why the Nop was there.

Reviewed By: @edwinsmith

Differential Revision: D1029696
Pass HardTypeHints=0 for slow/invalid_argument/1383.php in RepoAuthoritative

This is another test that recovers from VerifyParamType,
which we don't handle correctly in RepoAuthoritative mode (by design).
Modify it so it will SEGV without the correct flags, and then pass
them.

Reviewed By: @markw65

Differential Revision: D1019278
Initial HHBBC commit (prototype of bytecode optimizer)

Reviewed By: @swtaarrs

Differential Revision: D1025662
Allow multiple exit blocks for Jump optimization

The main trace can have multiple exit blocks. Allow jump
optimization to work with such traces.

Reviewed By: @jdelong

Differential Revision: D1031384
parity: correctly prevent 'self' and 'parent' user classes

Verily, case sensitive and insensitive comparisons are not
 the same. Zend knows this too: http://codepad.viper-7.com/YmAmQk

Reviewed By: @jdelong

Differential Revision: D1031067
fix varargs for mongo

`sysdoc.php` didn't handle the varargs annotation

Reviewed By: @aryx

Differential Revision: D1030692
Introduce ProxyArray

Mutation operations can reseat the original array. In zend land, this isn't the case so we need a wrapper for the original array which will change its internal pointer during any reseating operation.

I verified that every method was implemented in this by removing the inheritance and making sure there were no unknown methods in the big table.

Reviewed By: @jdelong

Differential Revision: D1009352
tools: some pretty printing changes in gdb helper

* __doc__ for the module
 * Make RECOGNIZE regex part of the process of defining a pretty-printer
 * remove ##lambda x: bar(x)##

Reviewed By: @ptarjan

Differential Revision: D975674
Implement ARM closure prologues

I left this unimplemented in my initial prologues diff, just out of
laziness. Time to actually get it done.

This diff contains anecdotal validation for my decision to fork code-gen
instead of trying to put the ARM assembler behind the X64Assembler
interface. Note the AttrStatic part in the closure prologue
implementation -- the x64 version uses a weird quirk of the shrq
instruction that puts the former LSB in the carry flag. Trying to
emulate that in terms of ARM instructions seems pretty foolish.

Reviewed By: @markw65

Differential Revision: D1025972
Fix fallback when optimized translation fails

analyze needs to read live state, which is only
valid if this is the first tracelet in the region. For
subsequent tracelets, fall back to the interpreter.

Reviewed By: @ottoni

Differential Revision: D1028657
don't call autoload handler with an empty class

Zend doesn't do it and we shouldn't either. It was causing an assert in a debug build.

Reviewed By: @markw65

Differential Revision: D1030881
try to fix yii again

It turns out the path is unique to my machine. Try glob.

Reviewed By: @JoelMarcey

Differential Revision: D1031707
Stub out ZipArchive using HNI

ThinkUp fataled on the lack of a ZipArchive class. Well, here it is. Stubbed out.

Reviewed By: @ptarjan

Differential Revision: D1025542
Implement glob:// stream

Adds GlobStreamWrapper, a subclass of Stream::Wrapper.

Reviewed By: @ptarjan

Differential Revision: D1028484
Add stuff missing from the FrozenVector API

Vector had a bunch of methods that were not available in FrozenVector.
Add the ones that make sense given that FV is immutable (e.g. we can't sort it).

Reviewed By: @paroski

Differential Revision: D1014907
Clear out request-local globals at the beginning of each request

The rpc server keeps the ExecutionContext alive across requests to
reduce startup costs. Unfortunately, we weren't clearing $_SESSION, $_GET,
etc... at the beginning of the request. This was making us think that most of
the http headers in most requests were duplicates, and emit a warning where the
option is enabled. It's also generally bad practice to leak this stuff between
different requests.

Reviewed By: @markw65

Differential Revision: D1010456
Record time spent in usleep function.

Added 4 counters to Transport to track how long thread sleeps in various sleep functions
when serving a request. I exported the request through hphp_get_timers.

Reviewed By: @mikemag

Differential Revision: D1021385