public override void VisitLoadArrayElementInstruction(LoadArrayElementInstruction instruction)
        {
            ControlState.EvaluationStack.PopValue(out CilValueReference arrayRef, out CilValueInt32 indexVal);

            var array = ManagedMemory.Load(arrayRef) as CilArray;
            var elem  = array.GetValue(indexVal, instruction.TypeSpec.GetCilType(_program), ManagedMemory, _program);

            ControlState.EvaluationStack.PushValue(elem);
            ControlState.MoveToNextInstruction();
        }
예제 #2
0
 public abstract void VisitLoadArrayElementInstruction(LoadArrayElementInstruction instruction);