Fix FPushClsMethodD in hhir

Non-persistent classes can't be burnt in (or at least,
you have to check the target cache before using it).
Esse commit está contido em:
mwilliams
2013-04-01 16:58:13 -07:00
commit de Sara Golemon
commit 4e7457bd8c
@@ -1353,7 +1353,11 @@ void HhbcTranslator::emitFPushClsMethodD(int32_t numParams,
SSATmp* objOrCls;
if (!mightNotBeStatic) { // definitely static
// static function: store base class into the m_cls/m_this slot
objOrCls = m_tb->genDefConst(baseClass);
if (TargetCache::isPersistentHandle(baseClass->m_cachedOffset)) {
objOrCls = m_tb->genDefConst(baseClass);
} else {
objOrCls = m_tb->gen(LdClsCached, m_tb->genDefConst(className));
}
} else if (m_tb->isThisAvailable()) {
// 'this' pointer is available, so use it.
assert(getCurClass());