- cleanup of the remaining FxBinary operators.

- changed FxCompareEq with strings and other types that can be cast to from a string always convert the string to the other type before comparing.
This commit is contained in:
Christoph Oelckers 2016-11-18 14:19:55 +01:00
commit f71aad4cdd
4 changed files with 256 additions and 259 deletions

View file

@ -813,8 +813,7 @@ public:
FxBinary(int, FxExpression*, FxExpression*);
~FxBinary();
bool ResolveLR(FCompileContext& ctx, bool castnumeric);
void Promote(FCompileContext &ctx);
bool Promote(FCompileContext &ctx, bool forceint = false);
};
//==========================================================================
@ -899,11 +898,26 @@ public:
//
//==========================================================================
class FxBinaryInt : public FxBinary
class FxBitOp : public FxBinary
{
public:
FxBinaryInt(int, FxExpression*, FxExpression*);
FxBitOp(int, FxExpression*, FxExpression*);
FxExpression *Resolve(FCompileContext&);
ExpEmit Emit(VMFunctionBuilder *build);
};
//==========================================================================
//
// FxBinary
//
//==========================================================================
class FxShift : public FxBinary
{
public:
FxShift(int, FxExpression*, FxExpression*);
FxExpression *Resolve(FCompileContext&);
ExpEmit Emit(VMFunctionBuilder *build);
};