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

LoadField() public method

Pushes the value of the given field onto the stack.
public LoadField ( System field ) : void
field System The field whose value will be pushed.
return void
        public override void LoadField(System.Reflection.FieldInfo field)
        {
            if (field == null)
                throw new ArgumentNullException("field");

            int token = this.GetToken(field);
            if (field.IsStatic == true)
            {
                // ldsfld = 7E <token>
                Emit1ByteOpCodeInt32(0x7E, 0, 1, token);
            }
            else
            {
                // ldfld = 7B <token>
                PopStackOperands(VESType.Object | VESType.ManagedPointer | VESType.NativeInt);
                Emit1ByteOpCodeInt32(0x7B, 1, 1, token);
            }
            PushStackOperand(ToVESType(field.FieldType));
        }
DynamicILGenerator