typechecker: support for abstract final

Summary: * adds parser support for 'abstract final' (but not 'final abstract')
 * introduces a visitor to typing_hint
 * uses the visitor to peer into hints to detect uninstantiable names
   for function params, method params, and typedef and class constraints

Reviewed By: @jwatzman

Differential Revision: D1645753

Signature: t1:1645753:1414707324:42f9d990059f5f50de095ed54c9513907507c51b
Revert "Silence warning from CMake Policy CMP0026"

Summary: This reverts commit https://github.com/facebook/hhvm/commit/5b8c73ab2bfb31d29d52c7bdba28bc58ba1dd066

Reviewed By: @ptarjan

Differential Revision: D1650299

Signature: t1:1650299:1414713932:a1335e585ff36e5686b9b18f6513e5f4995094ba
Fix doubled license headers

Summary: Whoops, this should have been BSD all along.

Reviewed By: @Jo-Con-El

Differential Revision: D1653495

Signature: t1:1653495:1414796786:56815b4b7af2f06e51305a317bccd186e4051ef7
typechecker: more uniformity in 'member not found' errors

Summary: Point to the declaration of the class in which the member
 wasn't found for static member access, as well as non-static member
 access. Reorder the message such that the hint (e.g. did you mean)
 comes immediately after.

Reviewed By: @jwatzman

Differential Revision: D1649908

Signature: t1:1649908:1414794120:0b9e4be0e862f4e13644c2c8e922491c24f0ba6a
typechecker: add imemoizeparam to list of autoimports from HH namespace

Reviewed By: @paroski, @jwatzman

Differential Revision: D1649940

Signature: t1:1649940:1414793639:1e5e851cc50efc8c294b2cedb793210de6082bf7
typechecker: improve instanceof handling

Summary: * disallow `instanceof parent|self|static` outside of class
 * interpret `instanceof parent|self|static` as the decoded
   class corresponding to those constructs, as opposed to
   the mythical <?php class Parent|Self|Static
 * in a condition context, passing a generic `instanceof $x` should
   imply an object ... this is strictly speaking not correct if
   `$x` can resolve to `Traversable`, `Stringish`, or some other
   interface that accepts non-object types, but those are all
   hardcoded into the typechecker and should not be observed

Reviewed By: @jwatzman

Differential Revision: D1649177

Signature: t1:1649177:1414793850:129ec1756e90bd1096320dabf3e550729e412419
Remove several raise_warning()'s from user-file.

Summary: Remove several raise_warning()'s from user-file.cpp to match PHP5 behavior.

Passing vfsstream test cases.
Closes https://github.com/facebook/hhvm/pull/4099

Reviewed By: @ptarjan

Differential Revision: D1647139

Signature: t1:1647139:1414799868:94d01e3bbb60a306eb64d275c7125dcdcbbe2f64
Rename LdGbl/StGbl to LdLocPseudoMain/StLocPseudoMain

Summary: In preparation for having a LdGbl and StGbl that operates on $GLOBALS.

Reviewed By: @alexmalyshev

Differential Revision: D1644200

Signature: t1:1644200:1414528842:67b90e3cd851addda579ef303673dbdcbc2136b0
Make prediction opts deal with arbitrary load/check instructions

Summary: Still peephole sort of thing, but now can do arrays and new load/check
instructions that I'll be adding.

Reviewed By: @ottoni

Differential Revision: D1644693
Fix some problems in Type::operator-

