Access PhysLoc by src/dst index rather than SSATmp.

Right now, CodeGenerator functions get PhysLoc indirectly
by: reginfo[inst.id][inst->src(i).id].  There's no need for
the SSATmp being the key in the second dimension, and its
more expensive anyway since the second map is sparse.
This diff refactors RegAllocInfo so the second dimension
is an array indexed by src or dst index:
reginfo[inst.id].src[i]
reginfo[inst.id].dst[i]

The actual PhysLocs are stored internally in one vector
per instruction (dsts, then srcs).  Now, both dimensions
are vectors, so lookups should be faster. It was necessary
to plumb PhysLocs through several helper functions, but
also it eliminated accessing SSATmps in several cases.

This diff also prepares for per-arch temp operands:
reginfo[inst.id].tmp[i]

Reviewed By: @swtaarrs

Differential Revision: D1173989
Allow streams in move_uploaded_file

Allow streams in move_uploaded_file

Closes #1801

Reviewed By: afrind

Differential Revision: D1173932

Pulled By: @scannell
Add XHP and Experimental syntax to unitMd5

```
cat test.php
<?php

class :foo {
}
```

Before:

```
~/fbcode/_bin/hphp/hhvm/hhvm -v Eval.EnableXHP=false test.php
HipHop Fatal error: syntax error, unexpected ':' in /home/fredemmott/test.php on line 3
[fredemmott@Alite404Exception ~] ~/fbcode/_bin/hphp/hhvm/hhvm -v Eval.EnableXHP=true test.php
HipHop Fatal error: syntax error, unexpected ':' in /home/fredemmott/test.php on line 3
[fredemmott@Alite404Exception ~]
```

After:
```
[fredemmott@Alite404Exception ~] ~/fbcode/_bin/hphp/hhvm/hhvm -v Eval.EnableXHP=false test.php
HipHop Fatal error: syntax error, unexpected ':' in /home/fredemmott/test.php on line 3
[fredemmott@Alite404Exception ~] ~/fbcode/_bin/hphp/hhvm/hhvm -v Eval.EnableXHP=true test.php
[fredemmott@Alite404Exception ~]
```

Reviewed By: @ptarjan

Differential Revision: D1171280
Remove handling for 4-byte DataType

DataType is a one-byte enum regardless of TypedValue
layout.  Remove some old code that handles other
sizes.  Kept some static_asserts to make sure it
keeps working.

Reviewed By: @dariorussi

Differential Revision: D1173509
s/success/invoked in user-file.cpp

"success" really means whether we invoked the stream function or not, not whether the stream function succeeded, so rename the variable to make the code easier to understand.

Reviewed By: @markw65

Differential Revision: D1175536
Fix folly format string

Reviewed By: @bertmaher

Differential Revision: D1174604
Don't let Vectors grow to ridiculous sizes

You could crash the VM by passing a huge number to Vector::resize. Let's
put a stop to that.

I looked at Map and Set, and they both check resize arguments already.

Reviewed By: @markw65

Differential Revision: D1174836
Allow join expressions to be less verbose.

When joining entity tables with association tables, it is obvious which columns have to match for two tuples to join up. The C# syntax for joins is too verbose in such situations. The syntax is now enhanced to make the on condition optional. The table alias is now also optional, since there can now be situations where no explicit references exist to the columns of a table.

Reviewed By: @paroski

Differential Revision: D1169047
Rename CmpI IR instructions to CmpInt.

mechanical rename.

Reviewed By: @bertmaher

Differential Revision: D1175557
Use wait handle types for AsyncAwait and related opcodes

