/// <summary> /// Pops the array and index off the stack and pushes the element value onto the stack. /// </summary> /// <param name="type"> The element type. </param> public void LoadArrayElement(PrimitiveType type) { LoadArrayElement(PrimitiveTypeUtilities.ToType(type)); }
/// <summary> /// Pops the array, index and value off the stack and stores the value in the array. /// </summary> /// <param name="type"> The element type. </param> public void StoreArrayElement(PrimitiveType type) { StoreArrayElement(PrimitiveTypeUtilities.ToType(type)); }
/// <summary> /// Pops an object reference (representing a boxed value) from the stack, extracts the value, /// then pushes the value onto the stack. /// </summary> /// <param name="type"> The type of the boxed value. This should be a value type. </param> public void UnboxAny(PrimitiveType type) { UnboxAny(PrimitiveTypeUtilities.ToType(type)); }
/// <summary> /// Pops a value from the stack, converts it to an object reference, then pushes it back onto /// the stack. /// </summary> /// <param name="type"> The type of value to box. This should be a value type. </param> public void Box(PrimitiveType type) { Box(PrimitiveTypeUtilities.ToType(type)); }
/// <summary> /// Retrieves a temporary variable with the given type, reusing a previous variable if /// possible. /// </summary> /// <param name="type"> The type of variable to create. </param> /// <returns> A temporary variable </returns> public ILLocalVariable CreateTemporaryVariable(PrimitiveType type) { return(CreateTemporaryVariable(PrimitiveTypeUtilities.ToType(type))); }
/// <summary> /// Declares a new local variable. /// </summary> /// <param name="type"> The type of the local variable. </param> /// <param name="name"> The name of the local variable. Can be <c>null</c>. </param> /// <returns> A new local variable. </returns> public ILLocalVariable DeclareVariable(PrimitiveType type, string name) { return(DeclareVariable(PrimitiveTypeUtilities.ToType(type), name)); }
/// <summary> /// Emits a dummy value of the given type. /// </summary> /// <param name="generator"> The IL generator. </param> /// <param name="type"> The type of value to generate. </param> public static void EmitDefaultValue(ILGenerator generator, PrimitiveType type) { EmitDefaultValue(generator, PrimitiveTypeUtilities.ToType(type)); }