dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] pnet/engine int_proto.h, 1.90, 1.91 int_table.c, 1


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] pnet/engine int_proto.h, 1.90, 1.91 int_table.c, 1.93, 1.94 lib_reflect.c, 1.50, 1.51
Date: Thu, 13 Nov 2003 22:17:53 +0000

Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv27101/engine

Modified Files:
        int_proto.h int_table.c lib_reflect.c 
Log Message:


Support static fields in "ClrField.GetValue" and "ClrField.SetValue".


Index: lib_reflect.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_reflect.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** lib_reflect.c       23 Aug 2003 01:47:27 -0000      1.50
--- lib_reflect.c       13 Nov 2003 22:17:50 -0000      1.51
***************
*** 2206,2213 ****
  
  /*
!  * public override Object GetValue(Object obj);
   */
! ILObject *_IL_ClrField_GetValue(ILExecThread *thread, ILObject *_this,
!                                                               ILObject *obj)
  {
        ILField *field;
--- 2206,2213 ----
  
  /*
!  * internal Object GetValueInternal(Object obj);
   */
! ILObject *_IL_ClrField_GetValueInternal(ILExecThread *thread, ILObject *_this,
!                                                                               
ILObject *obj)
  {
        ILField *field;
***************
*** 2257,2262 ****
        else if(ILField_IsStatic(field))
        {
!               /* TODO */
!               return 0;
        }
        else
--- 2257,2271 ----
        else if(ILField_IsStatic(field))
        {
!               /* Get the field's type and a pointer to it */
!               type = ILField_Type(field);
!               ptr = ((ILClassPrivate 
*)(GetObjectClass(obj)->userData))->staticData;
!               if(ptr)
!               {
!                       ptr = (void *)(((unsigned char *)ptr) + field->offset);
!               }
!               else
!               {
!                       return 0;
!               }
        }
        else
***************
*** 2286,2297 ****
  
  /*
!  * public override void SetValue(Object obj, Object value,
!  *                               BindingFlags invokeAttr,
!  *                               Binder binder, CultureInfo culture);
   */
! void _IL_ClrField_SetValue(ILExecThread *thread, ILObject *_this,
!                                                  ILObject *obj, ILObject 
*value,
!                                                  ILInt32 invokeAttr, ILObject 
*binder,
!                                                  ILObject *culture)
  {
        ILField *field;
--- 2295,2306 ----
  
  /*
!  * internal void SetValueInternal(Object obj, Object value,
!  *                                BindingFlags invokeAttr,
!  *                                Binder binder, CultureInfo culture);
   */
! void _IL_ClrField_SetValueInternal(ILExecThread *thread, ILObject *_this,
!                                                                  ILObject 
*obj, ILObject *value,
!                                                                  ILInt32 
invokeAttr, ILObject *binder,
!                                                                  ILObject 
*culture)
  {
        ILField *field;
***************
*** 2322,2327 ****
        else if(ILField_IsStatic(field))
        {
!               /* TODO */
!               return;
        }
        else
--- 2331,2345 ----
        else if(ILField_IsStatic(field))
        {
!               /* Get the field's type and a pointer to it */
!               type = ILField_Type(field);
!               ptr = ((ILClassPrivate 
*)(GetObjectClass(obj)->userData))->staticData;
!               if(ptr)
!               {
!                       ptr = (void *)(((unsigned char *)ptr) + field->offset);
!               }
!               else
!               {
!                       return;
!               }
        }
        else

Index: int_proto.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_proto.h,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** int_proto.h 8 Nov 2003 05:49:45 -0000       1.90
--- int_proto.h 13 Nov 2003 22:17:49 -0000      1.91
***************
*** 361,366 ****
  
  extern ILObject * _IL_ClrField_GetFieldType(ILExecThread * _thread, 
ILNativeInt item);
! extern ILObject * _IL_ClrField_GetValue(ILExecThread * _thread, ILObject * 
_this, ILObject * obj);
! extern void _IL_ClrField_SetValue(ILExecThread * _thread, ILObject * _this, 
ILObject * obj, ILObject * value, ILInt32 invokeAttr, ILObject * binder, 
ILObject * culture);
  extern ILObject * _IL_ClrField_GetValueDirect(ILExecThread * _thread, 
ILObject * _this, ILTypedRef obj);
  extern void _IL_ClrField_SetValueDirect(ILExecThread * _thread, ILObject * 
_this, ILTypedRef obj, ILObject * value);
--- 361,366 ----
  
  extern ILObject * _IL_ClrField_GetFieldType(ILExecThread * _thread, 
ILNativeInt item);
! extern ILObject * _IL_ClrField_GetValueInternal(ILExecThread * _thread, 
ILObject * _this, ILObject * obj);
! extern void _IL_ClrField_SetValueInternal(ILExecThread * _thread, ILObject * 
_this, ILObject * obj, ILObject * value, ILInt32 invokeAttr, ILObject * binder, 
ILObject * culture);
  extern ILObject * _IL_ClrField_GetValueDirect(ILExecThread * _thread, 
ILObject * _this, ILTypedRef obj);
  extern void _IL_ClrField_SetValueDirect(ILExecThread * _thread, ILObject * 
_this, ILTypedRef obj, ILObject * value);

Index: int_table.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_table.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -C2 -d -r1.93 -r1.94
*** int_table.c 8 Nov 2003 05:49:46 -0000       1.93
--- int_table.c 13 Nov 2003 22:17:50 -0000      1.94
***************
*** 1759,1764 ****
  IL_METHOD_BEGIN(ClrField_Methods)
        IL_METHOD("GetFieldType", "(j)oSystem.Type;", 
_IL_ClrField_GetFieldType, marshal_ppj)
!       IL_METHOD("GetValue", "(ToSystem.Object;)oSystem.Object;", 
_IL_ClrField_GetValue, marshal_pppp)
!       IL_METHOD("SetValue", 
"(ToSystem.Object;oSystem.Object;vSystem.Reflection.BindingFlags;oSystem.Reflection.Binder;oSystem.Globalization.CultureInfo;)V",
 _IL_ClrField_SetValue, marshal_vppppipp)
        IL_METHOD("GetValueDirect", "(Tr)oSystem.Object;", 
_IL_ClrField_GetValueDirect, marshal_pppr)
        IL_METHOD("SetValueDirect", "(TroSystem.Object;)V", 
_IL_ClrField_SetValueDirect, marshal_vpprp)
--- 1759,1764 ----
  IL_METHOD_BEGIN(ClrField_Methods)
        IL_METHOD("GetFieldType", "(j)oSystem.Type;", 
_IL_ClrField_GetFieldType, marshal_ppj)
!       IL_METHOD("GetValueInternal", "(ToSystem.Object;)oSystem.Object;", 
_IL_ClrField_GetValueInternal, marshal_pppp)
!       IL_METHOD("SetValueInternal", 
"(ToSystem.Object;oSystem.Object;vSystem.Reflection.BindingFlags;oSystem.Reflection.Binder;oSystem.Globalization.CultureInfo;)V",
 _IL_ClrField_SetValueInternal, marshal_vppppipp)
        IL_METHOD("GetValueDirect", "(Tr)oSystem.Object;", 
_IL_ClrField_GetValueDirect, marshal_pppr)
        IL_METHOD("SetValueDirect", "(TroSystem.Object;)V", 
_IL_ClrField_SetValueDirect, marshal_vpprp)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]