Make expected output of setprofile-this more permissive with paths

This test fails when I run it in repo mode from hphp/, and it
just looks like the expectf pattern is too strict.

Reviewed By: @ptarjan

Differential Revision: D1116012
Catch jmp/call to zero at translation time

Its much easier to catch such bugs at translation time,
than after we crash with $rip == 0.

Reviewed By: @edwinsmith

Differential Revision: D1114185
Get rid of unnecessary includes of unit.h

It's pretty big, and it looks like a few of the places it's
included don't actually need it.

Reviewed By: @jdelong

Differential Revision: D1116020
Setting a boolean flag in getTyped

Timezone passed is null and doesn't match the class, so exception is thrown.

Reviewed By: @ptarjan

Differential Revision: D1113303
Add child argument to AsyncFunctionWaitHandle::onCreate callback.

An AsyncFunctionWaitHandle is only created when an object it `await`s is blocking. Currently these `await` events trigger the `onAwait()` callback. However, the first time an async function awaits is also the first time it actually gets created. Thus, the first actual `await` results in the `onCreate()` callback. This is fine, but right now there is no way to know what `WaitHandle` caused the creation of the AsyncFunctionWaitHandle. This useful to know.

For example, the current implementation of Teak does not, from my experimentation, get the call stack correct because it assumes that `asio_get_current()` is the parent when the `onCreate()` callback is called. However, this is not true. With the addition of the child that caused the creation, this can be fixed.

Reviewed By: @jano

Differential Revision: D1115761
Implement support for binary-number syntax

Implements support for binary number syntax ("0b10")

Closes #1425
Closes #1454

Reviewed By: @jdelong

Differential Revision: D1114405
removed unnecessary subdirectories in test/slow/hh_namespace_migration

test/slow/hh_namespace_migration/redundant/redundant1.php is not useful

Reviewed By: @jdelong

Differential Revision: D1116835
skip trait import in repo mode

In repo mode, we've already done whole program analysis and
 imported trait methods, properties, and interfaces into the
 containing preclass. It doesn't make sense to redo that work when
 instantiating Class*s.

 The downstream effects of this change in repo mode are:
  - reflection should get (marginally) faster: no work for trait alias
    rules until the first time they're reflected upon
  - "used traits" reflection uses preclasses only, except for the case
    of object prop iteration, which continues to use the list of trait
    classes and works as before, but better (outside of repo mode,
    trait props are used ; in repo mode, trait props are ignored as
    redundant)
  - less work at warmup (doing nothing is faster than doing something
    for each trait method)
  - trait requirements are not enforced (left for followup diff)

Reviewed By: @markw65

Differential Revision: D1111932
check trait requirements during flattening

In repo mode, traits are flattened into the preClasses of using
 classes. After {D1111932}, there's no attempt made to import traits
 at class instantiation time (in repo mode), so the checks of trait
 requirements were not done. This diff patches up that hole, with the
 (small) limitation of not quite tracking the chain of
 trait-using-trait usages in error messages.

Reviewed By: @markw65

Differential Revision: D1116296
import tests that used to spew

this is so awesome that these work

Reviewed By: @scannell

Differential Revision: D1116552
DateTime::createFromFormat() return FALSE on error

DateTime::createFromFormat() should return false on failure.

Closes #1495
Closes #1497

Reviewed By: @ptarjan

Differential Revision: D1117091

Pulled By: @scannell
PDOException should have a property "errorInfo"

Added two tests, one to verify the property exists, another one to
verify that the extra error info is actually set.

Closes #1412
Closes #1498

Reviewed By: @ptarjan

Differential Revision: D1117082

Pulled By: @scannell
Libdwarf 20130729 (and later) support

Libdwarf 20130729 not only has changed Dwarf_Callback_Func_c
definition, but also adds two new functions dwarf_encode_leb128 and
dwarf_encode_signed_leb128. So, we can check for a presence of symbol in
a library, to distinguish between the old and new libdwarf.

Closes #1490

Reviewed By: @ptarjan

Differential Revision: D1117070

Pulled By: @scannell
Turn on Region JIT with profile-guided traces

This diff turns on the initial version of the region JIT, with
"hottrace" regions.  To contain profiling and retranslation overheads,
the region JIT only targets functions marked as hot for now.  Compared
to the tracelet JIT, CPU time is in the noise according to perflab and
production testing. The region translator still has performance
issues, both known (e.g. guard relaxation is still disabled) and
unknown (translateRegion with tracelet regions still produces worse
code than translateTracelet, even with guard relaxation out of the
picture), and we'll continue to work on these.  Once we address these
issues, and try other ideas that the region JIT enables, we should
start seeing performance gains.  Nevertheless, we feel like the
current state is good enough to push the region JIT to release.  So,
if no one has any objection, we'd like to turn on the region JIT and
try to get it in the next release.

Reviewed By: @bertmaher

Differential Revision: D1116793
Add ReflectionFunctionAbstract::isAsync

See attached task. We want to kill mockYield but need to be able tell if a function is async.

Reviewed By: @jano

Differential Revision: D1110027
Stop unit tests from doing eval() in repo mode

Most of these tests were only about eval, so they get norepo.
For FPassC, I pulled the eval case into its own test.  This is
separate from the diff to actual make eval fatal in RepoAuthoritative
in case we end up needing to revert that one ...

Reviewed By: @scannell

Differential Revision: D1116200
Fatal on eval in RepoAuthoritative mode

Reviewed By: @ptarjan

Differential Revision: D1116204
Move util/base.h to util/deprecated for remaining users

Most of the remaining stuff under hphp/compiler that gets it
from hphp/compiler/hphp.h

Reviewed By: @markw65

Differential Revision: D1115344
Replace mapInsertUnique with checks of .second

Reviewed By: @markw65

Differential Revision: D1116397
Fix memory leak in Gen{Map,Vector}WaitHandle

The code assumed obj->clone() function to return an ObjectData* with
zero refcount, but the refcount is initialized to 1 by clone().

Let's attach() this already refcounted ObjectData* to the Object.

Reviewed By: @jdelong

Differential Revision: D1117583