- implement flag variables with the VM's sbit and lbit instructions.

- synthesize PField entries from the flag list for AActor. This intentionally excludes the bounce flags for now.
- allow deprecated flags that do not call the deprecated flag handler.
- disallow constructs like (a = b) = c by not allowing an address request on an assignment operation.
- restrict modify/assign on boolean variables to the bit operators. Everything else needs to promote the result to an integer to make sense so it should be disallowed.
This commit is contained in:
Christoph Oelckers 2016-10-24 17:18:20 +02:00
commit f810b98167
8 changed files with 166 additions and 64 deletions

View file

@ -703,14 +703,18 @@ class FxAssign : public FxExpression
{
FxExpression *Base;
FxExpression *Right;
int IsBitWrite;
bool AddressRequested;
bool AddressWritable;
bool IsModifyAssign;
friend class FxAssignSelf;
public:
FxAssign(FxExpression *base, FxExpression *right);
FxAssign(FxExpression *base, FxExpression *right, bool ismodify = false);
~FxAssign();
FxExpression *Resolve(FCompileContext&);
bool RequestAddress(bool *writable);
//bool RequestAddress(bool *writable);
ExpEmit Emit(VMFunctionBuilder *build);
ExpEmit Address;
@ -1064,7 +1068,6 @@ class FxClassMember : public FxStructMember
public:
FxClassMember(FxExpression*, PField*, const FScriptPosition&);
FxExpression *Resolve(FCompileContext&);
};
//==========================================================================