- implemented all assign/modify operators.
- use a table to translate from PEX to tokens to make the code easier to read.
This commit is contained in:
parent
3e995d7aac
commit
9f260983c7
3 changed files with 120 additions and 90 deletions
|
|
@ -1550,7 +1550,7 @@ FxExpression *FxSizeAlign::Resolve(FCompileContext& ctx)
|
|||
}
|
||||
else
|
||||
{
|
||||
FxExpression *x = new FxConstant(Which == 'a' ? int(type->Align) : int(type->Size), Operand->ScriptPosition);
|
||||
FxExpression *x = new FxConstant(Which == TK_AlignOf ? int(type->Align) : int(type->Size), Operand->ScriptPosition);
|
||||
delete this;
|
||||
return x->Resolve(ctx);
|
||||
}
|
||||
|
|
@ -1811,12 +1811,12 @@ ExpEmit FxAssign::Emit(VMFunctionBuilder *build)
|
|||
assert(ValueType == Base->ValueType && IsNumeric());
|
||||
assert(ValueType->GetRegType() == Right->ValueType->GetRegType());
|
||||
|
||||
ExpEmit result = Right->Emit(build);
|
||||
assert(result.RegType <= REGT_TYPE);
|
||||
|
||||
ExpEmit pointer = Base->Emit(build);
|
||||
Address = pointer;
|
||||
|
||||
ExpEmit result = Right->Emit(build);
|
||||
assert(result.RegType <= REGT_TYPE);
|
||||
|
||||
if (pointer.Target)
|
||||
{
|
||||
if (result.Konst)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue