The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
CodeGeneration.ILCodeGenerator Class Referenceabstract
Inheritance diagram for CodeGeneration.ILCodeGenerator:
CodeGeneration.CodeGenerator CodeGeneration.CLRCodeGenerator CodeGeneration.RrotorCodeGenerator

Public Member Functions

 ILCodeGenerator (TextWriter output)
 
override void InitialComment ()
 Displays de comment to show in the first line of il file. More...
 
override void Comment (string msg)
 Writes the specified message as a comment in il language More...
 
override void Comment (int indent, string msg)
 
override void WriteLabel (int indentation, string label)
 Writes a label in il. Format –indentation– LABEL:
More...
 
override void WriteType (TypeExpression type)
 Writes the current type information More...
 
override void WriteHeader (string fileName)
 Writes the header of the il code file. More...
 
override void WriteNamespaceHeader (int indent, string name)
 Writes the namespace header of an IL file. More...
 
virtual void WriteClassName (string name)
 
virtual void WriteClassExtends (ClassType type)
 
virtual void WriteClassImplements (ClassType type)
 
override void WriteLNClassHeader (int indent, string name, ClassType type)
 Writes the class header in IL code More...
 
override void WriteEndOfClass (int indent, string name)
 Writes the class termination acoording to IL code More...
 
override void WriteInterfaceHeader (int indent, string name, InterfaceType type)
 Writes the interface header More...
 
override void WriteEndOfInterface (int indent, string name)
 Writes the interface termination More...
 
virtual void ProcessField (int indent, FieldDeclaration node, Object obj, bool constantField)
 
override void WriteField (int indent, string name, FieldType type, bool constantField)
 Writes the field header. More...
 
override void WriteLNFieldInitialization (TypeExpression type)
 Writes the field inicialization. More...
 
override void WriteEndOfField ()
 Writes the field termination More...
 
override void WriteStartBlock (int indent)
 Writes the block inicialization More...
 
override void WriteEndOfBlock (int indent)
 Writes the termination token More...
 
override void WriteLNMethodHeader (int indent, string name, MethodType type)
 Writes the method header. More...
 
virtual void WriteMethodTypeOfAccess (string name, MethodType type)
 
virtual void WriteMethodParameters (MethodType type)
 
override void WriteEndOfMethod (int indent, string name)
 Writes the method termination. It writes also en end of line More...
 
override void WriteParams (MethodType memberType, AST.CompoundExpression arguments)
 
override void AddLocalVariable (string name, TypeExpression type)
 Stores the information of the local variable. More...
 
override void WriteLocalVariable (int indent)
 Writes the information of local variables. More...
 
override void WriteAuxiliarLocalVariable (int indent, string id, string type)
 Writes the information of local variables. More...
 
override void WriteEntryPoint (int indent)
 Writes the entrypoint directive. More...
 
override void WriteTryDirective (int indent)
 
override void WriteOpenBraceTry (int indent)
 
override void WriteCloseBraceTry (int indent)
 
void WriteRethrow (int indent)
 
override void WriteCatch (int indent, String type, String var)
 
override void WriteOpenBraceCatch (int indent)
 
override void WriteCloseBraceCatch (int indent)
 
override void WriteFinally (int indent)
 
override void WriteOpenBraceFinally (int indent)
 
override void WriteCloseBraceFinally (int indent)
 
virtual void WriteThrowMissingMethodException (int indent, string method)
 
virtual void WriteThrowNonSuitableObjectException (int indent, string klass, string method)
 
void AddExceptionCode (DynamicExceptionManager typeException)
 Adds the information of specified exception to include in intermediate code file. More...
 
virtual void Exit (int indent, int res)
 Checks if the union type can to promote to the specified type. More...
 
void Promotion (int indent, TypeExpression typeExp1, TypeExpression certainType1, TypeExpression typeExp2, TypeExpression certainType2, bool unidirectionalConversion, bool makeBoxing)
 Writes the il code to promote typeExp1 to typeExp2 More...
 
override void WriteThrowException (int indent, DynamicExceptionManager dynException)
 Writes the generation code to throw a specified exception. More...
 
override void WriteThrowException (int indent, string ex, string[] msg)
 Writes the code to throw an exception derived from Exception without using DynamicExceptionManager . More...
 
void ldobj (int indent, TypeExpression val)
 Writes the ldobj instruction. More...
 
void ldstr (int indent, string val)
 Writes the ldstr instruction. More...
 
void ldnull (int indent)
 Writes the ldnull instruction. More...
 
void newobj (int indent, MethodType memberType, TypeExpression obj, string member)
 Writes the newobj instruction. More...
 
void newobj (int indent, string klass, string[] args)
 Writes the newobj instruction More...
 
void castclass (int indent, TypeExpression token)
 Writes the castclass instruction. More...
 
void WriteThrow (int indent)
 Writes the throw instruction. More...
 
void ldarg (int indent, int argNumber)
 ldarg <unsigned int16>=""> Load the argument number <unsigned int16>=""> on the stack. The argument enumeration is zero-based, but it’s important to remember that instance methods have an 'invisible' argument not specified in the method signature: the class instance pointer, this, which is always argument number 0. Because static methods don’t have such an 'invisible' argument, for them argument number 0 is the first argument specified in More...
 
void ldarg (int indent, string argName)
 Writes the ldarg instruction. Unsing argument names instead of numbers. See ldar(int, int) above More...
 
void ldarga (int indent, string argName)
 Writes the ldarga instruction, that loads the direction of argument with name argName. More...
 
