public override void VisitIsInstanceInstruction(IsInstanceInstruction instruction) { ControlState.EvaluationStack.PopValue(out CilValueReference objRef); var obj = ManagedMemory.Load(objRef); if (obj is CilClassInstance objClassInstance) { if (objClassInstance.IsInstanceOf(instruction.TypeSpec, _program)) { ControlState.EvaluationStack.PushValue(objRef); } else { ControlState.EvaluationStack.PushValue(new CilValueNull()); } } else { throw new System.NotImplementedException(); } ControlState.MoveToNextInstruction(); }
public abstract void VisitIsInstanceInstruction(IsInstanceInstruction instruction);