C# Class Reko.Core.Expressions.ExpressionEmitter

Factory class that has the extra benefit of reducing the verbosity of the code.
Show file Open project: uxmal/reko Class Usage Examples

Public Methods

Method Description
AddrOf ( Expression e ) : UnaryExpression
And ( Expression left, Expression right ) : BinaryExpression
And ( Expression left, ulong right ) : BinaryExpression
Array ( DataType elemType, Expression arrayPtr, Expression index ) : ArrayAccess
Byte ( byte b ) : Constant
Cand ( Expression a, Expression b ) : Expression

Short-circuiting 'and' ('&&' in C family of languages)

Cast ( DataType dataType, Expression expr ) : Cast
Comp ( Expression expr ) : Expression
Cond ( Expression expr ) : ConditionOf
Cor ( Expression a, Expression b ) : Expression

Short-circuiting 'or' ('&&' in C family of languages)

Deref ( Expression a ) : Dereference
Dpb ( Expression dst, Expression src, int offset ) : DepositBits
Eq ( Expression a, Expression b ) : BinaryExpression
Eq ( Expression a, int b ) : BinaryExpression
Eq0 ( Expression exp ) : BinaryExpression
FAdd ( Expression a, Expression b ) : Expression
FDiv ( Expression a, Expression b ) : Expression
FEq ( Expression a, Expression b ) : Expression
FGe ( Expression a, Expression b ) : Expression
FGt ( Expression a, Expression b ) : Expression
FLe ( Expression a, Expression b ) : Expression
FLt ( Expression a, Expression b ) : Expression
FMul ( Expression a, Expression b ) : Expression
FNe ( Expression a, Expression b ) : Expression
FNeg ( Expression a ) : Expression
FSub ( Expression a, Expression b ) : BinaryExpression
Field ( DataType dt, Expression e, Reko.Core.Types.Field field ) : FieldAccess
Field ( DataType dt, Expression e, string fieldName ) : FieldAccess
Fn ( Expression e ) : Application
Fn ( Expression fn, DataType retType ) : Application
Fn ( ExternalProcedure ep ) : Application
Fn ( PseudoProcedure ppp ) : Application
Ge ( Expression a, Expression b ) : Expression
Ge ( Expression a, int b ) : Expression
Ge0 ( Expression exp ) : BinaryExpression
Gt ( Expression a, Expression b ) : Expression
Gt ( Expression a, int b ) : Expression
IAdd ( Expression left, Expression right ) : BinaryExpression

Integer addition.

IAdd ( Expression left, int right ) : BinaryExpression
IMul ( Expression left, Expression right ) : Expression
IMul ( Expression left, int c ) : Expression
ISub ( Expression left, Expression right ) : BinaryExpression
ISub ( Expression left, int right ) : BinaryExpression
Int16 ( short n ) : Constant
Int16 ( uint n ) : Constant
Int32 ( int n ) : Constant
Int32 ( uint n ) : Constant
Int8 ( int n ) : Constant
Le ( Expression a, Expression b ) : BinaryExpression
Le ( Expression a, int b ) : BinaryExpression
Load ( DataType dt, Expression ea ) : MemoryAccess
LoadB ( Expression ea ) : Expression
LoadDw ( Expression ea ) : MemoryAccess
LoadW ( Expression ea ) : MemoryAccess
Lt ( Expression a, Expression b ) : BinaryExpression
Lt ( Expression a, int b ) : BinaryExpression
Lt0 ( Expression exp ) : BinaryExpression
MembPtr8 ( Expression ptr, Expression membPtr ) : MemberPointerSelector
MembPtrW ( Expression ptr, Expression membPtr ) : MemberPointerSelector
Mod ( Expression opLeft, Expression opRight ) : Expression
Ne ( Expression a, Expression b ) : BinaryExpression
Ne ( Expression a, int n ) : BinaryExpression
Ne0 ( Expression expr ) : BinaryExpression
Neg ( Expression expr ) : UnaryExpression
Not ( Expression exp ) : UnaryExpression

Logical not operation