void starg (int indent, int argNumber)
 starg <unsigned int16>=""> Take a value from the stack and store it in argument slot number <unsigned int16>="">. The value on the stack must be of the same type as the argument slot or must be convertible to the type of the argument slot. The convertibility rules and effects are the same as those for conversion operations, discussed earlier in this chapter. With vararg methods, the starg instruction cannot target the arguments of the variable part of the signature. More...
 
void starg (int indent, string argNumber)
 Writes the starg instruction. More...
 
void arglist (int indent)
 Writes the arglist instruction. More...
 
void add (int indent)
 Writes the add instruction. More...
 
void concat (int indent)
 Writes the concat instruction for string types. More...
 
void mul (int indent)
 Writes the mul instruction. More...
 
void div (int indent)
 Writes the div instruction. More...
 
void neg (int indent)
 Writes the neg instruction. More...
 
void rem (int indent)
 Writes the rem instruction. More...
 
void sub (int indent)
 Writes the sub instruction. More...
 
void and (int indent)
 Writes the and instruction. More...
 
void or (int indent)
 Writes the or instruction. More...
 
void xor (int indent)
 Writes the xor instruction. More...
 
void not (int indent)
 Bitwise inversion (unary). This operation, rather than neg, is recommended for integer sign inversion because neg has a problem with the maximum negative numbers: More...
 
override void Box (int indent, TypeExpression type)
 Writes the Box instruction More...
 
override void BoxIfNeeded (int indent, TypeExpression type)
 Makes sure to convert a type to an object More...
 
virtual void UnBoxIfNeeded (int indent, TypeExpression type)
 Convert and OBject to a valuetype if is not an reference type /// More...
 
override void Unbox (int indent, TypeExpression type)
 Writes the Unbox instruction More...
 
override void Call (int indent, MethodType memberType, TypeExpression obj, string member)
 Writes the call instruction. More...
 
override void Call (int indent, PropertyType memberType, TypeExpression obj, string member, bool setProperty)
 Writes the call instruction. More...
 
override void Call (int indent, string methodType, string result, string klass, string memberName, string[] args)
 Writes the call instruction More...
 
override void CallVirt (int indent, MethodType memberType, TypeExpression klass, string member, AST.CompoundExpression arguments)
 Writes the CallVirt instruction. More...
 
override void CallVirt (int indent, PropertyType memberType, TypeExpression obj, string member, bool setProperty)
 Writes the CallVirt instruction. More...
 
override void CallVirt (int indent, string methodType, string result, string klass, string memberName, string[] args)
 Writes the CallVirt instruction More...
 
void beq (int indent, string label)
 Writes the beq instruction. More...
 
void bne (int indent, string label)
 Writes the bne instruction. More...
 
void bge (int indent, string label)
 Writes the bge instruction. More...
 
void bgt (int indent, string label)
 Writes the bgt instruction. More...
 
void ble (int indent, string label)
 Writes the ble instruction. More...
 
void blt (int indent, string label)
 Writes the blt instruction. More...
 
void ldci4 (int indent, int val)
 Writes the ldc.i4 instruction. More...
 
void ldcr8 (int indent, string val)
 Writes the ldc.i8 instruction. More...
 
void ldc (int indent, bool val)
 Writes the ldc instruction. More...
 
void ldtoken (int indent, string ILType)
 Writes the ldtoken instruction. More...
 
void constructorCall (int indent, MethodType memberType, TypeExpression obj, string member)
 Writes the call instruction. More...
 
void constructorCall (int indent, TypeExpression obj, string member)
 Writes the call instruction. More...
 
void convToInt (int indent)
 Writes the conv.i4 instruction. More...
 
void convToChar (int indent)
 Writes the conv.u2 instruction. More...
 
void convToDouble (int indent)
 Writes the conv.r8 instruction. More...
 
void ldfld (int indent, TypeExpression type, string classId, string fieldName)
 Writes the ldfld instruction. More...
 
void ldsfld (int indent, TypeExpression type, string classId, string fieldName)
 Writes the ldsfld instruction. More...
 
void ldflda (int indent, TypeExpression type, string classId, string fieldName)
 Writes the ldflda instruction. More...
 
void ldflda (int indent, string token)
 Writes the ldflda instruction. More...
 
void ldsflda (int indent, TypeExpression type, string classId, string fieldName)
 Writes the ldsflda instruction. More...
 
void ldsflda (int indent, string token)
 Writes the ldsflda instruction. More...
 
void stfld (int indent, TypeExpression type, string classId, string fieldName)
 Writes the stfld instruction. More...
 
void stsfld (int indent, TypeExpression type, string classId, string fieldName)
 Writes the stsfld instruction. More...
 
void ret (int indent)
 Writes the ret instruction. More...
 
void ldloc (int indent, int locNumber)
 Writes the ldloc instruction. More...
 
void ldloc (int indent, string locVar)
 Writes the ldloc instruction. More...
 
void ldloca (int indent, int locNumber)
 Writes the ldloca instruction. More...
 
void ldloca (int indent, string locVar)
 Writes the ldloca instruction. More...
 
void ldloca_s (int indent, string tmpVar)
 loads the content of variable tmpVar in the top of the stack More...
 
void stloc (int indent, int locNumber)
 Writes the stloc instruction. More...
 
void stloc_s (int indent, string variable)
 Writes the stloc.s instruction. More...
 
void stloc (int indent, string locVar)
 Writes the ldloc instruction. More...
 
void ceq (int indent)
 Writes the ceq instruction. More...
 
void cgt (int indent)
 Writes the cgt instruction. More...
 
void clt (int indent)
 Writes the clt instruction. More...
 
