Fix refcount-opts for $this in static functions
commitb29225e843ff83a0a0d505edeebfc6de9dd8aaa6
authorbsimmers <bsimmers@fb.com>
Fri, 9 May 2014 19:23:50 +0000 (9 12:23 -0700)
committerJoelMarcey <joelm@fb.com>
Thu, 15 May 2014 01:43:15 +0000 (14 18:43 -0700)
tree283ef133390a4d119108a815862fe47eb4b003c5
parent98b54bd1dd2cf78ffbaa470d746236866257952f
Fix refcount-opts for $this in static functions

Summary: The changes to refcount-opts.cpp are sufficient to fix the crash but I
decided to do a little related cleanup. I properly implemented the null $this
fatal for This and CheckThis and changed preOptimizeLdThis to generate cleaner
code in cases like this. It won't help perf but the resulting code is much less
embarrassing.

Reviewed By: @alexmalyshev

Differential Revision: D1321977
hphp/doc/ir.specification
hphp/runtime/vm/jit/code-gen-x64.cpp
hphp/runtime/vm/jit/hhbc-translator.cpp
hphp/runtime/vm/jit/hhbc-translator.h
hphp/runtime/vm/jit/ir-builder.cpp
hphp/runtime/vm/jit/refcount-opts.cpp
hphp/runtime/vm/jit/reg-alloc-x64.h
hphp/test/quick/refcount-static.php [new file with mode: 0644]
hphp/test/quick/refcount-static.php.expectf [new file with mode: 0644]