Mosa.Compiler.Framework.Context.SetOperand C# (CSharp) Method

SetOperand() public method

Sets the operand by index.
public SetOperand ( int index, Operand operand ) : void
index int The index.
operand Operand The operand.
return void
        public void SetOperand(int index, Operand operand)
        {
            Node.SetOperand(index, operand);
        }

Usage Example

Ejemplo n.º 1
0
        /// <summary>
        /// Performs stage specific processing on the compiler context.
        /// </summary>
        void IMethodCompilerStage.Run()
        {
            if (AreExceptions)
                return;

            foreach (var block in this.basicBlocks)
            {
                if (block.Label == Int32.MaxValue)
                    continue;

                for (var context = new Context(this.instructionSet, block); !context.EndOfInstruction; context.GotoNext())
                {
                    if (context.Instruction is PhiInstruction)
                        this.ProcessPhiInstruction(block, context);

                    for (var i = 0; i < context.OperandCount; ++i)
                    {
                        var op = context.GetOperand(i);
                        if (op is SsaOperand)
                            context.SetOperand(i, (op as SsaOperand).Operand);
                    }

                    for (var i = 0; i < context.ResultCount; ++i)
                    {
                        var op = context.GetResult(i);
                        if (op is SsaOperand)
                            context.SetResult(i, (op as SsaOperand).Operand);
                    }
                }
            }
        }
All Usage Examples Of Mosa.Compiler.Framework.Context::SetOperand