void isinst (int indent, TypeExpression token)
 Writes the isinst instruction. About the isinst Instruction. It takes two arguments: an object reference and a metadata token representing the type of reference desired. It generates code that examines the object's type handle to determine whether or not the object's type is compatible with the requested type. If the test succeeds, it leaves the object reference on the evaluation stack. If the test fails, puts a null reference onto the evaluation stack if the test fails More...
 
void shl (int indent)
 Writes the shl instruction. More...
 
void shr (int indent)
 Writes the shr instruction. More...
 
void nop (int indent)
 Writes a nop instruction. More...
 
void dup (int indent)
 Writes a dup instruction. More...
 
void pop (int indent)
 Writes a pop instruction. More...
 
void WriteLeave (int indentation, string label)
 Write leave.s label More...
 
abstract override void UnboxAny (int indent, TypeExpression type)
 Writes the Unbox instruction More...
 
void br (int indent, string label)
 Writes the br instruction. More...
 
void brfalse (int indent, string label)
 Writes the brfalse instruction. More...
 
void brtrue (int indent, string label)
 Writes the brtrue instruction. More...
 
virtual void newarr (int indent, TypeExpression token)
 Writes the newarr instruction. More...
 
virtual void newarr (int indent, string type)
 Writes the newarr instruction. More...
 
virtual void ldlen (int indent, TypeExpression token)
 Writes the ldlen instruction. More...
 
virtual void ldelemInt (int indent)
 Writes the ldelem.i4 instruction. More...
 
virtual void ldelemChar (int indent)
 Writes the ldelem.u2 instruction. More...
 
virtual void ldelemDouble (int indent)
 Writes the ldelem.r8 instruction. More...
 
virtual void ldelemRef (int indent)
 Writes the ldelem.ref instruction. More...
 
virtual void stelemInt (int indent)
 Writes the stelem.i4 instruction. More...
 
virtual void stelemDouble (int indent)
 Writes the stelem.r8 instruction. More...
 
virtual void stelemRef (int indent)
 Writes the stelem.ref instruction. More...
 
void WriteLine (int indentation, string msg)
 
void WriteLine ()
 
- Public Member Functions inherited from CodeGeneration.CodeGenerator
 CodeGenerator (TextWriter writer)
 Constructor of CodeGenerator. More...
 
virtual void WriteLNFieldInitialization (string init)
 Writes the field inicialization expression. More...
 
virtual void WriteCodeOfExceptions ()
 Implements Template Method Pattern Writes the intermediate code for each exceptions to include More...
 
virtual void WriteEntryPoint ()
 
void Close ()
 Close the writer More...
 
virtual TypeExpression MakeCall (int indent, InvocationExpression node, Object o, MethodType actualMethodCalled, FieldAccessExpression fieldAccessExpression, object arg)
 

Protected Member Functions

virtual void WriteLNMethodEndOfHeader ()
 
virtual void WriteMethodModifiers (int indent, MethodType type)
 
bool IsValueType (TypeExpression exp)
 
override void WriteCodeOfExceptionsTemplateMethod (DynamicExceptionManager d)
 Implements Template Method More...
 
virtual void WriteCallArguments (MethodType memberType, TypeExpression klass, string member, AST.CompoundExpression arguments)
 Writes the 'token' of call instructions. More...
 
virtual void WriteCall (MethodType memberType, TypeExpression klass, string member, AST.CompoundExpression arguments)
 Writes the 'token' of call instructions. More...
 

Protected Attributes

ILStatementsCodeGeneration ilStamentsCodeGeneration
 
- Protected Attributes inherited from CodeGeneration.CodeGenerator
TextWriter output
 Writer to write the intermediate code. More...
 
StringBuilder currentLocalVars
 Stores the current information about local variables. More...
 
int currentLabel
 Represents the value of the current label. More...
 
Dictionary< string,
DynamicExceptionManager
exceptions
 List of exceptions that is necessary to include in intermediate code file. More...
 

Properties

override string NewLabel [get]
 
int LocalVariableIndex [get, set]
 
- Properties inherited from CodeGeneration.CodeGenerator
abstract string NewLabel [get]
 Gets the value of the current label More...
 

Detailed Description

Definition at line 8 of file ILCodeGenerator.cs.

Constructor & Destructor Documentation

CodeGeneration.ILCodeGenerator.ILCodeGenerator ( TextWriter  output)

Definition at line 39 of file ILCodeGenerator.cs.

Member Function Documentation

void CodeGeneration.ILCodeGenerator.add ( int  indent)

Writes the add instruction.

Parameters
indentIndentation to use.

Definition at line 1217 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.AddExceptionCode ( DynamicExceptionManager  typeException)

Adds the information of specified exception to include in intermediate code file.

Parameters
typeExceptionException to include.

Definition at line 591 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.AddLocalVariable ( string  name,
TypeExpression  type 
)
virtual

Stores the information of the local variable.

Parameters
nameLocal variable identifier.
typeLocal variable type.

Implements CodeGeneration.CodeGenerator.

Definition at line 458 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.and ( int  indent)

Writes the and instruction.

Parameters
indentIndentation to use.

Definition at line 1320 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.arglist ( int  indent)

Writes the arglist instruction.

Parameters
indentIndentation to use.

Definition at line 1195 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.beq ( int  indent,
string  label 
)

Writes the beq instruction.

Parameters
indentIndentation to use.
labelLabel to jump.

Definition at line 1641 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.bge ( int  indent,
string  label 
)

Writes the bge instruction.

Parameters
indentIndentation to use.
labelLabel to jump.

Definition at line 1673 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.bgt ( int  indent,
string  label 
)

Writes the bgt instruction.

