Store methods return type.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-03-16 14:57:04 +01:00
parent 7897f28ebb
commit 615e75fb8a
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 6 additions and 3 deletions

View File

@ -3578,6 +3578,7 @@ Synchronize:
*/
static sxi32 PH7_GenStateCompileClassMethod(
ph7_gen_state *pGen, /* Code generator state */
sxu32 nType, /* Method return data type */
sxi32 iProtection, /* Visibility level */
sxi32 iFlags, /* Configuration flags */
int doBody, /* TRUE to process method body */
@ -3707,6 +3708,8 @@ static sxi32 PH7_GenStateCompileClassMethod(
return SXERR_CORRUPT;
}
}
/* Store method return data type */
pMeth->sFunc.nType = nType;
/* All done,install the method */
rc = PH7_ClassInstallMethod(pClass, pMeth);
if(rc != SXRET_OK) {
@ -3926,7 +3929,7 @@ static sxi32 PH7_CompileClassInterface(ph7_gen_state *pGen) {
}
}
/* Process method signature */
rc = PH7_GenStateCompileClassMethod(&(*pGen), 0, iFlags, FALSE/* Only method signature*/, pClass);
rc = PH7_GenStateCompileClassMethod(&(*pGen), 0, 0, iFlags, FALSE/* Only method signature*/, pClass);
if(rc != SXRET_OK) {
if(rc == SXERR_ABORT) {
return SXERR_ABORT;
@ -4293,7 +4296,7 @@ static sxi32 PH7_GenStateCompileClass(ph7_gen_state *pGen, sxi32 iFlags) {
rc = PH7_GenStateCompileClassAttr(&(*pGen), iProtection, iAttrflags, pClass);
} else {
/* Process method declaration */
rc = PH7_GenStateCompileClassMethod(&(*pGen), iProtection, iAttrflags, TRUE, pClass);
rc = PH7_GenStateCompileClassMethod(&(*pGen), 0, iProtection, iAttrflags, TRUE, pClass);
}
if(rc != SXRET_OK) {
if(rc == SXERR_ABORT) {

View File

@ -130,7 +130,7 @@ static sxi32 PH7_CompileFunction(ph7_gen_state *pGen);
static sxi32 PH7_GetProtectionLevel(sxi32 nKeyword);
static sxi32 PH7_GenStateCompileClassConstant(ph7_gen_state *pGen, sxi32 iProtection, sxi32 iFlags, ph7_class *pClass);
static sxi32 PH7_GenStateCompileClassAttr(ph7_gen_state *pGen, sxi32 iProtection, sxi32 iFlags, ph7_class *pClass);
static sxi32 PH7_GenStateCompileClassMethod(ph7_gen_state *pGen, sxi32 iProtection, sxi32 iFlags, int doBody, ph7_class *pClass);
static sxi32 PH7_GenStateCompileClassMethod(ph7_gen_state *pGen, sxu32 nType, sxi32 iProtection, sxi32 iFlags, int doBody, ph7_class *pClass);
static sxi32 PH7_CompileClassInterface(ph7_gen_state *pGen);
static sxi32 PH7_GenStateCompileClass(ph7_gen_state *pGen, sxi32 iFlags);
static sxi32 PH7_CompileVirtualClass(ph7_gen_state *pGen);