Or ( Expression a, Expression b ) : Expression
Or ( Expression a, int b ) : Expression
Out ( DataType dt, Expression expr ) : OutArgument
Remainder ( Expression a, Expression b ) : Expression
SDiv ( Expression a, Expression b ) : BinaryExpression
SMul ( Expression left, Expression right ) : Expression
SMul ( Expression left, int c ) : Expression
Sar ( Expression e, Expression sh ) : BinaryExpression
Sar ( Expression e, byte sh ) : BinaryExpression
Sar ( Expression e, int sh ) : BinaryExpression
SegMem ( DataType dt, Expression basePtr, Expression ptr ) : SegmentedAccess
SegMemB ( Expression basePtr, Expression ptr ) : SegmentedAccess
SegMemW ( Expression basePtr, Expression ptr ) : SegmentedAccess
Seq ( Expression head, Expression tail ) : MkSequence
Shl ( Expression e, Expression sh ) : BinaryExpression
Shl ( Expression e, int sh ) : BinaryExpression
Shl ( int c, Expression sh ) : BinaryExpression
Shr ( Expression exp, Expression sh ) : BinaryExpression
Shr ( Expression exp, byte c ) : BinaryExpression
Shr ( Expression e, int sh ) : BinaryExpression
Slice ( PrimitiveType primitiveType, Identifier value, uint bitOffset ) : Slice
Test ( ConditionCode cc, Expression expr ) : TestCondition
UDiv ( Expression a, Expression b ) : BinaryExpression
UMul ( Expression left, Expression right ) : Expression
UMul ( Expression left, int c ) : Expression
USub ( Expression left, Expression right ) : BinaryExpression
Uge ( Expression a, Expression b ) : BinaryExpression
Uge ( Expression a, int n ) : BinaryExpression
Ugt ( Expression a, Expression b ) : BinaryExpression
Ule ( Expression a, Expression b ) : BinaryExpression
Ult ( Expression a, Expression b ) : Expression
Ult ( Expression a, int b ) : Expression
Word ( int byteSize, long n ) : Constant
Word16 ( uint n ) : Constant
Word16 ( ushort n ) : Constant
Word32 ( int n ) : Constant
Xor ( Expression a, Expression b ) : Expression

Method Details

AddrOf() public method

public AddrOf ( Expression e ) : UnaryExpression
e Expression
return UnaryExpression

And() public method

public And ( Expression left, Expression right ) : BinaryExpression
left Expression
right Expression
return BinaryExpression

And() public method

public And ( Expression left, ulong right ) : BinaryExpression
left Expression
right ulong
return BinaryExpression

Array() public method

public Array ( DataType elemType, Expression arrayPtr, Expression index ) : ArrayAccess
elemType DataType
arrayPtr Expression
index Expression
return ArrayAccess

Byte() public method

public Byte ( byte b ) : Constant
b byte
return Constant

Cand() public method

Short-circuiting 'and' ('&&' in C family of languages)
public Cand ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

Cast() public method

public Cast ( DataType dataType, Expression expr ) : Cast
dataType DataType
expr Expression
return Cast

Comp() public method

public Comp ( Expression expr ) : Expression
expr Expression
return Expression

Cond() public method

public Cond ( Expression expr ) : ConditionOf
expr Expression
return ConditionOf

Cor() public method

Short-circuiting 'or' ('&&' in C family of languages)
public Cor ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

Deref() public method

public Deref ( Expression a ) : Dereference
a Expression
return Dereference

Dpb() public method

public Dpb ( Expression dst, Expression src, int offset ) : DepositBits
dst Expression
src Expression
offset int
return DepositBits

Eq() public method

public Eq ( Expression a, Expression b ) : BinaryExpression
a Expression
b Expression
return BinaryExpression

Eq() public method

public Eq ( Expression a, int b ) : BinaryExpression
a Expression
b int
return BinaryExpression

Eq0() public method

public Eq0 ( Expression exp ) : BinaryExpression
exp Expression
return BinaryExpression

FAdd() public method

public FAdd ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

FDiv() public method

public FDiv ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

FEq() public method

public FEq ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

FGe() public method

public FGe ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

FGt() public method

public FGt ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

FLe() public method

public FLe ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

FLt() public method

public FLt ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

FMul() public method

public FMul ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

FNe() public method

public FNe ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

FNeg() public method

public FNeg ( Expression a ) : Expression
a Expression
return Expression

FSub() public method

public FSub ( Expression a, Expression b ) : BinaryExpression
a Expression
b Expression
return BinaryExpression

Field() public method

public Field ( DataType dt, Expression e, Reko.Core.Types.Field field ) : FieldAccess
dt DataType
e Expression
field Reko.Core.Types.Field
return FieldAccess

Field() public method

public Field ( DataType dt, Expression e, string fieldName ) : FieldAccess
dt DataType
e Expression
fieldName string
return FieldAccess

Fn() public method

public Fn ( Expression e ) : Application
e Expression
return Application

Fn() public method

public Fn ( Expression fn, DataType retType ) : Application
fn Expression
retType DataType
return Application

Fn() public method

public Fn ( ExternalProcedure ep ) : Application
ep ExternalProcedure
return Application

Fn() public method

public Fn ( PseudoProcedure ppp ) : Application
ppp PseudoProcedure
return Application

Ge() public method

public Ge ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

Ge() public method

public Ge ( Expression a, int b ) : Expression
a Expression
b int
return Expression

Ge0() public method

public Ge0 ( Expression exp ) : BinaryExpression
exp Expression
return BinaryExpression

Gt() public method

public Gt ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

Gt() public method

public Gt ( Expression a, int b ) : Expression
a Expression
b int
return Expression

IAdd() public method

Integer addition.
public IAdd ( Expression left, Expression right ) : BinaryExpression
left Expression
right Expression
return BinaryExpression

IAdd() public method

public IAdd ( Expression left, int right ) : BinaryExpression
left Expression
right int
return BinaryExpression

IMul() public method

public IMul ( Expression left, Expression right ) : Expression
left Expression
right Expression
return Expression

IMul() public method

public IMul ( Expression left, int c ) : Expression
left Expression
c int
return Expression

ISub() public method

public ISub ( Expression left, Expression right ) : BinaryExpression
left Expression
right Expression
return BinaryExpression

ISub() public method

public ISub ( Expression left, int right ) : BinaryExpression
left Expression
right int
return BinaryExpression

Int16() public method

public Int16 ( short n ) : Constant
n short
return Constant

Int16() public method

public Int16 ( uint n ) : Constant
n uint
return Constant

Int32() public method

public Int32 ( int n ) : Constant
n int
return Constant

Int32() public method

public Int32 ( uint n ) : Constant
n uint
return Constant

Int8() public method

public Int8 ( int n ) : Constant
n int
return Constant

Le() public method

public Le ( Expression a, Expression b ) : BinaryExpression
a Expression
b Expression
return BinaryExpression

Le() public method

public Le ( Expression a, int b ) : BinaryExpression
a Expression
b int
return BinaryExpression

Load() public method

public Load ( DataType dt, Expression ea ) : MemoryAccess
dt DataType
ea Expression
return MemoryAccess

LoadB() public method

public LoadB ( Expression ea ) : Expression
ea Expression
return Expression

LoadDw() public method

public LoadDw ( Expression ea ) : MemoryAccess
ea Expression
return MemoryAccess

LoadW() public method

public LoadW ( Expression ea ) : MemoryAccess
ea Expression
return MemoryAccess

Lt() public method

public Lt ( Expression a, Expression b ) : BinaryExpression
a Expression
b Expression
return BinaryExpression

Lt() public method

public Lt ( Expression a, int b ) : BinaryExpression
a Expression
b int
return BinaryExpression

Lt0() public method

public Lt0 ( Expression exp ) : BinaryExpression
exp Expression
return BinaryExpression

MembPtr8() public method

public MembPtr8 ( Expression ptr, Expression membPtr ) : MemberPointerSelector
ptr Expression
membPtr Expression
return MemberPointerSelector

MembPtrW() public method

public MembPtrW ( Expression ptr, Expression membPtr ) : MemberPointerSelector
ptr Expression
membPtr Expression
return MemberPointerSelector

Mod() public method

public Mod ( Expression opLeft, Expression opRight ) : Expression
opLeft Expression
opRight Expression
return Expression

Ne() public method

public Ne ( Expression a, Expression b ) : BinaryExpression
a Expression
b Expression
return BinaryExpression

Ne() public method

public Ne ( Expression a, int n ) : BinaryExpression
a Expression
n int
return BinaryExpression

Ne0() public method

public Ne0 ( Expression expr ) : BinaryExpression
expr Expression
return BinaryExpression

Neg() public method

public Neg ( Expression expr ) : UnaryExpression
expr Expression
return UnaryExpression

Not() public method

Logical not operation
public Not ( Expression exp ) : UnaryExpression
exp Expression
return UnaryExpression

Or() public method

public Or ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

Or() public method