Parameters
indentIndentation to use.
labelLabel to jump.

Definition at line 1689 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ble ( int  indent,
string  label 
)

Writes the ble instruction.

Parameters
indentIndentation to use.
labelLabel to jump.

Definition at line 1705 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.blt ( int  indent,
string  label 
)

Writes the blt instruction.

Parameters
indentIndentation to use.
labelLabel to jump.

Definition at line 1721 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.bne ( int  indent,
string  label 
)

Writes the bne instruction.

Parameters
indentIndentation to use.
labelLabel to jump.

Definition at line 1657 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.Box ( int  indent,
TypeExpression  type 
)
virtual

Writes the Box instruction

Parameters
indentIndentation to use.
typeConverts to this object reference.

Implements CodeGeneration.CodeGenerator.

Definition at line 1384 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.BoxIfNeeded ( int  indent,
TypeExpression  type 
)
virtual

Makes sure to convert a type to an object

Parameters
indentIndentation level
typeThe type to be promoted

Implements CodeGeneration.CodeGenerator.

Definition at line 1393 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.br ( int  indent,
string  label 
)

Writes the br instruction.

Parameters
indentIndentation to use.
labelLabel to jump.

Definition at line 2362 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.brfalse ( int  indent,
string  label 
)

Writes the brfalse instruction.

Parameters
indentIndentation to use.
labelLabel to jump.

Definition at line 2378 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.brtrue ( int  indent,
string  label 
)

Writes the brtrue instruction.

Parameters
indentIndentation to use.
labelLabel to jump.

Definition at line 2394 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.Call ( int  indent,
MethodType  memberType,
TypeExpression  obj,
string  member 
)
virtual

Writes the call instruction.

Parameters
indentIndentation to use.
memberTypeMember type.
objObject to access to the member.
memberMember to call.

Implements CodeGeneration.CodeGenerator.

Definition at line 1489 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.Call ( int  indent,
PropertyType  memberType,
TypeExpression  obj,
string  member,
bool  setProperty 
)
virtual

Writes the call instruction.

Parameters
indentIndentation to use.
memberTypeMember type.
objObject to access to the member.
memberMember to call.
setPropertyTrue if it is a set property. False if it is a get property.

Implements CodeGeneration.CodeGenerator.

Definition at line 1503 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.Call ( int  indent,
string  methodType,
string  result,
string  klass,
string  memberName,
string[]  args 
)
virtual

Writes the call instruction

Parameters
indentText Indentation
methodTypeQualifiers of the method
resultReturn type
klassClass type
memberNameName of the member
argsTypes of parameters

Implements CodeGeneration.CodeGenerator.

Definition at line 1519 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.CallVirt ( int  indent,
MethodType  memberType,
TypeExpression  klass,
string  member,
AST.CompoundExpression  arguments 
)
virtual

Writes the CallVirt instruction.

Parameters
indentIndentation to use.
memberTypeMember type.
klassClass to access to the member.
memberMember to call.
argumentsActual arguments

Implements CodeGeneration.CodeGenerator.

Definition at line 1541 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.CallVirt ( int  indent,
PropertyType  memberType,
TypeExpression  obj,
string  member,
bool  setProperty 
)
virtual

Writes the CallVirt instruction.

Parameters
indentIndentation to use.
memberTypeMember type.
objObject to access to the member.
memberMember to call.
setPropertyTrue if it is a set property. False if it is a get property.

Implements CodeGeneration.CodeGenerator.

Definition at line 1555 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.CallVirt ( int  indent,
string  methodType,
string  result,
string  klass,
string  memberName,
string[]  args 
)
virtual

Writes the CallVirt instruction

Parameters
indentText Indentation
methodTypeQualifiers of the method
resultReturn type
klassClass type
memberNameName of the member
argsTypes of parameters

Implements CodeGeneration.CodeGenerator.

Definition at line 1571 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.castclass ( int  indent,
TypeExpression  token 
)

Writes the castclass instruction.

Parameters
indentIndentation to use.
tokenType of the new instance.

Definition at line 1095 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ceq ( int  indent)

Writes the ceq instruction.

Parameters
indentIndentation to use.

Definition at line 2171 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.cgt ( int  indent)

Writes the cgt instruction.

Parameters
indentIndentation to use.

Definition at line 2188 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.clt ( int  indent)

Writes the clt instruction.

Parameters
indentIndentation to use.

Definition at line 2203 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.Comment ( string  msg)
virtual

Writes the specified message as a comment in il language

Parameters
msgMessage to write.

Implements CodeGeneration.CodeGenerator.

Definition at line 78 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.Comment ( int  indent,
string  msg 
)
virtual

Writes the specified message stored in msg in a comment wrapped in the proper format of the target langage.

Parameters
msgcomment to write.
indentindentation to use

Implements CodeGeneration.CodeGenerator.

Definition at line 87 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.concat ( int  indent)

Writes the concat instruction for string types.

Parameters
indentIndentation to use.

Definition at line 1225 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.constructorCall ( int  indent,
MethodType  memberType,
TypeExpression  obj,
string  member 
)

Writes the call instruction.

Parameters
indentIndentation to use.
memberTypeMember type.
objObject to access to the member.
memberMember to call.

Definition at line 1808 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.constructorCall ( int  indent,
TypeExpression  obj,
string  member 
)

Writes the call instruction.

Parameters
indentIndentation to use.
objObject to access to the member.
memberMember to call.

Definition at line 1820 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.convToChar ( int  indent)

Writes the conv.u2 instruction.

Parameters
indentIndentation to use.

Definition at line 1853 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.convToDouble ( int  indent)

