public void LoadFieldAddressIntoEvaluationStack(FieldInfo fieldInfo) { var firstVar = (LocalVariable)_evaluator.Pop(); var vreg = SetNewVReg(); var clrType = fieldInfo.FieldType; if (clrType == null) { clrType = _evaluator.GenericArguments.First(); } else { clrType = clrType.MakeByRefType(); } vreg.FixedType = new TypeDescription(clrType); var assignment = new FieldRefAssignment { Left = vreg, Right = firstVar, Field = fieldInfo }; AddOperation(assignment); }
public void LoadFieldAddressIntoEvaluationStack(FieldInfo fieldInfo) { var firstVar = (LocalVariable)_evaluator.Pop(); var vreg = SetNewVReg(); vreg.FixedType = new TypeDescription(fieldInfo.FieldType.MakeByRefType()); var assignment = new FieldRefAssignment { Left = vreg, Right = firstVar, Field = fieldInfo }; AddOperation(OperationKind.FieldRefAssignment, assignment); }