better error for missing expect files

Reviewed By: @JoelMarcey

Differential Revision: D1479986
Patch for building TBB on Cygwin

Summary: TBB supports MSVC and Mingw out of the box, but not cygwin

Provides small patches (mostly related to missing dladdr/dl_info) and ifdefs missing
And integrates cygwin support into the rather odd build system

Reviewed By: @sgolemon

Differential Revision: D1480195
Add test case for __sleep when storing to APC

Summary: This feature broke in D1417525 so just adding a unit test for the
future.

Reviewed By: @asukhachev

Differential Revision: D1478391
Use blockEndsRegion for breaksTracelet

Summary: With wholecfg there can be "tracelet" breaking things that aren't the
last block.

Reviewed By: @ottoni

Differential Revision: D1460197
Don't smart-allocate anything when creating the execution context

Summary: We (re-)create the execution context at the end of every
request. If it smart allocates anything, we will end up allocating
a 2Mb slab which won't be freed (or used) until the next time
the thread executes a request. Since we typically have a lot of
idle requests, this could be a significant chunk of memory.

Reviewed By: @bertmaher

Differential Revision: D1465987
Make ProfilerLevel into enum class; give it a better name

Summary: It may have been intended as a profiling "level" originally, but it's
not that anymore. Rename, make enum class. This makes it easier to grep
for where these things are being used.

Reviewed By: @ptarjan

Differential Revision: D1478966
Add better error reporting if framework runner ran without an HHVM build

Summary: See confusion on facebook/hhvm#3320

cc GrahamCampbell

Reviewed By: @JoelMarcey

Differential Revision: D1478146
Delete SimpleProfiler

Summary: ProfilerKind::Simple was unused except for that case label, and there
was no other way to instantiate a SimpleProfiler. SimpleProfiler also
returned its results by directly writing some nasty HTML (referencing
nonexistent css and js files) to output. Everything else in this file is
more than enough to cover this functionality; let's kill it.

Reviewed By: @ptarjan

Differential Revision: D1480436
Make whitespace in reflectionparameter match php5

Summary: refs facebook/hhvm#3320

Reviewed By: @JoelMarcey

Differential Revision: D1475355
Compatibility fill ins

Summary: backtrace, min/max macros, and some other compatibility fixes for cygwin

Reviewed By: @sgolemon

Differential Revision: D1480306
typechecker: enforce default constructor consistency

Summary: A class with no defined constructor may still want to use
 `<<ConsistentConstruct>>` when it contains a `new static()`; allowing
 child classes to define a constructor with mandatory args would not
 be acceptable.

Reviewed By: @jwatzman

Differential Revision: D1477764
Update laravel to v4.2.8

Summary: 100% :) fixes facebook/hhvm#3320

Reviewed By: @JoelMarcey

Differential Revision: D1475474
Upgraded guzzle4 to 4.1.6 in the framework tests

Summary: The passed tests changes from `93.01%` to `92.54%`.

Old stats:

    Tests: 660, Assertions: 1575, Failures: 3, Errors: 43, Skipped: 2.

New stats:

    Tests: 686, Assertions: 1628, Failures: 3, Errors: 48, Skipped: 2.

You can see the old and new error logs here: https://gist.github.com/GrahamCampbell/826d87c35e3049f683dc.
Closes https://github.com/facebook/hhvm/pull/3368

Reviewed By: @fredemmott

Differential Revision: D1479961

Pulled By: svcscm
Add fuzzy results to search

Summary: Add fuzzy results to search results - in this case, fuzzy just means if the result is a common subsequence of the query. (i.e. 'hlo' matches 'hello', but 'hol' doesn't).
This means search only indexes methods (we don't fuzzy search those, there are too many, it just seems to clutter results and slow things down) and then aggregates the fuzzy search results.

It adds ~2s to startup time.

--------------------------
| Fuzzy Search Algorithm |
--------------------------

The algorithm is supposed to be fast to index, compromising with a slightly slower search time.
Here are some examples of what should match:
 - `search_term` -> `result`
 - 'heo' -> 'hello'
 - 'awtbl' -> 'Awaitable'
 - 'mthdy' -> 'MothersDay'
 - 'bsfcbktcs' -> 'BaseFacebookTestCase'
 - 'ExactMatch' -> 'ExactMatch'

1. Indexing
----
The index we build at a high level is simple: we build a map from letters to terms which contain those letters (in important places).  This means the term `Awaitable` lies under only 'a' and 'w', but 'someClass_here' lies under 's', 'o', 'c', and 'h'.
Note: This excludes the filter part, but each index also basically has 4 indexes, one for each filter type (Class, Constant, Typedef, Function)
Also note: We only index Classes, Constants, Typedefs, and Functions - regular search handles methods (there are just too many to index this way)

To index:
a.) Run workers over files, so no two workers can touch the same file
b.) Each worker will add to two shared memory objects:
    i.) a list of keys in the file
    ii.) a map from key to definition (where a definition is a name, location, and type)
 - The purpose of the key list object is so we can easily build a global list of all keys as well as check which keys are added/removed each time we index the file
 - The purpose of the map is so we can find the actual definition once we know the key is related to the search term.
c.) The master process then aggregates all the information from shared memory, checking the difference in each file compared to last indexing
d.) The master process the main index (map from letters to terms which contain the letters)
e.) It also builds a term lookup table, where we can lookup a term by it's key to find out which files it is in - this is used so we can find the actual definition object later, once we match

2. Searching
----
Searching is pretty simple: Get the first letter of the query, find the list of terms with that letter, and check every single term if it matches our search query.

To search:
a.) Cut the first letter off the query
b.) Lookup the list of terms which contain that letter (we indexed it earlier)
    i.) If there was a filter specified, only get the terms matching that type
c.) Compare our query against each term in that list
d.) If our query is a common subsequence of one of the terms, add it to the results list
e.) While we compare our query, we keep track of a score:
    i.) The more gaps there are between matching characters, the higher the score
    ii.) The more letters which are the incorrect case, the higher the score
    iii.) Direct matches have a score of 0.
    iv.) The later we find out that we've matched, the higher the score
    v.) Longer terms have higher scores
 - If your query is very spread out in the result, it's less likely to be what you're looking for.
 - The shorter the result, the closer the length is to what you searched for, so it's more likely.
 - The earlier we find the match, the more likely it is to be what you're looking for.
 - The more cases of the characters that match, the more likely it is to be what you're searching for
f.) Sort the results by the score
g.) Merge the results with regular search results (which indexes methods as well) - only if no filter was specified

Reviewed By: @joelbeales

Differential Revision: D1418856
Have liveTVType return an Obj=C instead of Obj<=C

Summary: It only specializes on NoOverride classes.

Reviewed By: @swtaarrs

Differential Revision: D1479030
Some random cleanup around FrameState.

Summary: No functionality changes.

Reviewed By: @ottoni

Differential Revision: D1480435
make SplFileObject__fgetcsv.csv not be shared by 8 tests

Reviewed By: @JoelMarcey

Differential Revision: D1480793
Enable file XML external entities for frameowrk tests

Summary: refs facebook/hhvm#3375

Doctrine2 uses these for some of its' tests. Still not back at 100% though.

Reviewed By: @JoelMarcey

Differential Revision: D1482233
Fix twital re-record - test find mode bad

Summary: refs facebook/hhvm#3381

Reviewed By: @JoelMarcey

Differential Revision: D1481847
unflakey md5 and sha1 test

Summary: failed on D1479623?vs=on&id=4750825&whitespace=ignore-all#toc

Reviewed By: @fredemmott

Differential Revision: D1482115