filter_id should return null for arrays

Summary: Found via a bad zend test

Reviewed By: @JoelMarcey

Differential Revision: D1388346
Added passing tests as an xargs output file

Summary: This diff modifies the test runner to create a file of all passing tests. This is especially useful when dealing with `zend/bad`

Reviewed By: @fredemmott

Differential Revision: D1385647
don't process trait aliases in repo mode

Summary: The number calculated by ##Class::loadUsedTraits## is not
 used in repo mode. As a result, iterating over the trait alias rules
 to estimate how many functions are aliased isn't necessary, since all
 the functions in question have already been flattened into the preclass

Reviewed By: @ottoni

Differential Revision: D1387170
Remove m_hLoad field from MixedArray

Summary: If MixedArray's m_used field didn't move backwards (aside from compact),
then we would have a nice invariant where m_hLoad is always less than or
equal to m_used, making the m_hLoad field unnecessart.

This diff changes MixedArray so that m_used never moves backwards (aside
from compact), and it removes all the logic that checks or maintains the
m_hLoad field.

Reviewed By: @jdelong

Differential Revision: D1386785
Added Stash Caching Library to Framework Tests

Summary: Stash currently works on HHVM. It has some complex behavior that may be good to continue testing against.
Closes #2955

Reviewed By: @fredemmott

Differential Revision: D1386977

Pulled By: @JoelMarcey
show() for PostConditions

Summary: It's handy to print arbitrary sets of PostConditions while debugging.

Reviewed By: @ottoni

Differential Revision: D1388272
Re-record stable frameworks, add to FB CI

Summary: allthetests

This is all the stable frameworks except for monolog and vfsstream, which have a different pass rate on an FB build to the OSS build.

Notably, Joomla and Klein are not at 100%.

Reviewed By: @JoelMarcey

Differential Revision: D1387769
Fix mysqli_query return value for query without result

Summary: Closes #2965

Reviewed By: @JoelMarcey

Differential Revision: D1387738

Pulled By: @sgolemon
don't recompute files with errors

Summary: Files containing errors are systematically recomputed every time a file changes.
They are re-introduced in the pipeline in different places (depending on where they failed).
For example, if a file failed type-checking (as opposed to parsing, or naming), it is re-introduced
in the type-checking phase to see if the error went away.

The amount of hack errors present at any given time is relatively low in practice (Hack is a zero error system).
Because of that: recomputing all the files with an error was reasonably fast.

However, we are about to introduce a system (HH_FIXME) that let's the programmer ignore some errors.
The amount of files with errors at any given time is probably going to grow: recomputing all the files
with an error every time a file changes is probably not going to scale very well.
Whether this system is a good idea or not, in general, it would be cleaner for the type-checker not
to recompute files when nothing related to that file has changed.

In this diff, the logic of the type-checker is now the following:
1) recompute all the files that changed on disk: keep the errors introduced, let's call them X
2) remove all the errors (from the last run) coming from files that have been recomputed
3) Keep all the errors (from the last run) coming from files that have not been recomputed: call them Y
4) Show concat(X, Y) to the user

This is correct if the following invariant holds:
"The position of an error should be located in the file that introduced the error".
In other words, if type-checking the class 'A' introduces an error in a file that doesn't contain 'A' we
are in trouble: the error would persist forever until we recheck the file containain 'A' for unrelated reasons.

I think this invariant is reasonable and I am pretty sure it holds right now.

Reviewed By: @elgenie

Differential Revision: D1387289
fix accidental stupid edit to frameworks.yaml

Summary: cc SiebelsTim

thisisclowntown

Reviewed By: ptarjan, joelm

Differential Revision: D1389936
Don't allow null bytes in path-type arguments

Summary: CVE-2006-7243

Reviewed By: @sgolemon

Differential Revision: D1384585
Delete const_assert macro

Reviewed By: @alexmalyshev

Differential Revision: D1383263
Plausibly fix a race condition in the PhpFile unloading code path

Summary: After a PhpFile's reference count goes to zero, we put it on
the Treadmill, but it's still in the s_md5Files map.  Another thread
might load a file with the same md5 (in computeMd5), and then lead to
incRefing the PhpFile and using it again, and we'll hit the
always_assert in ~PhpFile when the treadmill runs.  Instead, try to
get it out of the md5files map earlier---this isn't quite enough
because another thread could still pull it out, so lookup sites also
need to check if the PhpFile has a non-zero reference count when it
comes out of the s_md5Files map.

Reviewed By: @mxw

Differential Revision: D1383518
Make most of FileRepository private to the cpp

Summary: I think the whole PhpFile thing can also be hidden internally
here if we move three related functions from ExecutionContext
(lookupPhpFile, lookupIncludeRoot, and evalInclude) and make them
return Unit*'s instead.  "Give me the Unit* for a path" seems like a
nicer API, but I'm not 100% sure if I like that route (mainly I'm
worried that the implementation here is too complex to add anything to
immediately---probably it should be simplified first).  I think this
is an incremental improvement worth taking on its own for now, though.

Reviewed By: @mxw

Differential Revision: D1383870
Delete PendQ; convert users to Treadmill

Summary: There were a few uses of this PendQ, which apparently defers
an event until the next request starts on this thread.  This must've
been added before the Treadmill, because the comments about mutex rank
at callsites were wrong now.  Also fix the thread-safety bugs with
ProfileController's orphaned units vector.

Reviewed By: @mxw

Differential Revision: D1383897
Remove unused std::strings m_profName, m_srcRoot from each PhpFile

Reviewed By: @mxw

Differential Revision: D1383904
Make lookupPhpFile and lookupIncludeRoot traffic in Unit* instead of PhpFile*

Summary: All anyone does with PhpFiles these days is get the Unit* out
of it.  (They used to reference count them, but Mark fixed that a
while back, and now it's a bit redundant.)  Trying to get them out of
the m_evaledFilesMap requires more testing (to ensure the keys are the
same as phpFile->getFileName)---maybe later.

Reviewed By: @mxw

Differential Revision: D1383936
Remove unimplemented inclued_get_data builtin

Summary: It doesn't returned any inclued data, and there seems to be
no php documentation about an API with this name.  (Or named
include_get_data for that matter.)  We've apparently had this thing
forever.

Reviewed By: @ptarjan

Differential Revision: D1383945
Some clean up on builtin-functions.{h,cpp} stuff

Summary: Remove a few unused or trivial functions, move autoload
handler to its own header, split the implementation for things that
were only used by autoload, pull some non-public functions out of the heade.r

Reviewed By: @mxw

Differential Revision: D1384138
clownlist flaky phpbb3 tests

Summary: Found via FB CI testing.

Reviewed By: @JoelMarcey

Differential Revision: D1390559