Beispiel #1
0
        public CppRegionEmitter(CppBuilder builder, ExceptionHandlingRegion region, CppRegisterAllocator regAllocator, IDictionary<VReg, Clarity.Rpa.HighLocal> localLookup)
        {
            m_localLookup = localLookup;
            m_region = region;
            m_builder = builder;
            m_regAllocator = regAllocator;
            m_nodesToEmittedNodes = new Dictionary<CfgNode, HighCfgNodeHandle>();
            m_nodeOutlines = new Dictionary<CfgNode, CppCfgNodeOutline>();
            m_ssaToEmittedSsa = new Dictionary<SsaRegister, HighSsaRegister>();
            m_translatedOutboundEdges = new Dictionary<CfgOutboundEdge, CppTranslatedOutboundEdge>();

            m_pendingNodes = new Queue<CfgNode>();

            InternHighCfgNode(region.RootCfgNode);
        }
Beispiel #2
0
        public CppMidCompiler(CppBuilder builder, CppClass cls, CppMethod method, ExceptionHandlingRegion mainRegion, string frameVarName, VReg[] args, VReg[] locals, VReg[] temporaries)
        {
            m_builder = builder;
            m_cls = cls;
            m_method = method;
            m_mainRegion = mainRegion;
            m_args = args;
            m_locals = locals;
            m_temporaries = temporaries;
            m_frameVarName = frameVarName;

            m_instructionStream = new MemoryStream();
            m_instructionWriter = new StreamWriter(m_instructionStream);
            m_regAllocator = new CppRegisterAllocator(builder);
        }
Beispiel #3
0
 public void GenerateUniqueID(CppRegisterAllocator regAllocator)
 {
     if (m_ssaID == 0)
         m_ssaID = regAllocator.NewSsaID();
 }