Remove HhbcTranslator::assertClass

Summary: I forgot to remove this earlier.

Reviewed By: @edwinsmith

Differential Revision: D1310971
Redis EVAL and EVALSHA fixes and tests

Summary: Closes #2555

Reviewed By: @ptarjan

Differential Revision: D1305908

Pulled By: @JoelMarcey
Fix OSS Build due to tuple changes

Summary: D1305592 did some good things for tuples. Unfortunately, the OSS build breaks with it. It won't compile.

Scanning dependencies of target hphp_parser
[ 24%] Building CXX object hphp/parser/CMakeFiles/hphp_parser.dir/lex.yy.cpp.o
hphp/parser/hphp.ll: In function ‘int hphplex(HPHP::ScannerToken*, HPHP::Location*, yyscan_t)’:
hphp/parser/hphp.ll:466:3: error: ‘T_TUPLE’ was not declared in this scope
make[2]: *** [hphp/parser/CMakeFiles/hphp_parser.dir/lex.yy.cpp.o] Error 1
make[1]: *** [hphp/parser/CMakeFiles/hphp_parser.dir/all] Error 2
make: *** [all] Error 2

I thought lex.yy.cpp would get automatically regenerated during the make process, but it doesn't. In fact, make-parser.sh doesn't even touch the file.

Reviewed By: @jdelong

Differential Revision: D1313253
In ConvBoolToDbl, zero-extend before converting.

Summary: It doesn't do any good to zero extend after converting.
Noticed this while reviewing something unrelated.

Reviewed By: @bertmaher

Differential Revision: D1311263
Rename Yii test suite

Summary: If you have a test suite called foo, phpunit creates a class called Foo.
Given there's already a Yii class, this created a race condition, which we started triggering reliably a week back.

Reviewed By: @JoelMarcey

Differential Revision: D1314082
Check for unbalanced arrays only when growing

Summary: Do the checks only when the array grows beyond 100 elements.

Reviewed By: @edwinsmith

Differential Revision: D1310806
Remove constrainBase assertion when HHBBC infers more precise type

Summary: This assertion was failing in a prod-repo debug build for me,
and the reason is that HHBBC has inferred that the base is PtrToInit
(which is neither isBoxed nor notBoxed).

Reviewed By: @swtaarrs

Differential Revision: D1310534
Move the rest of LdObjMethod's constants to ExtraData

Summary: We put "fatal" in extra data, but the opcode signature mostly
predates that (it's old enough that it was even taking the context
class as an argument, which we stopped doing).  Also make a few things
const, remove some C-style casts, and update the spec for "fatal".

Reviewed By: @edwinsmith

Differential Revision: D1310648
Convert SpillFrame to deal with Nullptr instead of InitNull

Summary: We now make a distinction between InitNull (PHP null values,
subtypes of Cell), and internal null pointers (unrelated to the Cell
type).  Make this opcode do it too.

Reviewed By: @edwinsmith

Differential Revision: D1310659
Some cleanup on the IR Call instruction

Summary: I was looking at how hard it would be to leave the things on
the stack instead of popping them (I think it is doable---I will try
in a little bit), but I did this separately in case that change
doesn't work.  This diff moves the compile time constants to extra
data, (finally) hooks it into the type assertion pass, and fixes the
docs a bit (a bit misleading about the meaning of S3, and still
referred to Type::None wrt a broken optimization we deleted a while
ago).

Reviewed By: @edwinsmith

Differential Revision: D1310673
Remove dead references to Type::None in the ir.spec

Summary: It died a little while ago.

Reviewed By: @edwinsmith

Differential Revision: D1310674
Make Call not require loading everything from the stack

Reviewed By: @edwinsmith

Differential Revision: D1310702
Change TransKind into an enum class

Summary: And remove redundant getTransKindName function.  (Split this
into its own diff for reviewability.)

Reviewed By: @bertmaher

Differential Revision: D1311798
Add an API for profiling arbitrary things to use during PGO translations

Summary: Adds a TargetProfile<> utility that lets you record
information during a profiling translation, and query the results
during an optimized translation.  Also adds a new RDS mode called
"Local", which is data that is thread local but not-zero'd on every
request (we may also find a different use for this).

Nothing uses this yet, but there are few more ideas we can try before
giving up, so @ottoni and I were thinking it's worth putting up a diff
for the API on its own.  (I'm going to try to use it to profile for
array kinds today.)

Reviewed By: @ottoni

Differential Revision: D1312058
Implemented PHP5.6's use const feature

Summary: This diff implements `use const` sementics from PHP5.6 (RFC https://wiki.php.net/rfc/use_function).

Reviewed By: @elgenie

Differential Revision: D1309132
auto import 'this'

Summary: HHVM was qualifying `this` to `my\namespace\this` then complaining when the return type didn't work.

Closes #2428
Closes #2442

Reviewed By: @paroski

Differential Revision: D1290082

Pulled By: @LiraNuna
Test case for htmlentities() on UTF-8 strings.

Summary: Closes #2266
Closes #2551

Reviewed By: @ptarjan

Differential Revision: D1305987

Pulled By: @JoelMarcey
Remove vsize check/call from ConvArrToBool

Summary: See the comment. This will add a known incompatibility, but in a case
that will never arise in practical code.

Reviewed By: @edwinsmith

Differential Revision: D1312929
Fix some issues with Func::setFullName

Summary: When Eval.PerfDataMap is true, we need the number of parameters in
Func::setFullName, but its no longer available in m_numParams at the time
we call it due to variadic parameter changes.

Pass it in instead.

Reviewed By: @edwinsmith

Differential Revision: D1314506
Make stream URI detection match PHP5

Summary: - Brings assetic back to 100%
- Guzzle3 sticks at 100%
- Guzzle4 goes back up to 93.03% (dropped at same time as assetic)

Implementation taken from PHP5

fixes facebook/hhvm#2621

Reviewed By: @ptarjan

Differential Revision: D1313842