Out() public method

public Out ( String s ) : void
s String
return void
Beispiel #1
0
 public void BeginClass()
 {
     exe.BeginClass(Io.GetClassname(), TypeAttributes.Public);
     if (Io.genlist)
     {
         io.Out(".class " + Io.GetClassname() + "{\r\n");
     }
 }
Beispiel #2
0
        public void Load(IAsm a)
        {
            StringBuilder sb = new StringBuilder(MyC.MAXSTR);
            Var           e  = a.getVar();

            if (e == null)
            {
                Console.WriteLine("?Load instruction with no variable ptr");
                Environment.Exit(1);
            }
            switch (e.getClassId())
            {
            case Tok.T_STATIC:
            {
                sb.Append("\tldsfld ");
                sb.Append(genFieldRef(e));
                sb.Append("\t//");
                sb.Append(a.getICount());
                sb.Append(", ");
                sb.Append(e.getName());
                sb.Append("\r\n");
                break;
            }

            case Tok.T_AUTO:
            case Tok.T_DEFCLASS:
                sb.Append("\tldloc ");
                sb.Append(e.getIndex());
                sb.Append("\t//");
                sb.Append(a.getICount());
                sb.Append(", ");
                sb.Append(e.getName());
                sb.Append("\r\n");
                break;

            case Tok.T_PARAM:
                sb.Append("\tldarg ");
                sb.Append(e.getIndex());
                sb.Append("\t//");
                sb.Append(a.getICount());
                sb.Append(", ");
                sb.Append(e.getName());
                sb.Append("\r\n");
                break;

            default:
                Console.Write("?Instruction load of unknown class (");
                Console.Write(e.getClassId());
                Console.WriteLine(")");
                Environment.Exit(1);
                break;
            }
            io.Out(sb.ToString());
        }