Writes the conv.r8 instruction.

Parameters
indentIndentation to use.

Definition at line 1869 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.convToInt ( int  indent)

Writes the conv.i4 instruction.

Parameters
indentIndentation to use.

Definition at line 1838 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.div ( int  indent)

Writes the div instruction.

Parameters
indentIndentation to use.

Definition at line 1255 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.dup ( int  indent)

Writes a dup instruction.

Parameters
indentIndentation to use.

Definition at line 2300 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.Exit ( int  indent,
int  res 
)
virtual

Checks if the union type can to promote to the specified type.

Parameters
indentIndentation to write.
unionUnion type to check.
typeWriteType to promote.

generates exit environment function of the OS

Parameters
indent
resCode to return to the operative system

Definition at line 646 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.InitialComment ( )
virtual

Displays de comment to show in the first line of il file.

Implements CodeGeneration.CodeGenerator.

Definition at line 51 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.isinst ( int  indent,
TypeExpression  token 
)

Writes the isinst instruction. About the isinst Instruction. It takes two arguments: an object reference and a metadata token representing the type of reference desired. It generates code that examines the object's type handle to determine whether or not the object's type is compatible with the requested type. If the test succeeds, it leaves the object reference on the evaluation stack. If the test fails, puts a null reference onto the evaluation stack if the test fails

Parameters
indentIndentation to use.
tokenType of the new instance.

Definition at line 2225 of file ILCodeGenerator.cs.

bool CodeGeneration.ILCodeGenerator.IsValueType ( TypeExpression  exp)
protected

Definition at line 806 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldarg ( int  indent,
int  argNumber 
)

ldarg <unsigned int16>=""> Load the argument number <unsigned int16>=""> on the stack. The argument enumeration is zero-based, but it’s important to remember that instance methods have an 'invisible' argument not specified in the method signature: the class instance pointer, this, which is always argument number 0. Because static methods don’t have such an 'invisible' argument, for them argument number 0 is the first argument specified in

Parameters
indentIndentation to use.
argNumberArgument number to load.

Definition at line 1131 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldarg ( int  indent,
string  argName 
)

Writes the ldarg instruction. Unsing argument names instead of numbers. See ldar(int, int) above

Parameters
indentIndentation to use.
argNameArgument name to load.

Definition at line 1140 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldarga ( int  indent,
string  argName 
)

Writes the ldarga instruction, that loads the direction of argument with name argName.

Parameters
indentIndentation to use.
argNameArgument name to load.

Definition at line 1152 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldc ( int  indent,
bool  val 
)

Writes the ldc instruction.

Parameters
indentIndentation to use.
valValue to load if true ldc.

Definition at line 1775 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldci4 ( int  indent,
int  val 
)

Writes the ldc.i4 instruction.

Parameters
indentIndentation to use.
valValue to load.

Definition at line 1741 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldcr8 ( int  indent,
string  val 
)

Writes the ldc.i8 instruction.

Parameters
indentIndentation to use.
valValue to load.

Definition at line 1760 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.ldelemChar ( int  indent)
virtual

Writes the ldelem.u2 instruction.

Parameters
indentIndentation to use.

Definition at line 2464 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.ldelemDouble ( int  indent)
virtual

Writes the ldelem.r8 instruction.

Parameters
indentIndentation to use.

Definition at line 2476 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.ldelemInt ( int  indent)
virtual

Writes the ldelem.i4 instruction.

Parameters
indentIndentation to use.

Definition at line 2456 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.ldelemRef ( int  indent)
virtual

Writes the ldelem.ref instruction.

Parameters
indentIndentation to use.

Definition at line 2487 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldfld ( int  indent,
TypeExpression  type,
string  classId,
string  fieldName 
)

Writes the ldfld instruction.

Parameters
indentIndentation to use.
typeField type.
classIdClass identifier of the field.
fieldNameField identifier.

ldfld NS.Class::field

Definition at line 1894 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldflda ( int  indent,
TypeExpression  type,
string  classId,
string  fieldName 
)

Writes the ldflda instruction.

Parameters
indentIndentation to use.
typeField type.
classIdClass identifier of the field.
fieldNameField identifier.

Definition at line 1945 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldflda ( int  indent,
string  token 
)

Writes the ldflda instruction.

Parameters
indentIndentation to use.
tokenFull field specification

Definition at line 1954 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.ldlen ( int  indent,
TypeExpression  token 
)
virtual

Writes the ldlen instruction.

Parameters
indentIndentation to use.

TODO: para qué sirve el parámetro token?

Definition at line 2441 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldloc ( int  indent,
int  locNumber 
)

Writes the ldloc instruction.

Parameters
indentIndentation to use.
locNumberLocal variable number to load.

Definition at line 2071 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldloc ( int  indent,
string  locVar 
)

Writes the ldloc instruction.

Parameters
indentIndentation to use.
locNumberLocal variable to load.

Definition at line 2080 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldloca ( int  indent,
int  locNumber 
)

Writes the ldloca instruction.

Parameters
indentIndentation to use.
locNumberLocal variable number to load.

Definition at line 2097 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldloca ( int  indent,
string  locVar 
)

Writes the ldloca instruction.

Parameters
indentIndentation to use.
locVarLocal variable to load.

Definition at line 2106 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldloca_s ( int  indent,
string  tmpVar 
)

loads the content of variable tmpVar in the top of the stack

Parameters
tmpVarvar to be dumped in the top of the stack

Definition at line 2114 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldnull ( int  indent)

Writes the ldnull instruction.

Parameters
indentIndentation to use.

Definition at line 1039 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldobj ( int  indent,
TypeExpression  val 
)

Writes the ldobj instruction.

Parameters
indentIndentation to use.
valValue to load.

Definition at line 1006 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldsfld ( int  indent,
TypeExpression  type,
string  classId,
string  fieldName 
)

Writes the ldsfld instruction.

Parameters
indentIndentation to use.
typeField type.
classIdClass identifier of the field.
fieldNameField identifier.

Definition at line 1922 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldsflda ( int  indent,
TypeExpression  type,
string  classId,
string  fieldName 
)

Writes the ldsflda instruction.

Parameters
indentIndentation to use.
typeField type.
classIdClass identifier of the field.
fieldNameField identifier.

Definition at line 1969 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldsflda ( int  indent,
string  token 
)

Writes the ldsflda instruction.

Parameters
indentIndentation to use.
tokenFull field specification

Definition at line 1978 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldstr ( int  indent,
string  val 
)

Writes the ldstr instruction.

Parameters
indentIndentation to use.
valValue to load.

Definition at line 1022 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ldtoken ( int  indent,
string  ILType 
)

Writes the ldtoken instruction.

Parameters
indentIndentation to use.
ILTypeRepresentation of the IL type.

Definition at line 1790 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.mul ( int  indent)

Writes the mul instruction.

Parameters
indentIndentation to use.

Definition at line 1240 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.neg ( int  indent)

Writes the neg instruction.

Parameters
indentIndentation to use.

Definition at line 1270 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.newarr ( int  indent,
TypeExpression  token 
)
virtual

Writes the newarr instruction.

Parameters
indentIndentation to use.
tokenWriteType of the vector elements.

Definition at line 2414 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.newarr ( int  indent,
string  type 
)
virtual

Writes the newarr instruction.

Parameters
indentIndentation to use.
typeString representation of a type.

Definition at line 2425 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.newobj ( int  indent,
MethodType  memberType,
TypeExpression  obj,
string  member 
)

Writes the newobj instruction.

Parameters
indentIndentation to use.
memberTypeMember type.
objObject to access to the member.
memberMember to call.

Definition at line 1060 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.newobj ( int  indent,
string  klass,
string[]  args 
)

Writes the newobj instruction

Parameters
indentText Indentation
klassClass type
argsTypes of parameters

Definition at line 1075 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.nop ( int  indent)

Writes a nop instruction.

Parameters
indentIndentation to use.

Definition at line 2284 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.not ( int  indent)

Bitwise inversion (unary). This operation, rather than neg, is recommended for integer sign inversion because neg has a problem with the maximum negative numbers:

Parameters
indentIndentation to use.

Definition at line 1364 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.or ( int  indent)

Writes the or instruction.

Parameters
indentIndentation to use.

Definition at line 1335 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.pop ( int  indent)

Writes a pop instruction.

Parameters
indentIndentation to use.

Definition at line 2316 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.ProcessField ( int  indent,
FieldDeclaration  node,
Object  obj,
bool  constantField 
)
virtual

Definition at line 238 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.Promotion ( int  indent,
TypeExpression  typeExp1,
TypeExpression  certainType1,
TypeExpression  typeExp2,
TypeExpression  certainType2,
bool  unidirectionalConversion,
bool  makeBoxing 
)

Writes the il code to promote typeExp1 to typeExp2

Parameters
typeExp1The type of the element that is in the stack
typeExp2The type to promote to

Definition at line 659 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.rem ( int  indent)

Writes the rem instruction.

Parameters
indentIndentation to use.

Definition at line 1284 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.ret ( int  indent)

Writes the ret instruction.

Parameters
indentIndentation to use.

Definition at line 2050 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.shl ( int  indent)

Writes the shl instruction.

Parameters
indentIndentation to use.

Definition at line 2249 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.shr ( int  indent)

Writes the shr instruction.

Parameters
indentIndentation to use.

Definition at line 2264 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.starg ( int  indent,
int  argNumber 
)

starg <unsigned int16>=""> Take a value from the stack and store it in argument slot number <unsigned int16>="">. The value on the stack must be of the same type as the argument slot or must be convertible to the type of the argument slot. The convertibility rules and effects are the same as those for conversion operations, discussed earlier in this chapter. With vararg methods, the starg instruction cannot target the arguments of the variable part of the signature.

Parameters
indentIndentation to use.
argNumberArgument number to store.

Definition at line 1171 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.starg ( int  indent,
string  argNumber 
)

Writes the starg instruction.

Parameters
indentIndentation to use.
argNumberArgument name to store.

Definition at line 1180 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.stelemDouble ( int  indent)
virtual

Writes the stelem.r8 instruction.

Parameters
indentIndentation to use.

Definition at line 2513 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.stelemInt ( int  indent)
virtual

Writes the stelem.i4 instruction.

Parameters
indentIndentation to use.

Definition at line 2502 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.stelemRef ( int  indent)
virtual

Writes the stelem.ref instruction.

Parameters
indentIndentation to use.

Definition at line 2524 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.stfld ( int  indent,
TypeExpression  type,
string  classId,
string  fieldName 
)

Writes the stfld instruction.

Parameters
indentIndentation to use.
typeField type.
classIdClass identifier of the field.
fieldNameField identifier.

Definition at line 1997 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.stloc ( int  indent,
int  locNumber 
)

Writes the stloc instruction.

Parameters
indentIndentation to use.
locNumberLocal variable number to store.

Definition at line 2132 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.stloc ( int  indent,
string  locVar 
)

Writes the ldloc instruction.

Parameters
indentIndentation to use.
locVarLocal variable to store.

