Esempio n. 1
0
        public override List <HighLevel.Instruction> GetHighLevel(HighLevel.HlGraph Context)
        {
            List <HighLevel.Instruction> List = new List <HighLevel.Instruction>();

            HighLevel.Node Result = null;
            if (StackProduceCount != 0)
            {
                Result = Context.DefineStackLocationNode(Context.StackPointer - StackConsumeCount + 1, MethodInfo.ReturnType);
            }

            HighLevel.Node CallNode = new HighLevel.CallNode(MethodInfo);
            for (int i = StackConsumeCount - 1; i >= 0; i--)
            {
                CallNode.SubNodes.Add(Context.ReadStackLocationNode(Context.StackPointer - i));
            }

            Context.TranslateCallNode(ref Result, ref CallNode);

            List.Add(new HighLevel.AssignmentInstruction(Result, CallNode));
            return(List);
        }