Exemplo n.º 1
0
 public ForInfo(string variable, Number from, Number to, int step,
                Label beginLabel, Label comparasionLabel) :
                    this()
 {
     Variable = variable;
     From = from;
     To = to;
     Step = step;
     BeginLabel = beginLabel;
     ComparasionLabel = comparasionLabel;
 }
        public DynamicMethodBody Stloc(Number value, params string[] variables)
        {
            Emit(value);

            for (int i = 1; i < variables.Length; i++)
                Dup();

            Stloc(variables);

            return this;
        }
 public DynamicMethodBody EnsureLimits(Number min, Number max)
 {
     return Dup()
         .Emit(min)
         .Iflt()
         .Pop()
         .Emit(min)
         .Else()
         .Dup()
         .Emit(max)
         .Ifgt()
         .Pop()
         .Emit(max)
         .EndIf()
         .EndIf();
 }
 public DynamicMethodBody AddToVar(string varname, Number constant)
 {
     return Ldloc(varname)
         .Add(constant)
         .Stloc(varname);
 }