private bool IsNextNonInsnGen(IAsm a) { IAsm cur = a.getNext(); if (cur == null) { return(true); } int type = cur.getIType(); while (type == IAsm.I_LABEL) { cur = cur.getNext(); type = cur.getIType(); } if (type == IAsm.I_COMMENT) { return(true); } return(false); }
public void LIST() { IAsm a = iroot; IAsm p; Asm x = new Asm(io, lib); 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); 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: break; case IAsm.I_FIELD: x.FieldDef(a); break; case IAsm.I_LOCALDEF: x.LocalVars(localvars); break; default: io.Abort("PL0302: unhandled instruction type " + a.getIType()); break; } p = a; a = a.getNext(); } }