Definition at line 2151 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.stloc_s ( int  indent,
string  variable 
)

Writes the stloc.s instruction.

Parameters
indentIndentation to use.
variablevariable to store.

Definition at line 2141 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.stsfld ( int  indent,
TypeExpression  type,
string  classId,
string  fieldName 
)

Writes the stsfld instruction.

Parameters
indentIndentation to use.
typeField type.
classIdClass identifier of the field.
fieldNameField identifier.

Definition at line 2023 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.sub ( int  indent)

Writes the sub instruction.

Parameters
indentIndentation to use.

Definition at line 1300 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.Unbox ( int  indent,
TypeExpression  type 
)
virtual

Writes the Unbox instruction

Parameters
indentIndentation to use.
typeValue type to revert.

Implements CodeGeneration.CodeGenerator.

Definition at line 1418 of file ILCodeGenerator.cs.

abstract override void CodeGeneration.ILCodeGenerator.UnboxAny ( int  indent,
TypeExpression  type 
)
pure virtual

Writes the Unbox instruction

Parameters
indentIndentation to use.
typeValue type to revert.

Implements CodeGeneration.CodeGenerator.

Implemented in CodeGeneration.CLRCodeGenerator, and CodeGeneration.RrotorCodeGenerator.

virtual void CodeGeneration.ILCodeGenerator.UnBoxIfNeeded ( int  indent,
TypeExpression  type 
)
virtual

Convert and OBject to a valuetype if is not an reference type ///

Parameters
indentIndentation level
typeThe type to be promoted

Definition at line 1406 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteAuxiliarLocalVariable ( int  indent,
string  id,
string  type 
)
virtual

Writes the information of local variables.

Parameters
indentCurrent indentation.
idAuxiliar local variable identifier.
typeAuxiliar local variable type expression.

Implements CodeGeneration.CodeGenerator.

Definition at line 491 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.WriteCall ( MethodType  memberType,
TypeExpression  klass,
string  member,
AST.CompoundExpression  arguments 
)
protectedvirtual

Writes the 'token' of call instructions.

Parameters
memberTypeMember type (null when the implicit object is a fresh type variable).
klassWriteType of the object to access to the member.
memberMember to call.
argumentsActual arguments. This parameter is only necessary when the "memberType" parameter may be null.

Definition at line 1589 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.WriteCallArguments ( MethodType  memberType,
TypeExpression  klass,
string  member,
AST.CompoundExpression  arguments 
)
protectedvirtual

Writes the 'token' of call instructions.

Parameters
memberTypeMember type (null when the implicit object is a fresh type variable).
klassWriteType of the object to access to the member.
memberMember to call.
argumentsActual arguments. This parameter is only necessary when the "memberType" parameter may be null.

Definition at line 1439 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteCatch ( int  indent,
String  type,
String  var 
)
virtual

Implements CodeGeneration.CodeGenerator.

Definition at line 531 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.WriteClassExtends ( ClassType  type)
virtual

Definition at line 154 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.WriteClassImplements ( ClassType  type)
virtual

Definition at line 165 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.WriteClassName ( string  name)
virtual

Definition at line 146 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteCloseBraceCatch ( int  indent)
virtual

Implements CodeGeneration.CodeGenerator.

Definition at line 540 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteCloseBraceFinally ( int  indent)
virtual

Implements CodeGeneration.CodeGenerator.

Definition at line 557 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteCloseBraceTry ( int  indent)
virtual

Implements CodeGeneration.CodeGenerator.

Definition at line 519 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteCodeOfExceptionsTemplateMethod ( DynamicExceptionManager  d)
protectedvirtual

Implements Template Method

Parameters
dAn TypeSsystem Mananager to exception to use

Implements CodeGeneration.CodeGenerator.

Definition at line 826 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteEndOfBlock ( int  indent)
virtual

Writes the termination token

Parameters
indentIndentation to use.

Implements CodeGeneration.CodeGenerator.

Definition at line 290 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteEndOfClass ( int  indent,
string  name 
)
virtual

Writes the class termination acoording to IL code

Parameters
indentIndentation to use.
nameName of the class to terminate.

Implements CodeGeneration.CodeGenerator.

Definition at line 207 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteEndOfField ( )
virtual

Writes the field termination

Implements CodeGeneration.CodeGenerator.

Definition at line 266 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteEndOfInterface ( int  indent,
string  name 
)
virtual

Writes the interface termination

Parameters
indentIndentation to use.
nameName of the interface to terminate.

Implements CodeGeneration.CodeGenerator.

Definition at line 229 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteEndOfMethod ( int  indent,
string  name 
)
virtual

Writes the method termination. It writes also en end of line

Parameters
indentIndentation to use.
nameName of the method to terminate.

Implements CodeGeneration.CodeGenerator.

Definition at line 423 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteEntryPoint ( int  indent)
virtual

Writes the entrypoint directive.

Parameters
indentIndentation to use.

Implements CodeGeneration.CodeGenerator.

Definition at line 501 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteField ( int  indent,
string  name,
FieldType  type,
bool  constantField 
)
virtual

Writes the field header.

Parameters
indentIndentation to use.
nameField name.
typeField type expression.
constantFieldTrue if the field is a constant. Otherwise, false.

Implements CodeGeneration.CodeGenerator.

Definition at line 247 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteFinally ( int  indent)
virtual

Implements CodeGeneration.CodeGenerator.

Definition at line 549 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteHeader ( string  fileName)
virtual

Writes the header of the il code file.

Parameters
fileNameName of the module.

Implements CodeGeneration.CodeGenerator.

Definition at line 121 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteInterfaceHeader ( int  indent,
string  name,
InterfaceType  type 
)
virtual

