Parsing member modifiers refactorization.

Currently, normal functions are not allowed to have modifiers and
closures can be marked only with 'static' keyword, which needs special
treatment in the parser. Let's change it so that it's parsed in the same
way as method modifiers. This will help us later when introducing 'async'
modifier for both functions and closures.

Differential Revision: D913903
Moving type inference of generator calls to FunctionCall expr.

Let's move the type inference for generators from function scope to
function call, so that the original infered type is kept in func scope
and can be used later (will be useful especially for async functions
lates).

Differential Revision: D913970
Basic support for async functions using continuations.

Adding basic support for async functions using continuations, which should be semantically fully equivalent to yield wait_for() etc.

Differential Revision: D911571
kill HasDocComment

Why does this exist? Can't we just rely on the key being there? I've seen tons of functions with this flag and no comment...

Differential Revision: D909139
Don't use NEW and DELETE macros for StringData

This is a step toward having StringData take control over how
it talks to the smart allocator based on its constructor parameters.
For now nothing is done to prevent allocation without going through
the new proxy function, but the nested allocator type is renamed to
prevent adding new uses of NEW or DELETE.

Differential Revision: D907959
Optimize StringData::release a little

Strings are usually small, and failing that, usually smart
allocated.  Also, release() doesn't need to check for a null pointer
now that it's not controlled by the DELETE macro.  This just inlines
the small path and gets rid of the null check for now.

Differential Revision: D907960
Make StringData constructor/destructor private

Everything has to go through StringData::Make or
StringData::MakeMalloced now.

Differential Revision: D909781
Some const-correctness fixes for collections

Gets rid of a TODO from when I implemented cellEqual.

Differential Revision: D911145
make the fb303 server work with port takeover

Make the fb303 server work with port takeover. We need to give it the same
treatment as admin server / satellite servers. Sorry I missed this part before
and being lame.

Differential Revision: D897344
Rename files in runtim/base, part 5

Differential Revision: D913077
SetStr and AddStr methods on a Vector do the same thing.

Since vectors are guaranteed not to have strings, set and
add are identical.

Differential Revision: D914016
Rename files in runtime/base, part 6

Differential Revision: D913699
Rename files in runtime/base, part 7

Differential Revision: D913883
Streamline a bit of code in AssignValHelper

The old code was constructing a Variant on the stack just to
decref it via the destructor.  Just call the decref directly and avoid
a few memory operations.

Differential Revision: D913228
Disable apparently broken dead store removal in hphpc

Hphp optimizes code like ($k += foo) into $k + $foo even if
$k is referenced again later in the function.

Differential Revision: D914064
(retry) Fix bug in mysql_next_result's return value that confused "done" with "error"

The MySQL documention states that mysql_next_result's return
values are:

0	Successful and there are more results
-1	Successful and there are no more results
>0	An error occurred

However, we were casting it to a bool, meaning errors and "all done"
were mixed into the same result.

This diff brings back the full error range.

This diff requires D912547, which fixes unit tests to accept both the
new and old return value types.

Differential Revision: D912553
Name next release

And also switch over to unambiguous date format.

Differential Revision: D914499
use f_php_uname() to replace hardcoded PHP_OS

- PHP_OS should return the real OS instead of Linux

Closes #933

Differential Revision: D914263
Implement a general purpose Systemlib SessionModule wrapper

To implement a session module in PHP, add a small C++ class
in runtime/ext/ext_session.cpp

  static class MySesionModule : public SystemlibSessionModule {
   public:
    MySessionModule() : SystemlibSessionModule('my', 'MySessionModuleImpl') {}
  } s_my_session_module;

Where 'my' is the name of the session handler (as known by the ini setting)
'MySessionModuleImpl' is the Systemlib PHP class implementing SessionHandlerInterface

Differential Revision: D872889
Fix SEGVs found by zend test bug35239.phpt

We dereferenced some potentially-freed memory only in order
to return something no one needed.  Remove the return value from
ObjectData::setProp.

Differential Revision: D909967