public void Visit(FieldValue operand)
		{
			operand.Parent().Accept(this);
			Type clazz = ((operand.Parent() is StaticFieldRoot) ? (Type)_value : _value.GetType
				());
			try
			{
				FieldInfo field = Reflection4.GetField(clazz, operand.FieldName());
				_value = field.GetValue(_value);
			}
			catch (Exception exc)
			{
				// arg is ignored for static
				Sharpen.Runtime.PrintStackTrace(exc);
			}
		}
 public virtual void Visit(FieldValue fieldValue)
 {
     var lastFieldClass = fieldValue.Field.Type;
     var needConversion = lastFieldClass.IsPrimitive;
     fieldValue.Parent().Accept(this);
     if (_staticRoot != null)
     {
         _methodBuilder.LoadStaticField(fieldValue.Field);
         _staticRoot = null;
         return;
     }
     _methodBuilder.LoadField(fieldValue.Field);
     Box(lastFieldClass, !_inArithmetic && needConversion);
 }
예제 #3
0
 public virtual void Visit(FieldValue operand)
 {
     operand.Parent().Accept(this);
 }