Ejemplo n.º 1
0
 private void CreateGeneratorTemps(EnvironmentFactory ef, CodeGen cg)
 {
     for (int i = 0; i < tempsCount; i++)
     {
         cg.Names.AddTempSlot(ef.MakeEnvironmentReference(Name.Make("temp$" + i)).CreateSlot(cg.EnvironmentSlot));
     }
 }
Ejemplo n.º 2
0
        public EnvironmentReference GetOrMakeReference(Name name, Type type)
        {
            EnvironmentReference er;

            if (!references.TryGetValue(name, out er))
            {
                er = factory.MakeEnvironmentReference(name, type);
                references[name] = er;
            }
            else
            {
                Debug.Assert(er.ReferenceType.IsAssignableFrom(type));
            }
            return(er);
        }