TriAxis.RunSharp.CodeGen.EmitStindHelper C# (CSharp) Method

EmitStindHelper() protected method

protected EmitStindHelper ( Type type, Operand value, bool allowExplicitConversion ) : void
type IKVM.Reflection.Type
value Operand
allowExplicitConversion bool
return void
        protected internal void EmitStindHelper(Type type, Operand value, bool allowExplicitConversion)
        {
            OpCode op = GetStindOpCode(type);

            EmitGetHelper(value, type, allowExplicitConversion);
            if (op == OpCodes.Stobj)
                IL.Emit(OpCodes.Stobj, type);
            else
                IL.Emit(op);
        }

Usage Example

Example #1
0
 internal override void EmitSet(CodeGen g, Operand value, bool allowExplicitConversion)
 {
     if (IsReference)
     {
         g.EmitLdargHelper(index);
         g.EmitStindHelper(Type, value, allowExplicitConversion);
     }
     else
     {
         g.EmitGetHelper(value, Type, allowExplicitConversion);
         g.EmitStargHelper(index);
     }
 }
All Usage Examples Of TriAxis.RunSharp.CodeGen::EmitStindHelper