Fix asserted type in simplifyAssertTypeOp
commit39508b5c794d176dd68e422c9b8414f0549ad411
authorbsimmers <bsimmers@fb.com>
Sun, 23 Feb 2014 23:58:14 +0000 (23 15:58 -0800)
committerSara Golemon <sgolemon@fb.com>
Tue, 25 Feb 2014 18:29:30 +0000 (25 10:29 -0800)
treeff16368cbe6bf62f3f8c0d6605ef4ddb3c5f1ea4
parentba8a4d269e175478ee134509cb7245b6505b4c03
Fix asserted type in simplifyAssertTypeOp

The way I was doing this used Type::operator- and was intentionally
suboptimal to work around operator-'s limitations. This is a new version of the
same logic, without using operator-.

This also exposed an issue where certain type predictions were causing us to
lose type information. I fixed it by making sure CheckStk's typeParam is always
as refined as possible, and adding some logic in codegen to avoid specialized
type tests when not needed.

Reviewed By: @jdelong

Differential Revision: D1186725
hphp/runtime/vm/jit/code-gen-x64.cpp
hphp/runtime/vm/jit/code-gen-x64.h
hphp/runtime/vm/jit/print.h
hphp/runtime/vm/jit/simplifier.cpp
hphp/runtime/vm/jit/test/type.cpp
hphp/runtime/vm/jit/type.h
hphp/test/slow/finally/new_try_catch_001.php [moved from hphp/test/slow/finally/new_try_catch_001.php.disabled with 100% similarity]