Refactor some state information and introduce a function state. Move properties state out of State.

Property info now only lives on ClassAnalysis and once a fixed point is reached is moved to the Index. SImple definition of a FuncState, more to come...

Reviewed By: @jdelong

Differential Revision: D1171632
Set static property initializers in 86sinit using InitProp

Similar to InitProp for 86pinit.

Reviewed By: @jdelong

Differential Revision: D1161451
Analyze classes with 86pinit methods

Reviewed By: @jdelong

Differential Revision: D1158455
Fix hhvm build

curOpd was renamed to curPhysLoc and D1161451 re-added a use of curOpd

Reviewed By: @bertmaher

Differential Revision: D1173648
Fix the 'stop old HHVM' code path

Two problems.  1) HHProfServer was starting too soon, before this instance got a chance to takeover or kill the old process.  2) the /stop code path didn't work, because it wasn't passing a well formed URL or sending the access token.

Reviewed By: @scannell

Differential Revision: D1172291
Analyze classes with 86sinit methods

Reviewed By: @jdelong

Differential Revision: D1161488
Do not attempt to optimize/infer HNI methods

They have no body, so there's nothing to operate on.

This also removes a bug wherein I equated DataType::KindOf*
with Type::KindOf* which are not, in fact, the same enum values.

Closes #1703

Reviewed By: @markw65

Differential Revision: D1158062
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