public void method(FMethod m) { Write(" " + typeRef(m.m_ret) + " " + m.m_name + "("); FMethodVar[] pars = m.pars(); for (int i = 0; i < pars.Length; ++i) { FMethodVar p = pars[i]; if (i > 0) { Write(", "); } Write(typeRef(p.type) + " " + p.name); } WriteLine(") [" + StrUtil.flagsToString(m.m_flags).Trim() + "]"); for (int i = 0; i < m.m_vars.Length; i++) { FMethodVar v = m.m_vars[i]; string role = v.IsParam() ? "Param" : "Local"; int reg = i + ((m.m_flags & FConst.Static) != 0 ? 0 : 1); WriteLine(" [" + role + " " + reg + "] " + v.name + ": " + typeRef(v.type)); if (v.def != null) { code(v.def); } } if (m.m_code != null) { WriteLine(" [Code]"); code(m.m_code); } attrs(m.m_attrs); WriteLine(); }
public void method(FMethod m) { Write(" " + typeRef(m.m_ret) + " " + m.m_name + "("); FMethodVar[] pars = m.pars(); for (int i=0; i<pars.Length; ++i) { FMethodVar p = pars[i]; if (i > 0) Write(", "); Write(typeRef(p.type) + " " + p.name); } WriteLine(") [" + StrUtil.flagsToString(m.m_flags).Trim() + "]"); for (int i=0; i<m.m_vars.Length; i++) { FMethodVar v = m.m_vars[i]; string role = v.IsParam() ? "Param" : "Local"; int reg = i + ((m.m_flags & FConst.Static) != 0 ? 0 : 1); WriteLine(" [" + role + " " + reg + "] " + v.name + ": " + typeRef(v.type)); if (v.def != null) code(v.def); } if (m.m_code != null) { WriteLine(" [Code]"); code(m.m_code); } attrs(m.m_attrs); WriteLine(); }