Let $_SESSION be undefined until session start

In Zend, $_SESSION is undefined (i.e. reading it either directly or
through $GLOBALS results in an 'undefined' notice) until you call
session_start.

Right now we're not completely matching Zend on warnings, although we
get closer if you build with HHVM_MORE_WARNINGS (see
member-operations.h).

Differential Revision: D920224
Remove a few extra vestiges of the debugger client api

Remove a few more bits left over from the client API, plus a little extra cleanup I noticed.

Differential Revision: D920393
Allow guarding tracelets on ArrayKind

Enable guarding tracelets on ArrayKind when we can generate
better code for a specific kind.

Added specialized helpers for CGetM, FPassM, and IssetM of
vector-shaped arrays.  This eliminates an indirect call and allows the
entire array-access call stack to be inlined into the helper

Differential Revision: D873631
use setCookie instead of manual header building

Instead of manually constructing a cookie, use the setCookie method
provided by Transport. This prevents the following kind of condition:

Imagine:

application runs setcookie with null params to delete a cookie.
application runs session_regenerate_id to get a new session id.
session_regenerate_id then constructs a new header through
m_responseHeaders.
Eventually, Transport will generate headers, but will always put
m_responseCookies after m_responseHeaders in the full header.

Uh oh! Now we have accidentally deleted a cookie due to incorrect header
order.

Closes #950

Differential Revision: D921467
Huge pages for server only, exclude targetcache by default.

Lots of scripts running in cli mode can quickly use up the huge page pool. Its better to not do that by default.

Even in server mode, it seems very suspicious to have large, thread-private segments of huge
pages. This should place heavy demands on the system's huge page resources,
and more worryingly, demand that scales up as threads go active.

Differential Revision: D885896
Add a few more async tests for the debugger

Add a few more debugger async tests.

Differential Revision: D921498
Delete a bunch of dead code in TranslatorX64

I just went through the header and grepped for each member function
name, and it turns out a bunch of them were declared and not
implemented, or were implemented but not used.

This clarifies the picture of what assembler-coupled functionality
remains on TranslatorX64:

1. Func prologues and their transitive dependencies (including
unfortunate stuff like a duplicated implementation of emitIncRef).

2. One-time-use stub emitters.

3. Syncing VM registers.

This makes the project seems a little tamer. Func prologues are
definitely the biggest part of it.

Differential Revision: D921995
Fix isset($string[$k]) and empty($string[$k]) to match PHP 5.5

The behavior of isset($x[$k]) and empty($x[$k]) where $x is a string has
changed in a recent version of PHP. This diff updates HHVM to match PHP
5.5's behavior. Note that HHVM still does not match Zend PHP 5.5 perfectly
in terms of warnings for these expressions; I've decided to put that off
into a separate diff.

This also brings HHVM up-to-date with respect to some edge cases for
automagically converting integer-like string keys to integer keys when
indexing into PHP arrays.

Differential Revision: D916630
Support for await on null expressions

The first implementation of async functions doesn't support
awaiting on expressions that are null. This adds support for this
in a way that the generator is not even suspended in these cases.

Differential Revision: D922499
Fix missing openssl params

openssl_seal() and openssl_open() should both take an optional method parameter which allows you to select the symmetric cipher to use. This implementation is slightly different than Zend PHP, currently if you pass a cipher that requires an IV it segfaults in Zend, in this implementation it warns and returns false.

Differential Revision: D921384
Don't generate core files during test runs

When a diff that causes many tests to fail runs on contbuild,
it usually ends up timing out because the machine spends so much time
writing core files to disk. These files are almost never useful
anyway, so don't generate them.

Differential Revision: D922720
remove dead code from translator.h

remove dead functions/code from translator.h

Differential Revision: D922135
remove defunct segfault handler

- segfault handler never panned out and has been off for 1.5
years; cheaper to resurrect later from git than refactor to take it out
of tx64

Differential Revision: D922900
Fix HHVM to not allow collection literals in class constant definitions

HHVM was incorrectly allowing collections to be used in class constant
definitions. This diff fixes the bytecode emitter to throw a parse error
if a collection literal is used in a class constant definition.

Differential Revision: D922848
Fix nemo errors for type aliases

:

Nemo is giving undefined class errors on type aliases.

Differential Revision: D918917
Make some collection APIs more lax about null and arrays

Looking at uses of the collection constructors, addAll, and setAll, I
noticed that it would be convenient if these methods tolerated null.
Also update Set::difference to support arrays.

Differential Revision: D923013
Rename files in runtime/server and facebook/runtime/server

Replace _ with -

Differential Revision: D922863
Test script support for debugging: write and compare printir logs

In trying to track down performance regressions I found it
was useful to generate printir:1 logs and compare them (Ed's idea).  I
figured others might find this useful so here's the test runner
support and script I used.

Differential Revision: D908406
Some small changes for making valgrind clean when running hhvm with no args

We were reading uninitialized memory from tx64 member
variables and failing an assertion about the size of trampoline code.
(As far as I can tell, nothing really depends on the exact size of the
trampoline except for the guess about how many trampolines we can
fit.)

Differential Revision: D922916
Expose basic async stack in the debugger

Expose the async stack in the debugger. This is the stack of, say, generators driven from the ASIO extension. This is a modification to the where command. The new command type accounts for back compat between old servers/clients. I've added a shortcut, "wa", which is a bit faster to type.

I also modified the normal stack trace to not print bogus lines for functions with no file/line info.

Differential Revision: D920910