Fix CreateCont for HHIR
Esse commit está contido em:
@@ -653,10 +653,6 @@ void HhbcTranslator::emitIterFree(uint32_t iterId) {
|
||||
|
||||
void HhbcTranslator::emitCreateCont(bool getArgs,
|
||||
Id funNameStrId) {
|
||||
emitInterpOneOrPunt(Type::Cell);
|
||||
return;
|
||||
// Task #2036200: Fix and re-enable this
|
||||
|
||||
/* Runtime-determined slow path punts to TranslatorX64 for now */
|
||||
m_tb->genExitOnVarEnv(getExitSlowTrace());
|
||||
|
||||
@@ -666,7 +662,7 @@ void HhbcTranslator::emitCreateCont(bool getArgs,
|
||||
int origLocals = origFunc->numLocals();
|
||||
int genLocals = genFunc->numLocals();
|
||||
|
||||
TCA helper = getCurFunc()->isNonClosureMethod() ?
|
||||
TCA helper = origFunc->isMethod() ?
|
||||
(TCA)&VMExecutionContext::createContinuation<true> :
|
||||
(TCA)&VMExecutionContext::createContinuation<false>;
|
||||
SSATmp* cont = m_tb->gen(CreateCont, cns(helper), m_tb->getFP(),
|
||||
@@ -682,7 +678,7 @@ void HhbcTranslator::emitCreateCont(bool getArgs,
|
||||
(origFunc->lookupVarId(thisStr) == kInvalidId);
|
||||
SSATmp* locals = m_tb->gen(LdContLocalsPtr, cont);
|
||||
for (int i = 0; i < origLocals; ++i) {
|
||||
SSATmp* loc = m_tb->genIncRef(m_tb->genLdLoc(i));
|
||||
SSATmp* loc = m_tb->genIncRef(m_tb->genLdAssertedLoc(i, Type::Gen));
|
||||
m_tb->genStMem(locals, cellsToBytes(genLocals - params[i] - 1), loc,
|
||||
true);
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ O(LdObjClass, D(Cls), S(Obj), C) \
|
||||
O(LdFunc, D(Func), S(Str), E|N|CRc|Er) \
|
||||
O(LdFixedFunc, D(Func), CStr, N|C|E|Er) \
|
||||
O(LdARFuncPtr, D(Func), S(StkPtr) C(Int), C) \
|
||||
O(LdContLocalsPtr, D(PtrToCell), S(Obj), C|Rm) \
|
||||
O(LdContLocalsPtr, D(PtrToCell), S(Obj), C) \
|
||||
O(LdSSwitchDestFast, D(TCA), S(Gen), N) \
|
||||
O(LdSSwitchDestSlow, D(TCA), S(Gen), E|N|Refs|Er) \
|
||||
O(LdSwitchDblIndex, D(Int), S(Dbl) S(Int) S(Int), N) \
|
||||
@@ -371,8 +371,8 @@ O(FillContLocals, ND, S(StkPtr) \
|
||||
C(Func) \
|
||||
C(Func) \
|
||||
S(Obj), E|N|Mem) \
|
||||
O(FillContThis, ND, S(StkPtr) \
|
||||
C(Func) C(Func) S(Obj), E|Mem) \
|
||||
O(FillContThis, ND, S(Obj) \
|
||||
S(PtrToCell) C(Int), E|Mem) \
|
||||
O(ContEnter, ND, SUnk, E|Mem) \
|
||||
O(UnlinkContVarEnv, ND, S(StkPtr), E|N|Mem) \
|
||||
O(LinkContVarEnv, ND, S(StkPtr), E|N|Mem) \
|
||||
|
||||
@@ -1008,7 +1008,7 @@ void TranslatorX64::irTranslateFPushCtorD(const Tracelet& t,
|
||||
|
||||
void
|
||||
TranslatorX64::irTranslateThis(const Tracelet &t,
|
||||
const NormalizedInstruction &i) {
|
||||
const NormalizedInstruction &i) {
|
||||
assert(i.outStack && !i.outLocal);
|
||||
assert(curFunc()->isPseudoMain() || curFunc()->cls() ||
|
||||
curFunc()->isClosureBody());
|
||||
|
||||
@@ -101,10 +101,10 @@ static CallMap s_callMap({
|
||||
|
||||
/* Continuation support helpers */
|
||||
{CreateCont, {FSSA, 0}, DSSA, SNone,
|
||||
{{SSA, 0}, {SSA, 1}, {SSA, 2}, {SSA, 3}, {SSA, 4}}},
|
||||
{{SSA, 1}, {SSA, 2}, {SSA, 3}, {SSA, 4}}},
|
||||
{FillContLocals, (TCA)&VMExecutionContext::fillContinuationVars,
|
||||
DNone, SNone,
|
||||
{{SSA, 0}, {SSA, 1}, {SSA, 2}, {SSA, 3}, {SSA, 4}}},
|
||||
{{SSA, 0}, {SSA, 1}, {SSA, 2}, {SSA, 3}}},
|
||||
|
||||
/* VectorTranslator helpers */
|
||||
{BaseG, {FSSA, 0}, DSSA, SSync, {{TV, 1}, {SSA, 2}}},
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário