class requirements: raise error if missing lookupClass

Summary: ... a bit more error resilient on the *second* use of a class with a missing requirement.

Reviewed By: @jdelong

Differential Revision: D1440884
Rename snappy methods

Summary: Renames sncompress to snappy_compress and snuncompress to snappy_uncompress to maintain code compatibility with PHP (when using php-snappy):

https://code.google.com/p/php-snappy/

Fixes compatibility specifically with:
https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/blob/master/Cm/Cache/Backend/Redis.php#L857

Replaces old PR due to incorrect commit message

Closes https://github.com/facebook/hhvm/pull/3259

Reviewed By: ptarjan, joelm

Differential Revision: D1452331

Pulled By: svcscm
Implemented basic xdebug tracing

Summary: This diff implements xdebug tracing, but does not include support for
outputting HTML or computerized tracing formats. Those will come next.

Xdebug tracing is a feature that, after started, collects information
about function begin/end events and then writes the information to
a nicely formatted file. It can be started and stopped on demand.

An example is below:
    TRACE START [2014-07-25 04:21:58]
        0.0079     248240      +32       -> var_dump() /home/jlreyes/tests/xdebug_tracing/trace.php:4
        0.0080     248192      -48     -> xdebug_get_tracefile_name() /home/jlreyes/tests/xdebug_tracing/trace.php:7
        0.0080     248272      +80     -> var_dump() /home/jlreyes/tests/xdebug_tracing/trace.php:7
        0.0087     249792    +1520     -> require(/home/jlreyes/tests/xdebug_tracing/trace_helper.php) /home/jlreyes/tests/xdebug_tracing/trace.php:8
        0.0087     249792       +0       -> bee() /home/jlreyes/tests/xdebug_tracing/trace_helper.php:7
        0.0087     249160     -632     -> Foo->bar() /home/jlreyes/tests/xdebug_tracing/trace.php:25
        0.0088     249208      +48       -> Foo->bar() /home/jlreyes/tests/xdebug_tracing/trace.php:13
        0.0088     249256      +48         -> Foo->bar() /home/jlreyes/tests/xdebug_tracing/trace.php:13
        0.0088     249304      +48           -> Foo->bar() /home/jlreyes/tests/xdebug_tracing/trace.php:13
        0.0088     249344      +40             -> baz() /home/jlreyes/tests/xdebug_tracing/trace.php:12
        0.0089     249344       +0               -> boo() /home/jlreyes/tests/xdebug_tracing/trace.php:18
        0.0089     249344       +0               -> boo() /home/jlreyes/tests/xdebug_tracing/trace.php:18
        0.0089     249344       +0               -> boo() /home/jlreyes/tests/xdebug_tracing/trace.php:19
        0.0090     249056     -288     -> boo() /home/jlreyes/tests/xdebug_tracing/trace.php:26
        0.0090     249056       +0     -> bee() /home/jlreyes/tests/xdebug_tracing/trace.php:27
        0.0090     249104      +48     -> xdebug_stop_trace() /home/jlreyes/tests/xdebug_tracing/trace.php:29
        0.0090     249136
    TRACE END   [2014-07-25 04:21:58]

There are several small consistency changes that are included in this
diff, such as ensuring variables related to the frame buffer are the
same type (int64_t).

Reviewed By: @ptarjan

Differential Revision: D1457916
typo

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

Reviewed By: @JoelMarcey

Differential Revision: D1460695

Pulled By: svcscm
fix parser with bison 3

Reviewed By: @Jo-Con-El

Differential Revision: D1460649
Fix IntlDateFormatter memory leak

Summary: IntlDateFormatter::setDateFormatter leaks TimeZone objects, as the TZ
returned from IntlTimeZone::ParseArg is cloned by icu::DateFormat, not
adopted.

Closes https://github.com/facebook/hhvm/pull/3286

Reviewed By: @ptarjan

Differential Revision: D1460696

Pulled By: svcscm
Fixed xdebug tracing tests

