Remove method reference returns and obsolete VM support
Build / AerScript (push) Successful in 38s

This commit is contained in:
2026-10-28 19:02:27 +01:00
parent a0dd23e63e
commit 43b74325b2
4 changed files with 13 additions and 66 deletions
+1 -9
View File
@@ -3648,23 +3648,15 @@ static sxi32 PH7_GenStateCompileClassMethod(
) {
sxu32 nLine = pGen->pIn->nLine;
ph7_class_method *pMeth;
sxi32 iFuncFlags;
SyString *pName;
SyToken *pEnd;
sxi32 rc;
/* Extract visibility level */
iProtection = PH7_GetProtectionLevel(iProtection);
iFuncFlags = 0;
if(pGen->pIn >= pGen->pEnd) {
/* Invalid method name */
PH7_GenCompileError(pGen, E_ERROR, nLine, "Invalid method name '%z' in class '%z'", &pGen->pIn->sData, &pClass->sName);
}
if(pGen->pIn < pGen->pEnd && (pGen->pIn->nType & PH7_TK_AMPER)) {
/* Return by reference,remember that */
iFuncFlags |= VM_FUNC_REF_RETURN;
/* Jump the '&' token */
pGen->pIn++;
}
if(pGen->pIn >= pGen->pEnd || (pGen->pIn->nType & (PH7_TK_ID)) == 0) {
/* Invalid method name */
PH7_GenCompileError(pGen, E_ERROR, nLine, "Invalid method name '%z' in class '%z'", &pGen->pIn->sData, &pClass->sName);
@@ -3700,7 +3692,7 @@ static sxi32 PH7_GenStateCompileClassMethod(
PH7_GenCompileError(pGen, E_ERROR, nLine, "Expected '(' after method name '%z::%z()'", &pClass->sName, pName);
}
/* Allocate a new class_method instance */
pMeth = PH7_NewClassMethod(pGen->pVm, pClass, pName, nLine, iProtection, iFlags, iFuncFlags);
pMeth = PH7_NewClassMethod(pGen->pVm, pClass, pName, nLine, iProtection, iFlags);
if(pMeth == 0) {
PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "PH7 is running out-of-memory");
}