Writes the interface header

Parameters
indentIndentation to use.
nameInterface name.
typeInterface type expression.

Implements CodeGeneration.CodeGenerator.

Definition at line 217 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteLabel ( int  indentation,
string  label 
)
virtual

Writes a label in il. Format –indentation– LABEL:

Parameters
labeltext of the label

Implements CodeGeneration.CodeGenerator.

Definition at line 97 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.WriteLeave ( int  indentation,
string  label 
)

Write leave.s label

Parameters
indentation
labellabel to write

Definition at line 2330 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.WriteLine ( int  indentation,
string  msg 
)

Definition at line 2543 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.WriteLine ( )

Definition at line 2558 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteLNClassHeader ( int  indent,
string  name,
ClassType  type 
)
virtual

Writes the class header in IL code

Parameters
indentIndentation to use.
nameClass name.
typeClass type expression.

Implements CodeGeneration.CodeGenerator.

Definition at line 190 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteLNFieldInitialization ( TypeExpression  type)
virtual

Writes the field inicialization.

Parameters
typeWriteType Expression of the field inicialization.

Implements CodeGeneration.CodeGenerator.

Definition at line 255 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.WriteLNMethodEndOfHeader ( )
protectedvirtual

Definition at line 330 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteLNMethodHeader ( int  indent,
string  name,
MethodType  type 
)
virtual

Writes the method header.

Parameters
indentIndentation to use.
nameMethod name.
typeMethod type expression.

Implements CodeGeneration.CodeGenerator.

Definition at line 321 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteLocalVariable ( int  indent)
virtual

Writes the information of local variables.

Parameters
indentCurrent indentation.

Implements CodeGeneration.CodeGenerator.

Definition at line 474 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.WriteMethodModifiers ( int  indent,
MethodType  type 
)
protectedvirtual

Definition at line 337 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.WriteMethodParameters ( MethodType  type)
virtual

Definition at line 406 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.WriteMethodTypeOfAccess ( string  name,
MethodType  type 
)
virtual

Definition at line 365 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteNamespaceHeader ( int  indent,
string  name 
)
virtual

Writes the namespace header of an IL file.

Parameters
indentIndentation to use.
nameNamespace name.

Implements CodeGeneration.CodeGenerator.

Definition at line 135 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteOpenBraceCatch ( int  indent)
virtual

Implements CodeGeneration.CodeGenerator.

Definition at line 535 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteOpenBraceFinally ( int  indent)
virtual

Implements CodeGeneration.CodeGenerator.

Definition at line 553 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteOpenBraceTry ( int  indent)
virtual

Implements CodeGeneration.CodeGenerator.

Definition at line 515 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteParams ( MethodType  memberType,
AST.CompoundExpression  arguments 
)
virtual

Writes the parameters of a method

Parameters
memberTypeThe type of the method

s

Parameters
argumentsActual arguments

Implements CodeGeneration.CodeGenerator.

Definition at line 435 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.WriteRethrow ( int  indent)

Definition at line 523 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteStartBlock ( int  indent)
virtual

Writes the block inicialization

Parameters
indentIndentation to use.

Implements CodeGeneration.CodeGenerator.

Definition at line 278 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.WriteThrow ( int  indent)

Writes the throw instruction.

Parameters
indentIndentation to use.

Definition at line 1109 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteThrowException ( int  indent,
DynamicExceptionManager  dynException 
)
virtual

Writes the generation code to throw a specified exception.

Converts a fresh type variable on the stack (object) to another type

Parameters
indentIndentation level
typeExpressionThe type expression to promote to
Parameters
indentIdentation to use.
dynExceptionException to throw.

Implements CodeGeneration.CodeGenerator.

Definition at line 975 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteThrowException ( int  indent,
string  ex,
string[]  msg 
)
virtual

Writes the code to throw an exception derived from Exception without using DynamicExceptionManager .

Parameters
indentindentation to use
exName of the exception to throw
type argsan array with the type name of the arguments of the constructor exception. If the list is empty there won't be code generation about this param

Implements CodeGeneration.CodeGenerator.

Definition at line 986 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.WriteThrowMissingMethodException ( int  indent,
string  method 
)
virtual

Definition at line 564 of file ILCodeGenerator.cs.

virtual void CodeGeneration.ILCodeGenerator.WriteThrowNonSuitableObjectException ( int  indent,
string  klass,
string  method 
)
virtual

Definition at line 581 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteTryDirective ( int  indent)
virtual

Implements CodeGeneration.CodeGenerator.

Definition at line 511 of file ILCodeGenerator.cs.

override void CodeGeneration.ILCodeGenerator.WriteType ( TypeExpression  type)
virtual

Writes the current type information

Parameters
typeWriteType expression with the type information.

Implements CodeGeneration.CodeGenerator.

Definition at line 109 of file ILCodeGenerator.cs.

void CodeGeneration.ILCodeGenerator.xor ( int  indent)

Writes the xor instruction.

Parameters
indentIndentation to use.

Definition at line 1350 of file ILCodeGenerator.cs.

Member Data Documentation

ILStatementsCodeGeneration CodeGeneration.ILCodeGenerator.ilStamentsCodeGeneration
protected

Definition at line 11 of file ILCodeGenerator.cs.

Property Documentation

int CodeGeneration.ILCodeGenerator.LocalVariableIndex
getset

Definition at line 30 of file ILCodeGenerator.cs.

override string CodeGeneration.ILCodeGenerator.NewLabel
get

Definition at line 17 of file ILCodeGenerator.cs.


The documentation for this class was generated from the following file: