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:
@@ -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());
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário