Jurassic.Compiler.DynamicILGenerator.StoreField C# (CSharp) Method

StoreField() public method

Pops a value off the stack and stores it in the given field.
public StoreField ( System field ) : void
field System The field to modify.
return void
        public override void StoreField(System.Reflection.FieldInfo field)
        {
            if (field == null)
                throw new ArgumentNullException("field");

            int token = this.GetToken(field);
            if (field.IsStatic == true)
            {
                // stsfld = 80 <token>
                PopStackOperands(ToVESType(field.FieldType));
                Emit1ByteOpCodeInt32(0x80, 1, 0, token);
            }
            else
            {
                // stfld = 7D <token>
                PopStackOperands(VESType.Object | VESType.ManagedPointer | VESType.NativeInt, ToVESType(field.FieldType));
                Emit1ByteOpCodeInt32(0x7D, 2, 0, token);
            }
        }
DynamicILGenerator