Changed warning to notice for acces on non-object error

Summary: Fixes: #1905

This is similar to #1949. I don't get bad tests for current master.
Closes #2746

Reviewed By: @fredemmott

Differential Revision: D1369945

Pulled By: @JoelMarcey
Fix behavior of Redis client

Summary: Because HHVM forces auto_detect_line_ending to be enabled (which is a separate
bug), if a CRLF is split across two TCP packets, fgets() is liable to get
confused and assume that the stream uses CR line ending. As a result, the
return value of Redis::sockReadLine() is liable to have either a trailing CR or
a leading LF, both of which are corruptions. This causes the client to throw an
exception, complaining of a protocol error.

The behavior of fgets() is documented here:
http://www.php.net/manual/en/function.fgets.php#101963

The Redis protocol spec affirms that responses terminate with CRLF and are
guaranteed not to contain either CR or LF in the response body:
http://redis.io/topics/protocol
Closes #2874

Reviewed By: @ptarjan

Differential Revision: D1370933

Pulled By: @JoelMarcey
Elaborate namespace defs during parsing

Summary: Instead of having each caller to the parser need to remember to
call the namespace function, just do it in the parser. This is important
since it completely eliminates `Namespace` and `NamespaceUse` from the
AST, and basically everyone else will `assert false` if they see it.
(Notably, the JS typechecker was basically completely broken with
namespaces due to this.)

In an ideal world, these would be two different types and the OCaml
typechecker would yell at us for getting this wrong, but defining a
whole new AST for this seems like overkill.

Reviewed By: @elgenie

Differential Revision: D1369259
killed mtime globals + get_parent_class

Summary: We keep the time when a class was created but this information is not used anywhere.
The function get_parent_class was used for JS generation, but since we killed the
prototype, it's not used anymore.

Reviewed By: eletuchy, jwatzman

Differential Revision: D1369765
Fix ARM buffer space check

Summary: We were checking for available buffer space _after_ emitting code/data.

Reviewed By: @oyamauchi

Differential Revision: D1369455
Make array<some-supertype> usable in strict

Summary: Now that we allow arrays in strict, as long as they are fully
annotated, it makes sense to relax the "heterogeneous array" error,
which prevents you from writing `array<mixed>` or even
`array<someinterface>` (see test case) which are both useful things to
do, particularly the latter.

This does leave some cruft with regards to how this is handled in
partial mode due to www errors and upgrade/migration concerns, see code
comment.

Reviewed By: @elgenie

Differential Revision: D1368101
Fix argument order for --php

Summary: fixes facbeook/hhvm#2773

Reviewed By: liranuna, joelm

Differential Revision: D1369846
Disable vixl stack junk filling for non-debug builds.

Summary: hhvm creates a lot of short-lived vixl simulator instances when
simulating ARM, and much of the creation overhead is due to vixl
junk-filling 512 KiB of simulated stack.  Disable junk filling in
non-debug builds, for a major performance improvement (5-30X in extreme
cases).

Reviewed By: @oyamauchi

Differential Revision: D1371583
Initial (disabled) support for call-context sensitive return type inference

Summary: This is some initial support for a way of inferring return
types from functions without type hints, or which would be generics
functions in hack, etc.  The idea is to recursively invoke the type
inference algorithm at callsites, to possibly get more information
about the callee based on argument types at the call.

Reviewed By: @swtaarrs

Differential Revision: D1363519
Don't read freed locals in debugBacktrace when leaving a builtin

Summary: debugBacktrace has some logic to avoid reading locals after they've
been freed while returning, by checking for certain bytecodes at m_pc. This
didn't cover the case where we're returning from a builtin since the pc points
to NativeImpl. Just adding a case for NativeImpl seemed like overkill since
that's the case during the entire builtin, so just check the flag on the ActRec
that's conveniently set by the function exit hook.

Reviewed By: @jano

Differential Revision: D1371047
Fix hhir guard relaxation for specialized types

