Skip to content
Snippets Groups Projects
Commit d03042a0 authored by Timo Rothenpieler's avatar Timo Rothenpieler
Browse files

Use Print where applicable

parent c543c006
Branches
No related tags found
No related merge requests found
......@@ -284,7 +284,7 @@ public class Syscall : Attribute
MethodDefinition targetMethod = ((MethodDefinition)i.Operand);
if (targetMethod.CustomAttributes.Where(a => a.AttributeType.Name == "Syscall").Count() != 0)
{
outputFile.Write("sys");
Print("sys");
}
PrintLn("call\t"
+ GetMangoType(targetMethod.ReturnType)
......@@ -336,14 +336,14 @@ public class Syscall : Attribute
if (i.Operand is FieldReference)
{
targetField = (FieldReference)i.Operand;
outputFile.Write(opcodeName + "\t");
Print(opcodeName + "\t");
if (targetField.FieldType.IsPrimitive)
{
outputFile.Write(GetMangoType(targetField.FieldType) + "\t");
Print(GetMangoType(targetField.FieldType) + "\t");
}
else
{
outputFile.Write(targetField.FieldType.Name + "\t");
Print(targetField.FieldType.Name + "\t");
}
fieldName = targetField.FullName; // e.g. "System.Int32 SimpleExample.MainClass/Point2D::x"
fieldName = fieldName.Substring(fieldName.IndexOf('/') + 1); // e.g. "Point2D::x"
......@@ -416,14 +416,14 @@ public class Syscall : Attribute
if (i.Operand is FieldReference)
{
targetField = (FieldReference)i.Operand;
outputFile.Write("stfld\t");
Print("stfld\t");
if (targetField.FieldType.IsPrimitive)
{
outputFile.Write(GetMangoType(targetField.FieldType) + "\t");
Print(GetMangoType(targetField.FieldType) + "\t");
}
else
{
outputFile.Write(targetField.FieldType.Name + "\t");
Print(targetField.FieldType.Name + "\t");
}
fieldName = targetField.FullName; // e.g. "System.Int32 SimpleExample.MainClass/Point2D::x"
fieldName = fieldName.Substring(fieldName.IndexOf('/') + 1); // e.g. "Point2D::x"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment