Remove m_obj from c_Continuation
m_obj in c_Continuation is redundant. It is only used at the time Continuation is created. First, it is set in init() call. Few instructions later, it is read so that $this in the Continuation's ActRec can be populated. Kill it.
Esse commit está contido em:
@@ -7038,7 +7038,7 @@ VMExecutionContext::createContinuationHelper(const Func* origFunc,
|
||||
);
|
||||
cont->incRefCount();
|
||||
cont->setNoDestruct();
|
||||
cont->init(origFunc, thisPtr, args);
|
||||
cont->init(origFunc, args);
|
||||
|
||||
// The ActRec corresponding to the generator body lives as long as the object
|
||||
// does. We set it up once, here, and then just change FP to point to it when
|
||||
@@ -7151,10 +7151,10 @@ VMExecutionContext::fillContinuationVars(ActRec* fp,
|
||||
// If $this is used as a local inside the body and is not provided
|
||||
// by our containing environment, just prefill it here instead of
|
||||
// using InitThisLoc inside the body
|
||||
if (!skipThis && cont->m_obj.get()) {
|
||||
if (!skipThis && fp->hasThis()) {
|
||||
Id id = genFunc->lookupVarId(thisStr);
|
||||
if (id != kInvalidId) {
|
||||
tvAsVariant(&cont->locals()[nLocals - id - 1]) = cont->m_obj;
|
||||
tvAsVariant(&cont->locals()[nLocals - id - 1]) = fp->getThis();
|
||||
}
|
||||
}
|
||||
return cont;
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário