Fix hphp/test/frameworks under the typechecker again

Reviewed By: @JoelMarcey

Differential Revision: D1403949
Add sequential + test find mode options to frameworks.yaml

Reviewed By: @JoelMarcey

Differential Revision: D1404194
Add isolation mode for OSS tests

Summary: An alternative approach to finding flakey tests. Finds a few issues, eg that assetic does shell_exec('php '..., so those tests aren't actually tested against the right build of HHVM.

Not on by default.

Reviewed By: @JoelMarcey

Differential Revision: D1403101
SplFileObject->fgetc() properly increases linenumber

Summary: That zendtest describes the problem pretty well.
Closes #3052

Reviewed By: @ptarjan

Differential Revision: D1408180

Pulled By: @JoelMarcey
The notice in the mysqli::error_list test doesn't occur with the test runner

Summary: Remove it

Reviewed By: @ptarjan

Differential Revision: D1406141
class_parents/class_implements raise a warning if class doesnt exist

Summary: Closes #3057

Reviewed By: @ptarjan

Differential Revision: D1409003

Pulled By: @JoelMarcey
Fix isset-related behaviour for ArrayObject subclasses

Summary: Unlike most objects, using isset on an ArrayObject will return false
if the element is null. However, `offsetExists` will return true in
this case, so we need to special case ArrayObject.

Commit 31104c56 introduced this special case handling, however it
would cause unexpected infinite recursion if `offsetGet` was
overridden in a child class and that child class used an expression
of the form `isset($this[$offset])`. Users were not expecting
`offsetGet` to be called as the result of an `isset` expression.

This commit fixes the behaviour by calling the `offsetGet` method
from the `ArrayObject` class, instead of the `offsetGet` method on
the supplied object.

Fixes #2871
Fixes #2495
Closes #2986

Reviewed By: ptarjan, jdelong

Differential Revision: D1397482

Pulled By: @JoelMarcey
refactor ext_hotprofiler.cpp into new file ext_hotprofiler.h

Summary: Following existing coding conventions, split out a .h file from ext_hotprofiler.cpp.  In this way, 3rd party profilers can be written and loaded as DSOs.
Closes #3027

Reviewed By: @ptarjan

Differential Revision: D1401272

Pulled By: @JoelMarcey
move CatchInfo from ir.h to code-gen.h

Reviewed By: @bertmaher

Differential Revision: D1408467
EZC: Fix copying of ProxyArray

Summary: 342b1193 introduced several bugs into ProxyArray::Copy and the handling
of "copy" parameters in handlers. I did not realise that Copy() gives a
refcount of zero whereas Make() gives a refcount of 1, and so I
introduced a lot of different ways to get invalid refcounts out of EZC.

* Revert the change to ProxyArray::Copy()
* When a handler is called with copy=true, take this as an opportunity
  to deproxy the array, since the EZC layer itself has no such calls.
  Prior to 342b1193, these handlers just had assert(!copy).
* Revert the change to the first half of ProxyArray::PlusEq()
* In zBoxAndProxy(), incref the result of copy() before decrefing the
  source, to avoid releasing the ArrayData when copy() returns the same
  pointer instead of making a copy. A comment array-data.cpp advises
  that this is possible.
* Added an assert to ProxyArray::Make() which previously failed.
* Added a test case which previously failed.
Closes #3049

Reviewed By: @ptarjan

Differential Revision: D1407639

Pulled By: @JoelMarcey
Update gdb/hhvm.py for recent ProxyArray layout change

Summary: Closes #3050

Reviewed By: @ptarjan

Differential Revision: D1407641

Pulled By: @JoelMarcey
collections: Vector::addAllKeysOf

Summary: ... forgot to add this method when adding Set::addAllKeysOf.

Reviewed By: @billf

Differential Revision: D1409650
Remove unused "Cleanup" shutdown function type

Reviewed By: jan, smith

Differential Revision: D1397106
Add a few try/catch blocks in SCOPE_EXITs in the runtime

Summary: Audited all of them to see if any could throw.  Mostly we're doing it
right.  They must always be nothrow because they are implemented as
destructors.

Reviewed By: @jano

Differential Revision: D1397107
Remove some old options (ThrowBadTypeExceptions, ThrowMissingArguments, etc)

Summary: This is apparently an old hphpc thing that deviated from php behavior
(presumably for performance?  Maybe it was part of HardTypeHints?).  Nothing
sets them to true anywhere, and it doesn't really control all the
warnings/exceptions one would expect anymore, so let's delete them.

Reviewed By: @alexmalyshev

Differential Revision: D1401231
Remove InjectedStackTrace runtime option

Summary: Legacy, and always set to true.

Reviewed By: @alexmalyshev

Differential Revision: D1401800
Remove ServerStackTrace runtime option

Summary: Unused.

Reviewed By: @bertmaher

Differential Revision: D1401845
Revert "Fixed casting Closure to Array"

Summary: It was causing a flib test to fail with infinite recursion, but this
wasn't being reported by sandcastle because of a bug in how we reported that
error (being fixed soon).

Reviewed By: @bertmaher

Differential Revision: D1410241
Reduce the number of exception types

Summary: It makes it too hard understand how we handle exceptions.  (Take a
look at handle_exception_helper in program-functions.cpp.)

Some notes:

  - Whenever we constructed a FatalErrorException from ExecutionContext's
    handleError, we apparently computed an extra PHP stack trace from the
    default ExtendedException constructor, and then threw it away.

  - m_handled was unused in Exception.  m_what is weird but I'm leaving it for
    now (it is a bit odd to add a newline character).

  - raise_error's ternary about whether to throw or not if the user error
    handler recovered had no effects, because the error handler wasn't even
    invoked there.  (We don't invoke the error handler on a fatal until after
    the entire eval stack is torn down.)

  - ExitException::ExitCode is a static member, shared across the request
    threads.  This means the exit callback might sometimes get incorrect exit
    codes in server mode if other request threads are concurrently doing Exit
    opcodes.  This looks like it was a hack for CLI mode: because it's hard to
    communicate anything useful to callers of hphp_invoke.  (I will try to make
    that fixable later.)

Stuff for later:

  - ParseTimeFatalException and AnalysisTimeFatalException probably have no
    reason to derive from Exception, but I'm not sorting that out yet.

  - FatalErrorException, ExtendedException, and Exception probably should all
    be combined into one class, but it requires sorting out 3 remaining
    subclasses (probably an enum is better than our rethrowing stuff).

  - We should stop throwing Object for user exceptions and have another,
    independent, std::exception subclass for that.

Reviewed By: @ptarjan

Differential Revision: D1404996
Remove defaulted args in hphp_invoke and hphp_invoke_simple

Summary: Necessary before possibly modifying hphp_invoke.  It's only slightly
less dangerous after this diff.

Reviewed By: @elgenie

Differential Revision: D1405000