Summary: DataTypeSpecialized by itself isn't a strong enough constraint: we
also need to know which specific class the caller wants or if they want an
ArrayKind. This diff adds support for storing this information in
TypeConstraint and all the associated machinery.

The problem was using DataTypeSpecialized to constraint a CheckType<Packed> on
an array that already had a RepoAuthType::Array in its type: the source type
was already specialized so we thought it was safe to not constrain the
CheckType, leading to a not necessarily Packed array being given to
LdPackedArrayElem. To prevent this from happening undetected in the future, I
added support for array kinds to the IR opcode table.

Reviewed By: @jdelong

Differential Revision: D1369432
Change PostorderSort for slightly better codegen

Summary: If we have something like this (where none of the blocks involved are
cold):

        B12
  (next)|  \(taken)
        v   \
        B13  B14
        |   /
        v  /
        B15

our rpo sort algorithm would return 12, 14, 13, 15. This caused the generated
code to look something like this:

  B12
    Jcc -> B14
    Jmp -> B13
  B14
    Jmp -> B15
  B13
  B15

By flipping the order of next and taken in this situation, it's still a valid
postorder walk, but the resulting code has two jumps instead of three:

  B12
    Jcc -> B14
  B13
    Jmp -> B15
  B14
  B15

Reviewed By: @jdelong

Differential Revision: D1365041
Properly support $php_errormsg in the JIT

Summary: Any instruction that can raise an error can modify this local, even
when we're not in pseudomains. analyze() was mostly handling this but hhir had
no knowledge of it, breaking the tracelet selector and potentially leading to
subtle bugs in PGO mode.

Reviewed By: @bertmaher

Differential Revision: D1370271
Turn on tracelet region selector by default

Summary: It's ready.

Reviewed By: @jdelong

Differential Revision: D1302850
Check fully-resolved rhs of type aliases for compatibility

Summary: Type aliases to other type aliases were fataling in repo mode
because we would cache the fully-computed type on the right hand side,
but on future requests we'd check that against the shallow type.

Reviewed By: @jdelong

Differential Revision: D1371216
Revert "Created uncounted string in APC all the time and uncounted array more often if the InnerUncounted runtime option is on"

Summary: This reverts commit 5988c58ada9b5e0c9f88ff7e1d8d2b03b1a443f5.

Reviewed By: @ptarjan

Differential Revision: D1366638
The method RedisSessionModule::destroy is supposed to return a bool

Summary: Without this change, the following php fails in session_destroy :
```
<?php
ini_set('session.save_handler', 'redis');
ini_set('session.save_path', 'tcp://127.0.0.1:6379?database=5&prefix=PHPREDIS_SESSION:');
session_start();
session_destroy();
?>
```
because $redis->del($key) returns a long and not a boolean
Closes #2889

Reviewed By: @ptarjan

Differential Revision: D1371243

Pulled By: @JoelMarcey
Add support for ParamCoerceModeFalse

Summary: Closes #2885

Reviewed By: @ptarjan

Differential Revision: D1371239

Pulled By: @JoelMarcey
Add branch back to the Travis CI icon.

Summary: It was inadvertently removed in 99d0c79.
Closes #2887

Reviewed By: @ptarjan

Differential Revision: D1371242

Pulled By: @JoelMarcey
Fixed property access to DOM and XMLReader classes (issue #1989)

Summary: Previously properties in the DOM extension and XMLReader class could be
accessed case-insensitively, because the properties were backed by a
case-insensitive map. This fixes that.

isset on DOM classes was broken before, this also fixes that.

The behavior of accessing invalid properties on DOM classes was also
inconsistent, this has been fixed. Before, unlike PHP and unlike other
objects, accessing an invalid property on DOM classes would result in
a fatal error.

Changing the type of map backing the DOM properties results in a different
ordering in var_dump. I've changed the tests to reflect this
(the ordering didn't match php before, so this doesn't break compatibility
there).

Reviewed By: ptarjan, liranuna

Differential Revision: D1362865