- 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:
parent
808188ff18
commit
f810b98167
8 changed files with 166 additions and 64 deletions
|
|
@ -1836,9 +1836,12 @@ void ZCCCompiler::ProcessDefaultFlag(PClassActor *cls, ZCC_FlagStmt *flg)
|
|||
auto fd = FindFlag(cls, n1, n2, true);
|
||||
if (fd != nullptr)
|
||||
{
|
||||
if (fd->structoffset == -1)
|
||||
if (fd->deprecated)
|
||||
{
|
||||
Warn(flg, "Deprecated flag '%s%s%s' used", n1, n2 ? "." : "", n2 ? n2 : "");
|
||||
}
|
||||
if (fd->structoffset == -1)
|
||||
{
|
||||
HandleDeprecatedFlags((AActor*)cls->Defaults, cls, flg->set, fd->flagbit);
|
||||
}
|
||||
else
|
||||
|
|
@ -2384,7 +2387,7 @@ static int Pex2Tok[] = {
|
|||
static FxExpression *ModifyAssign(FxBinary *operation, FxExpression *left)
|
||||
{
|
||||
auto assignself = static_cast<FxAssignSelf *>(operation->left);
|
||||
auto assignment = new FxAssign(left, operation);
|
||||
auto assignment = new FxAssign(left, operation, true);
|
||||
assignself->Assignment = assignment;
|
||||
return assignment;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue