C# Class Fanx.Emit.FCodeEmit

FCodeEmit translates FCode fcode to IL bytecode.
Mostrar archivo Open project: xored/f4 Class Usage Examples

Public Methods

Method Description
FCodeEmit ( FTypeEmit parent, FBuf fcode, CILInstructions code, System.Reg regs, FTypeRef ret ) : System
FCodeEmit ( FTypeEmit parent, FMethod fmethod, CILInstructions code ) : System
emit ( ) : void

Translate fcode to IL.

emit ( bool debug ) : void

Private Methods

Method Description
@as ( ) : void
@is ( ) : void
Peek ( int index ) : int
boolBox ( ) : void
boolUnbox ( bool cast ) : void
callCtor ( ) : void
callMixinNonVirtual ( ) : void
callMixinStatic ( ) : void
callMixinVirtual ( ) : void
callNew ( ) : void
callNonVirtual ( ) : void
callStatic ( ) : void
callVirtual ( ) : void
cast ( ) : void
catchAllStart ( ) : void
catchEnd ( ) : void
catchErrStart ( ) : void
coerce ( ) : void
compare ( ) : void
compareEQ ( ) : void
compareGE ( ) : void
compareGT ( ) : void
compareLE ( ) : void
compareLT ( ) : void
compareNE ( ) : void
compareNotNull ( ) : void
compareNotSame ( ) : void
compareNull ( ) : void
compareSame ( ) : void
consumeOp ( ) : int
doCompare ( string suffix ) : void
doCompare ( string suffix, FTypeRef lhs, FTypeRef rhs ) : void
doLeave ( ) : void
doThrow ( ) : void
dup ( ) : void
emitInstructions ( ) : void

Map fcode instructions to IL instructions.

finallyEnd ( ) : void
finallyStart ( ) : void
floatBox ( ) : void
floatUnbox ( bool cast ) : void
getLastTryBlock ( ) : TryBlock
initRegs ( FPod pod, bool isStatic, FMethodVar vars ) : System.Reg[]

Map to .NET register info for the given Fantom local variables.

intBox ( ) : void
intUnbox ( bool cast ) : void
jump ( ) : void
jumpFalse ( ) : void
jumpTrue ( ) : void
loadDecimal ( ) : void
loadDuration ( ) : void
loadFalse ( ) : void
loadFloat ( ) : void
loadInstance ( ) : void
loadInt ( ) : void
loadIntVal ( ) : void
loadMixinStatic ( ) : void
loadStatic ( ) : void
loadStr ( ) : void
loadTrue ( ) : void
loadType ( ) : void
loadType ( FTypeRef tref ) : void
loadUri ( ) : void
loadVar ( ) : void
loadVar ( CILInstructions code, int stackType, int index ) : void

Load variable onto stack using Java type and java index (which might not map to Fantom index. Return next available java index

loadVar ( CILInstructions code, int stackType, int index, int paramCount ) : void
makeErrTable ( ) : void

Process error table (if specified). We handle catches of Err using a catch any (0 class index). We also need to add extra entries into the exception table for special exceptions - for example NullErr get's mapped as fan.sys.NullErr+Val and java.lang.NullPointerException.

makeLineNumbers ( ) : void

Read out the line numbers and stick them in a hashmap.

maxLocals ( System.Reg regs ) : int

Given a list of registers compute the max locals.

peekOp ( ) : int
pop ( ) : void
reg ( int fanIndex ) : System.Reg
returnOp ( ) : void
storeInstance ( ) : void
storeMixinStatic ( ) : void
storeStatic ( ) : void
storeVar ( ) : void
storeVar ( int stackType, int index ) : void
tableswitch ( ) : void
typeToNullable ( ) : void
u1 ( ) : int
u2 ( ) : int
u4 ( ) : int
varStackType ( int index ) : int

Method Details

FCodeEmit() public method

public FCodeEmit ( FTypeEmit parent, FBuf fcode, CILInstructions code, System.Reg regs, FTypeRef ret ) : System
parent FTypeEmit
fcode Fanx.Fcode.FBuf
code PERWAPI.CILInstructions
regs System.Reg
ret Fanx.Fcode.FTypeRef
return System

FCodeEmit() public method

public FCodeEmit ( FTypeEmit parent, FMethod fmethod, CILInstructions code ) : System
parent FTypeEmit
fmethod Fanx.Fcode.FMethod
code PERWAPI.CILInstructions
return System

emit() public method

Translate fcode to IL.
public emit ( ) : void
return void

emit() public method

public emit ( bool debug ) : void
debug bool
return void