Exemple #1
0
 public void WriteDisassembly(CfgWriter cw, DisassemblyWriter dw)
 {
     cw.WriteCfgNode(dw, m_predecessor.Value);
     dw.Write(" ");
     cw.WriteUseSsa(dw, m_reg);
     dw.WriteLine("");
 }
Exemple #2
0
        public void WriteDisassembly(CfgWriter cw, DisassemblyWriter dw)
        {
            if (m_phis.Length > 0)
            {
                dw.WriteLine("phis {");
                dw.PushIndent();

                foreach (HighPhi phi in m_phis)
                    phi.WriteDisassembly(cw, dw);
                dw.PopIndent();
                dw.WriteLine("}");
            }

            foreach (HighInstruction instr in m_instructions)
                instr.WriteDisassembly(cw, dw);
        }
Exemple #3
0
        public void WriteDisassembly(CfgWriter cw, DisassemblyWriter dw)
        {
            dw.Write("phi ");
            cw.WriteDefSsa(dw, m_dest);
            dw.WriteLine(" {");
            dw.PushIndent();

            foreach (HighPhiLink phiLink in m_links)
                phiLink.WriteDisassembly(cw, dw);

            dw.PopIndent();
            dw.WriteLine("}");
        }
Exemple #4
0
        public void WriteDisassembly(DisassemblyWriter dw)
        {
            if (m_instanceLocal == null)
                dw.WriteLine("static");
            else
            {
                dw.Write("instance ");
                m_instanceLocal.WriteDisassembly(dw);
            }
            dw.WriteLine("args {");
            dw.PushIndent();
            foreach (HighLocal local in m_args)
                local.WriteDisassembly(dw);
            dw.PopIndent();
            dw.WriteLine("}");
            dw.WriteLine("locals {");
            dw.PushIndent();
            foreach (HighLocal local in m_locals)
                local.WriteDisassembly(dw);
            dw.PopIndent();
            dw.WriteLine("}");
            dw.Write("returns ");
            m_returnType.WriteDisassembly(dw);
            dw.WriteLine("");

            CfgWriter cfgWriter = new CfgWriter(dw, m_instanceLocal, m_args, m_locals);

            cfgWriter.GetCfgNodeIndex(m_entryRegion.EntryNode.Value);
            cfgWriter.WriteGraph();
        }
Exemple #5
0
        public void WriteMethodDisassembly(StreamWriter writer)
        {
            Dictionary<object, IDisassemblyWritable> mhReverse = new Dictionary<object, IDisassemblyWritable>();

            foreach (KeyValuePair<MethodKey, MethodHandle> kvp in m_methodInstances.AllInstances)
                mhReverse.Add(kvp.Value, kvp.Key);

            DisassemblyWriter dw = new DisassemblyWriter(writer, mhReverse);

            foreach (KeyValuePair<MethodKey, MethodHandle> methodInstance in m_methodInstances.AllInstances)
            {
                dw.Write("methodInstance ( ");
                methodInstance.Key.WriteDisassembly(dw);
                dw.WriteLine(" )");
                dw.WriteLine("{");
                methodInstance.Value.Value.WriteDisassembly(dw);
                dw.WriteLine("}");
            }
        }