- added the required code genration nodes for member function calls.

This is not testable right now because finally the action function mess has come full circle. The current setup makes it impossible to call action functions from non-action functions because the needed info is local to the functions.
Long avoided, this needs to be refactored now so that the different semantics for action functions are no longer needed.
This commit is contained in:
Christoph Oelckers 2016-10-22 12:10:19 +02:00
commit d6047ae651
7 changed files with 179 additions and 37 deletions

View file

@ -1080,6 +1080,26 @@ public:
};
//==========================================================================
//
// FxFunctionCall
//
//==========================================================================
class FxMemberFunctionCall : public FxExpression
{
FxExpression *Self;
FName MethodName;
FArgumentList *ArgList;
public:
FxMemberFunctionCall(FxExpression *self, FName methodname, FArgumentList *args, const FScriptPosition &pos);
~FxMemberFunctionCall();
FxExpression *Resolve(FCompileContext&);
};
//==========================================================================
//
// FxActionSpecialCall
@ -1130,12 +1150,13 @@ public:
class FxVMFunctionCall : public FxExpression
{
bool EmitTail;
bool OwnerIsSelf; // ZSCRIPT makes the state's owner the self pointer to ensure proper type handling
bool NoVirtual;
FxExpression *Self;
PFunction *Function;
FArgumentList *ArgList;
public:
FxVMFunctionCall(PFunction *func, FArgumentList *args, const FScriptPosition &pos, bool ownerisself);
FxVMFunctionCall(FxExpression *self, PFunction *func, FArgumentList *args, const FScriptPosition &pos, bool novirtual);
~FxVMFunctionCall();
FxExpression *Resolve(FCompileContext&);
PPrototype *ReturnProto();