Esempio n. 1
0
        private void Dig(InstructionDependency[] preds, int index)
        {
            var otypes = new TypeDescriptor[index + 1];
            var rtypes = new TypeDescriptor[index + 1];

            for (int i = 0; i < otypes.Length; i++)
            {
                otypes[i] = TypeStack.ElementAt(index - i);
                rtypes[i] = TypeStack.ElementAt(i == index ? index : index - i - 1);
            }
            Emit(DefaultInstructionSet.Instance.Dig(index).CreateStk(preds, otypes, rtypes));
        }
Esempio n. 2
0
        protected override void ProcessInstruction(XILSInstr i)
        {
            var rTypes  = i.ResultTypes;
            var opTypes = new TypeDescriptor[i.OperandTypes.Length];

            for (int j = 0; j < opTypes.Length; j++)
            {
                opTypes[j] = TypeStack.ElementAt(opTypes.Length - 1 - j);
            }
            var inew = i.Command.CreateStk(i.Preds, opTypes, rTypes);

            base.ProcessInstruction(inew);
        }
Esempio n. 3
0
 private void Swap(InstructionDependency[] preds)
 {
     Emit(DefaultInstructionSet.Instance.Dig(1).CreateStk(preds, 2,
                                                          TypeStack.ElementAt(1), TypeStack.Peek(),
                                                          TypeStack.Peek(), TypeStack.ElementAt(1)));
 }