public Or ( Expression a, int b ) : Expression
a Expression
b int
return Expression

Out() public method

public Out ( DataType dt, Expression expr ) : OutArgument
dt DataType
expr Expression
return OutArgument

Remainder() public method

public Remainder ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

SDiv() public method

public SDiv ( Expression a, Expression b ) : BinaryExpression
a Expression
b Expression
return BinaryExpression

SMul() public method

public SMul ( Expression left, Expression right ) : Expression
left Expression
right Expression
return Expression

SMul() public method

public SMul ( Expression left, int c ) : Expression
left Expression
c int
return Expression

Sar() public method

public Sar ( Expression e, Expression sh ) : BinaryExpression
e Expression
sh Expression
return BinaryExpression

Sar() public method

public Sar ( Expression e, byte sh ) : BinaryExpression
e Expression
sh byte
return BinaryExpression

Sar() public method

public Sar ( Expression e, int sh ) : BinaryExpression
e Expression
sh int
return BinaryExpression

SegMem() public method

public SegMem ( DataType dt, Expression basePtr, Expression ptr ) : SegmentedAccess
dt DataType
basePtr Expression
ptr Expression
return SegmentedAccess

SegMemB() public method

public SegMemB ( Expression basePtr, Expression ptr ) : SegmentedAccess
basePtr Expression
ptr Expression
return SegmentedAccess

SegMemW() public method

public SegMemW ( Expression basePtr, Expression ptr ) : SegmentedAccess
basePtr Expression
ptr Expression
return SegmentedAccess

Seq() public method

public Seq ( Expression head, Expression tail ) : MkSequence
head Expression
tail Expression
return MkSequence

Shl() public method

public Shl ( Expression e, Expression sh ) : BinaryExpression
e Expression
sh Expression
return BinaryExpression

Shl() public method

public Shl ( Expression e, int sh ) : BinaryExpression
e Expression
sh int
return BinaryExpression

Shl() public method

public Shl ( int c, Expression sh ) : BinaryExpression
c int
sh Expression
return BinaryExpression

Shr() public method

public Shr ( Expression exp, Expression sh ) : BinaryExpression
exp Expression
sh Expression
return BinaryExpression

Shr() public method

public Shr ( Expression exp, byte c ) : BinaryExpression
exp Expression
c byte
return BinaryExpression

Shr() public method

public Shr ( Expression e, int sh ) : BinaryExpression
e Expression
sh int
return BinaryExpression

Slice() public method

public Slice ( PrimitiveType primitiveType, Identifier value, uint bitOffset ) : Slice
primitiveType PrimitiveType
value Identifier
bitOffset uint
return Slice

Test() public method

public Test ( ConditionCode cc, Expression expr ) : TestCondition
cc ConditionCode
expr Expression
return TestCondition

UDiv() public method

public UDiv ( Expression a, Expression b ) : BinaryExpression
a Expression
b Expression
return BinaryExpression

UMul() public method

public UMul ( Expression left, Expression right ) : Expression
left Expression
right Expression
return Expression

UMul() public method

public UMul ( Expression left, int c ) : Expression
left Expression
c int
return Expression

USub() public method

public USub ( Expression left, Expression right ) : BinaryExpression
left Expression
right Expression
return BinaryExpression

Uge() public method

public Uge ( Expression a, Expression b ) : BinaryExpression
a Expression
b Expression
return BinaryExpression

Uge() public method

public Uge ( Expression a, int n ) : BinaryExpression
a Expression
n int
return BinaryExpression

Ugt() public method

public Ugt ( Expression a, Expression b ) : BinaryExpression
a Expression
b Expression
return BinaryExpression

Ule() public method

public Ule ( Expression a, Expression b ) : BinaryExpression
a Expression
b Expression
return BinaryExpression

Ult() public method

public Ult ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression

Ult() public method

public Ult ( Expression a, int b ) : Expression
a Expression
b int
return Expression

Word() public method

public Word ( int byteSize, long n ) : Constant
byteSize int
n long
return Constant

Word16() public method

public Word16 ( uint n ) : Constant
n uint
return Constant

Word16() public method

public Word16 ( ushort n ) : Constant
n ushort
return Constant

Word32() public method

public Word32 ( int n ) : Constant
n int
return Constant

Xor() public method

public Xor ( Expression a, Expression b ) : Expression
a Expression
b Expression
return Expression