Summary: This diff fixes some of the xdebug tracing tests. When tracing turned on via an
ini setting, the filename that is used is by default non-unique. In the tests
related to tracing ini settings, I mistakingly didn't change the file output
name from default.

This was discovered when the tracing_2.php test failed in D20697. It interfered
with tracing_basic_1.php.

Reviewed By: @JoelMarcey

Differential Revision: D1460860
Remove some incorrect restrictions in the grammar of constant expressions.

Summary: Right now, constant expressions can only contain unary negations of scalar values, when php 5.6 (and common sense) allows negations of any static expressions. Also, < and > require their second argument to be a static_scalar also, which is also silly and doesn't match php 5.6. (In fact, the whole notion of static_scalar doesn't seem to be useful.) Also add support for ** in constant exprs.

Reviewed By: @elgenie

Differential Revision: D1457346
Kill IRBuilder::blockIsIncompatible (try 2)

Summary: The only purpose of IRBuilder::blockIsIncompatible left was to prevent
loops when Eval.JitLoops is off.  This diff gets rid of that, and
translateRegion now properly follows the region description passed to
it.  If any region former doesn't want to expose loops, it should not
include backedge arcs in the produced region.

Reviewed By: @bertmaher

Differential Revision: D1457757
Unfortunate hhi partial revert

Summary: Partial revert of https://reviews.facebook.net/D20667 since it
causes too many errors in www, for `trim` and `date` specifically. Also
corrects the spelling of the filename and removes some `mixed`
annotations (`mixed` in an hhi is basically never what you want.)

See https://reviews.facebook.net/D20667 for discussion on how we can
deal with this better in an open-source world.

Reviewed By: @JoelMarcey

Differential Revision: D1461459
More properly support php 5.6 constant expressions.

Summary: Right now we allow arbitrary expressions for class constants and a restricted subset of expressions for global constants. (An incorrectly restricted one: it considers -foo() to be a constant.) This implements a more reasonable check and uses it for both global and class constants.

Reviewed By: @elgenie

Differential Revision: D1457074
VASM initial code drop

Summary: This is a squashed diff of just the new vasm code, without changes
to hhvm to use it (yet).

Reviewed By: @jasone

Differential Revision: D1452965
Import php tests from php 5.5.11

Summary: This diff re-imports all the tests from PHP 5.5.11.

Reviewed By: @ptarjan

Differential Revision: D1432267
Assert that we only get loops with Eval.JitLoops=1

Summary: In the title.

Reviewed By: @ottoni

Differential Revision: D1457680
Raise the logging level for 'after tracelet formation'

Summary: This stuff is largely the same as 'after initial translation', and seems
to me to be a little excessive for logging level 2. Raising it to 3.
(And changing some const to constexpr)

Reviewed By: @edwinsmith

Differential Revision: D1461826
Sanitize non-utf8 content in test output

Summary: Ran into this with a test which outputs cp1251 text
which json_encode (rightly) barfs on.  This results in the
test's diff output being reduced to null which is singularly
unhelpful in test output.

Use UConverter::transcode() to turn anything that isn't UTF-8
into the Unicode WTF character U+FFFD.

Hopefully we don't get too many of these kinds of tests.

Reviewed By: @ptarjan

Differential Revision: D1462059
Turn off JIT::Timer by default in OSS build

Summary: In the absence of our special __vdso_clock_gettime_ns syscall, it
falls back to getrusage. The former is fast enough that there's no reason to
not have it on by default but the same isn't true of the latter.

Reviewed By: @jdelong

Differential Revision: D1461996
reserve space in thrift compact reader for collections

Reviewed By: @elgenie

Differential Revision: D1460153
Changed signature of onNewConnection in Acceptor to take non-const TransportInfo

Summary: We need to modify TransportInfo in non open source code for
integrating SSL Fingerprinting.

Reviewed By: dcsommer

Differential Revision: D1462392
Belatedly update NEWS for Notorious

Reviewed By: @edwinsmith

Differential Revision: D1462813