Summary: Type::operator- was potentially removing valid values from the result.
E.g. Int - Int<24> or Obj - Obj<Foo> would return Bottom, or
Array=(MapLikeConstant) - Array(RATPacked) would return Bottom.  This could
easily do something incorrect (if that type flowed to the wrong place, we could
e.g. fold a CheckType<Int> branch or something incorrectly based on it).  It
also was sometimes going the other way: if you subtracted a specialized array
from another specialized array, you'd get back Type::Arr, which is
unnecessarily too big (we know *this - x can't ever be any bigger than *this).

I was a little bit afraid about how we might be using this stuff---but an audit
found no uses where the right hand side wasn't a constant type that was
unspecialized (it's mostly about removing Null or Uninit from things, so I
think we're likely to be ok).  I would rather have function called
"remove_null" (or whatnot) do that sort of thing so it's clear what we're
trying to do, though---this function seems too easy to misuse...  It is
incorrect to use it with arbitrary types that you didn't control if you aren't
ok with a - b returning a after this diff (and before this diff it's incorrect
to use it in that situation because it aborted on some inputs).

Reviewed By: @markw65

Differential Revision: D1645584
Remove DUnbox dest type

Summary: No longer used.

Reviewed By: @alexmalyshev

Differential Revision: D1647527

Signature: t1:1647527:1414617442:dcf3dbf25bae4dc56ceed58602e8c54f550523af
Remove PtrToGen from FunctionSuspendHook

Summary: Only callsites seem like they should always be passing a FramePtr.
Change them.

Reviewed By: @jano

Differential Revision: D1647517

Signature: t1:1647517:1414706625:5b5abd1d3aaef35dc008cb63567073d794cccc2b
Remove incCategory from guard-relaxation.h

Summary: Not called externally.

Reviewed By: @edwinsmith

Differential Revision: D1650439

Signature: t1:1650439:1414709373:f9b681fb38a4226c7d13511d86b10a07fa10aa36
Missed one case for "LdGbl" rename (in a string)

Reviewed By: @alexmalyshev

Differential Revision: D1650578

Signature: t1:1650578:1414707402:67764bfac490a7bb1e3bbd6d98b4b7ea936ce2d1
Conisder include path in parse_ini_file

Summary: Fixes #4069

We should consider current include path from ini settings in `parse_ini_file`, as described in [4069](https://github.com/facebook/hhvm/issues/4069).

Reviewed By: @ptarjan

Differential Revision: D1647897

Signature: t1:1647897:1414743941:c752d145e4b043197f44e43ef8ad86123d48bd37
Probably fix a bug in HHBBC's RemoveUnusedLocals

Summary: This needs to do a range check before testing the bit.

Reviewed By: @ottoni

Differential Revision: D1648931

Signature: t1:1648931:1414641777:fe1e7ea6c8f0bb41028d07af740735958778d87d
Remove region-tracelet inlining assert

Summary: It's firing on what are beleived to be normal situations,
which isn't what asserts are for.

Reviewed By: @markw65, @alexmalyshev

Differential Revision: D1652666
Raise warnings in ext/std/file functions [closes #3635, closes #2999]

Summary: Closes https://github.com/facebook/hhvm/pull/3897

Reviewed By: @ptarjan

Differential Revision: D1592143

Signature: t1:1592143:1414812285:1dffc5f5c2a5583cced2e702630a7e911ec7509d
With 'extern "C"' issue with PHP5 compat layer

Summary: "fopen_wrappers.h" was #include'ing files inside an 'extern "C"' block,
which caused problems when trying to use C++ features in certain C++ header
files such as "name-value-table-wrapper.h".

This diff fixes "fopen_wrappers.h" so that it doesn't #include files inside
an 'extern "C"' block.

Reviewed By: @edwinsmith

Differential Revision: D1648885

Signature: t1:1648885:1414659015:03793b6f9b204293375d314e44b2eac3dc1fff77
typechecker: remove continuation typedef

Summary: It's actually a (deprecated) abstract class name in the runtime,
 which comes into play when interpreting whether the expression
 `instanceof Continuation` is OK. Since `Generator` is the name going
 forward, let's just use that.

Reviewed By: @jwatzman

Differential Revision: D1650100

Signature: t1:1650100:1414797172:226254a8831cd424a705e6e04f9b6c32d6833bdf