FuncBegin() public method

public FuncBegin ( IAsm a ) : void
a IAsm
return void
Esempio n. 1
0
/*
 * Emit assembly instructions now
 * this flushes the istream
 */
public void LIST()
  {
  IAsm a = iroot;
  IAsm p;
  Asm x = new Asm(io);

  while (a != null)
    {
    switch (a.getIType())
      {
      case IAsm.I_INSN:
	x.Insn(a);
	break;
      case IAsm.I_LABEL:
	x.Label(a);
	break;
      case IAsm.I_BRANCH:
	x.Branch(a);
	break;
      case IAsm.I_INSN_STORE:
	x.Store(a);
	break;
      case IAsm.I_INSN_LOAD:
	x.Load(a);
	break;
      case IAsm.I_INSN_LOAD_CONST:
	x.LoadConst(a);
	break;
      case IAsm.I_FUNC_BEGIN:
	x.FuncBegin(a); /* Emit function beginning */
	break;
      case IAsm.I_FUNC_END:
	x.FuncEnd();
	break;
      case IAsm.I_CALL:
	x.Call(a);
	break;
      case IAsm.I_RET:
	x.Ret(a);
	break;
      case IAsm.I_COMMENT:
	x.Comment(a);
	break;
      case IAsm.I_FIELD:
	x.FieldDef(a);
	break;
      case IAsm.I_LOCALDEF:
	x.LocalVars(localvars);
	break;
      default:
	io.Abort("Unhandled instruction type " + a.getIType());
	break;
      }
    p = a;
    a = a.getNext();
    }
  }
Esempio n. 2
0
/*
 * Emit assembly instructions now
 * this flushes the istream
 */
        public void LIST()
        {
            IAsm a = iroot;
            IAsm p;
            Asm  x = new Asm(io);

            while (a != null)
            {
                switch (a.getIType())
                {
                case IAsm.I_INSN:
                    x.Insn(a);
                    break;

                case IAsm.I_LABEL:
                    x.Label(a);
                    break;

                case IAsm.I_BRANCH:
                    x.Branch(a);
                    break;

                case IAsm.I_INSN_STORE:
                    x.Store(a);
                    break;

                case IAsm.I_INSN_LOAD:
                    x.Load(a);
                    break;

                case IAsm.I_INSN_LOAD_CONST:
                    x.LoadConst(a);
                    break;

                case IAsm.I_FUNC_BEGIN:
                    x.FuncBegin(a); /* Emit function beginning */
                    break;

                case IAsm.I_FUNC_END:
                    x.FuncEnd();
                    break;

                case IAsm.I_CALL:
                    x.Call(a);
                    break;

                case IAsm.I_RET:
                    x.Ret(a);
                    break;

                case IAsm.I_COMMENT:
                    x.Comment(a);
                    break;

                case IAsm.I_FIELD:
                    x.FieldDef(a);
                    break;

                case IAsm.I_LOCALDEF:
                    x.LocalVars(localvars);
                    break;

                default:
                    io.Abort("Unhandled instruction type " + a.getIType());
                    break;
                }
                p = a;
                a = a.getNext();
            }
        }