Esempio n. 1
0
            public override void GenerateCode(ICodeGen gen)
            {
                int local = this.GetTable().GetVariables().Sum(v => v is ParamVar ? 0 : v.GetType().GetSizeType());

                gen.StartProc(this);
                foreach (LocalVar v in this.GetTable().GetVariables())
                {
                    gen.Decl(v);
                }

                this.body.GenerateCode(gen);
                gen.EndProc();
            }
Esempio n. 2
0
 public override void GenerateCode(ICodeGen gen)
 {
     if (this.GetType() is Func)
     {
         if (this.GetType() is ExternFunc)
         {
             gen.Import(this);
         }
         else
         {
             this.GetType().GenerateCode(gen);
         }
     }
     else
     {
         gen.Decl(this);
     }
 }
Esempio n. 3
0
            public override void GenerateCode(ICodeGen gen)
            {
                int local = this.GetTable().GetVariables().Sum(v => v is ParamVar ? 0 : v.GetType().GetSizeType());
                gen.StartProc(this);
                foreach (LocalVar v in this.GetTable().GetVariables())
                {
                    gen.Decl(v);
                }

                this.body.GenerateCode(gen);
                gen.EndProc();
            }
Esempio n. 4
0
 public override void GenerateCode(ICodeGen gen)
 {
     if (this.GetType() is Func)
     {
         if (this.GetType() is ExternFunc)
         {
             gen.Import(this);
         }
         else
         {
             this.GetType().GenerateCode(gen);
         }
     }
     else
     {
         gen.Decl(this);
     }
 }