private static void Cast(Compiler cmp, Argument[] args) { Function fct = cmp.Functions.Last(); Variable v1 = ArgumentSelector.ExtractVar(fct, args[1]); Variable v2 = ArgumentSelector.ExtractVar(fct, args[2]); CastInstruction c = new CastInstruction(v1, v2); fct.Instructions.Add(c); }
public static void If(Compiler cmp, Argument[] args) { Function fct = cmp.Functions.Last(); IfInstruction i = new IfInstruction(); i.V1 = ArgumentSelector.ExtractOrder <Variable>(ArgumentSelector.Const_Variable, fct, args[1]); i.V2 = ArgumentSelector.ExtractOrder <Variable>(ArgumentSelector.Const_Variable, fct, args[3]); i.Flag = Flags[args[2]]; i.Label = args[4]; fct.Instructions.Add(i); }