Track the type that will come out of an await using WaitH<T>
types.  This requires some weird additional specification rules to
make things fair (specifically, you aren't allowed to do anything with
AsyncESuspend's output except return it), but probably these will go
away once we have suspendable bytecode.

Reviewed By: @dariorussi

Differential Revision: D1166844
Spec/hhbbc change: AsyncESuspend only captures (and unsets) named locals

It only copies named locals into the suspended async
function.  The behavior looks like it dates back to continuations, and
may need to change?  I couldn't think of a case where we currently
would emit an AsyncESuspend while an unnamed local is still needed,
but it hit some assertions for type-inference if you suspended in a
string switch (uses an unnamed local that's live across the cases).  I
suppose if nothing else with a string switch you could observe that
the destructor of an object ran earlier iff the function was
suspended, and if we use unnamed locals for more things this could
bite us later ...

Reviewed By: @dariorussi

Differential Revision: D1166848
Require HNI property types to be accurate

We want HNI to be more friendly to static analysis than the
old idl-based extensions (which it is), but currently we have an issue
in any of the extensions that are using private resources set by C++
code.

When you set private properties from C++, we can't see the type being
set via static analysis.  Generally speaking we just need to keep
track of all the places C++ code may want to affect private properties
of any php objects, HNI or otherwise.  Also generally speaking we
should avoid doing this where it's possible.

So, require that HNI property type annotations are actually "correct",
and must include any types that could come from C++.  We can add
assertions about this after HNI has an abstraction layer for accessing
object properties, but for now there's just some assertions in hhbbc.

This diff contains some small changes to HNI properties to make them
actually subtypes of what we'll infer right now---they were mostly
correct already.

Reviewed By: aravind

Differential Revision: D1167925
Work around ostensive gcc 4.7.1 lambda bug

HHBBC fails in the automated tests for 4.7.1.  It comes down
to this lambda apparently not really capturing "pre", so it does a
decrement even when it should've been an increment.

Reviewed By: @elgenie

Differential Revision: D1168020
Split up test/run's main() into a few more subroutines

The sailboat was messing up brace matching in emacs, which
made the nesting too hard to understand.  Use functions because
removing the sailboat is out of the question.

Reviewed By: @ptarjan

Differential Revision: D1168840
Change hhbbc's parse phase to support both SourceLocTables and LineTables

When running hhbbc in the command line mode, the UnitEmitters
we feed it won't have SourceLocTables in them.

Reviewed By: @dariorussi

Differential Revision: D1169959
Further increase margin in strtotime_leak.php

This test still fails in an opt build with hhbbc and the JIT
on (to perturb the smart allocator).

Reviewed By: @edwinsmith

Differential Revision: D1171559
Emit mergeOnly units so their pseudo-main still returns what it should

Right now for mergeOnly units, we set a TypedValue in
metadata for what the pseudo-main should return, but emit a
pseudo-main that returns 1.  This is causing an issue for hhbbc if you
want to re-examine the bytecode.  (We could teach it to read from the
mainReturn TypedValue, but that seems more complicated.)

It is working when you don't do hhbbc as a second independent step,
because Option::UseHHBBC turns off all the merge only logic in the
emitter (except for systemlib).

Reviewed By: @jasone

Differential Revision: D1171376
Enable "FuncFamily" option by default

Over several runs its been noise-to-maybe-slightly good in
perflab.  It's not entirely clear what was making it a regression
initially (although assert type filtering must've helped some).  The
only actually green metric when you turn this on is branches/branch
misses.  Also rename the option, since it reads weird for a -ffoo flag
to say "enable" or "no-enable".

Reviewed By: @dariorussi

Differential Revision: D1171581
Simple local DCE for hhbbc

I wanted to make sure backward algorithms that needed access
to types will work somehow, so I figured trying this was a way to
check how it might turn out.  It seems like it's not a big deal* to
just propagate the states we got from the forward analysis to each
instruction, so we can see them while going backwards.  This prototype
catches very little dead code in www, however.  I think implementing
global DCE so we can remove stores to locals might find a bit more
(and probably would use this as part of it), but this is probably
enough to know this isn't likely to matter very much yet.

Also, this seems like it's really time to split up
abstract-interp.cpp.  All this code should be in its own file.  (I'll
do that soon.)

*: I was worried about compile-time perf, but probably in part due to
@dariorussi taking PropStates out of there it is apparently very
reasonable to copy States everywhere.  (This pass only adds 3seconds
in opt to the time taken building www.)

Reviewed By: @dariorussi

Differential Revision: D1174688
Split up abstract-interp.{h,cpp} into a few modules

Most of it went into interp-state.h and interp.h (I think
probably it will want to split again someday), the analysis steps are
in analyze.cpp, and optimize.cpp contains all the optimization stuff
(will likely be split up again later, but for now isn't too big).  No
real other changes except adding consts in a few places, and slight
documentation changes.

Reviewed By: @dariorussi

Differential Revision: D1175166