public void Write(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, HighRegionBuilder regionBuilder, bool haveDebugInfo, BinaryWriter writer) { writer.Write((uint)m_escapePathTerminators.Length); foreach (HighEscapePathTerminator terminator in m_escapePathTerminators) terminator.Write(fileBuilder, regionBuilder, writer); m_protRegion.Write(fileBuilder, methodBuilder, haveDebugInfo, writer); }
public void Write(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, bool haveDebugInfo, BinaryWriter writer) { HighRegionBuilder regionBuilder = new HighRegionBuilder(); regionBuilder.IndexCfgNode(m_entryNode.Value); MemoryStream regionNodesStream = new MemoryStream(); BinaryWriter regionNodesWriter = new BinaryWriter(regionNodesStream); HighCfgNode cfgNode = regionBuilder.DequeueUnemittedNode(); while (cfgNode != null) { cfgNode.Write(fileBuilder, methodBuilder, regionBuilder, haveDebugInfo, regionNodesWriter); cfgNode = regionBuilder.DequeueUnemittedNode(); } regionNodesWriter.Flush(); regionBuilder.WriteHeader(writer); writer.Flush(); regionNodesStream.WriteTo(writer.BaseStream); }
public override void WriteHeader(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, HighRegionBuilder regionBuilder, HighCfgNodeBuilder cfgNodeBuilder, bool haveDebugInfo, BinaryWriter writer) { writer.Write((byte)m_operation); writer.Write((byte)m_numberType); writer.Write(m_trueValue); writer.Write(m_falseValue); }
protected override void WriteHandlers(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, bool haveDebugInfo, BinaryWriter writer) { writer.Write((uint)m_catchHandlers.Length); foreach (HighCatchHandler catchHandler in m_catchHandlers) catchHandler.Write(fileBuilder, methodBuilder, haveDebugInfo, writer); }
public void Write(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, bool haveDebugInfo, BinaryWriter writer) { writer.Write(fileBuilder.IndexTypeSpecTag(m_catchType)); m_region.Write(fileBuilder, methodBuilder, haveDebugInfo, writer); }
public override void WriteHeader(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, HighRegionBuilder regionBuilder, HighCfgNodeBuilder cfgNodeBuilder, bool haveDebugInfo, BinaryWriter writer) { writer.Write(fileBuilder.IndexMethodSpecTag(m_methodSpec)); writer.Write(fileBuilder.IndexTypeSpecTag(m_constraintType)); writer.Write((uint)m_parameters.Length); }
public override void WriteHeader(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, HighRegionBuilder regionBuilder, HighCfgNodeBuilder cfgNodeBuilder, bool haveDebugInfo, BinaryWriter writer) { writer.Write(fileBuilder.IndexString(m_field)); }
protected abstract void WriteHandlers(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, bool haveDebugInfo, BinaryWriter writer);
public override void WriteHeader(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, HighRegionBuilder regionBuilder, HighCfgNodeBuilder cfgNodeBuilder, bool haveDebugInfo, BinaryWriter writer) { throw new NotImplementedException(); }
public override void WriteHeader(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, HighRegionBuilder regionBuilder, HighCfgNodeBuilder cfgNodeBuilder, bool haveDebugInfo, BinaryWriter writer) { writer.Write((uint)m_cases.Length); }
public override void WriteHeader(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, HighRegionBuilder regionBuilder, HighCfgNodeBuilder cfgNodeBuilder, bool haveDebugInfo, BinaryWriter writer) { writer.Write((byte)m_conversionType); writer.Write(m_destPrecision); writer.Write(m_sourcePrecision); }
public void Write(HighFileBuilder fileBuilder, BinaryWriter writer) { writer.Write(m_instanceLocal != null); writer.Write((uint)m_args.Length); writer.Write((uint)m_locals.Length); writer.Write(m_haveDebugInfo); List<HighLocal> allLocals = new List<HighLocal>(); if (m_instanceLocal != null) allLocals.Add(m_instanceLocal); allLocals.AddRange(m_args); allLocals.AddRange(m_locals); foreach (HighLocal local in allLocals) local.Write(fileBuilder, writer); HighMethodBuilder methodBuilder = new HighMethodBuilder(allLocals.ToArray()); m_region.Write(fileBuilder, methodBuilder, m_haveDebugInfo, writer); }
public override void WriteHeader(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, HighRegionBuilder regionBuilder, HighCfgNodeBuilder cfgNodeBuilder, bool haveDebugInfo, BinaryWriter writer) { writer.Write(fileBuilder.IndexTypeSpecTag(m_type)); writer.Write(fileBuilder.IndexString(m_fieldName)); writer.Write(m_isStatic); }
public override void WriteHeader(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, HighRegionBuilder regionBuilder, HighCfgNodeBuilder cfgNodeBuilder, bool haveDebugInfo, BinaryWriter writer) { writer.Write((byte)m_arithOp); writer.Write((byte)m_arithType); writer.Write(m_checkOverflow); }
public void Write(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, HighRegionBuilder regionBuilder, bool haveDebugInfo, BinaryWriter writer) { HighCfgNodeBuilder cfgNodeBuilder = new HighCfgNodeBuilder(); HashSet<HighSsaRegister> gatheredConstants = new HashSet<HighSsaRegister>(); List<HighSsaRegister> constants = new List<HighSsaRegister>(); HighInstruction.VisitSsaDelegate constVisitor = delegate (ref HighSsaRegister use) { if (use.IsConstant && !gatheredConstants.Contains(use)) { gatheredConstants.Add(use); constants.Add(use); } }; foreach (HighInstruction instr in m_instructions) instr.VisitSsaUses(constVisitor); writer.Write((uint)m_predecessors.Length); writer.Write((uint)m_phis.Length); writer.Write((uint)m_instructions.Length); writer.Write((uint)constants.Count); foreach (HighCfgNodeHandle pred in m_predecessors) writer.Write(regionBuilder.IndexCfgNode(pred.Value)); foreach (HighPhi phi in m_phis) { cfgNodeBuilder.AddSsa(phi.Dest); phi.Write(fileBuilder, regionBuilder, m_predecessors, writer); } foreach (HighSsaRegister constant in constants) { cfgNodeBuilder.AddSsa(constant); constant.WriteConstant(fileBuilder, regionBuilder, writer); } foreach (HighInstruction instr in m_instructions) instr.Write(fileBuilder, methodBuilder, regionBuilder, cfgNodeBuilder, haveDebugInfo, writer); }
protected override void WriteHandlers(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, bool haveDebugInfo, BinaryWriter writer) { m_finallyRegion.Write(fileBuilder, methodBuilder, haveDebugInfo, writer); }
public override void WriteHeader(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, HighRegionBuilder regionBuilder, HighCfgNodeBuilder cfgNodeBuilder, bool haveDebugInfo, BinaryWriter writer) { }
public void Write(HighFileBuilder fileBuilder, HighMethodBuilder methodBuilder, bool haveDebugInfo, BinaryWriter writer) { writer.Write((byte)this.RegionType); m_tryRegion.Write(fileBuilder, methodBuilder, haveDebugInfo, writer); WriteHandlers(fileBuilder, methodBuilder, haveDebugInfo, writer); }