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

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

[Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h, 1.83, 1.84 int_table


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h, 1.83, 1.84 int_table.c, 1.86, 1.87 internal.c, 1.38, 1.39 lib_type.c, 1.41, 1.42
Date: Sun, 31 Aug 2003 20:37:45 -0400

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

Modified Files:
        int_proto.h int_table.c internal.c lib_type.c 
Log Message:


New internalcall for "FormatterServices".


Index: int_proto.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_proto.h,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -r1.83 -r1.84
*** int_proto.h 31 Aug 2003 03:45:42 -0000      1.83
--- int_proto.h 1 Sep 2003 00:37:43 -0000       1.84
***************
*** 246,249 ****
--- 246,250 ----
  extern ILObject * _IL_ClrSecurity_GetPermissions(ILExecThread * _thread, 
ILInt32 _p1);
  
+ extern System_Array * 
_IL_FormatterServices_InternalGetSerializableMembers(ILExecThread * _thread, 
ILObject * _p1);
  extern ILObject * 
_IL_FormatterServices_InternalGetUninitializedObject(ILExecThread * _thread, 
ILObject * _p1);
  
***************
*** 507,514 ****
  extern ILString * _IL_SysCharInfo_GetNewLine(ILExecThread * _thread);
  
- extern ILString * _IL_TaskMethods_GetEnvironmentVariable(ILExecThread * 
_thread, ILString * _p1);
  extern void _IL_TaskMethods_Exit(ILExecThread * _thread, ILInt32 _p1);
  extern void _IL_TaskMethods_SetExitCode(ILExecThread * _thread, ILInt32 _p1);
  extern System_Array * _IL_TaskMethods_GetCommandLineArgs(ILExecThread * 
_thread);
  extern ILInt32 _IL_TaskMethods_GetEnvironmentCount(ILExecThread * _thread);
  extern ILString * _IL_TaskMethods_GetEnvironmentKey(ILExecThread * _thread, 
ILInt32 _p1);
--- 508,515 ----
  extern ILString * _IL_SysCharInfo_GetNewLine(ILExecThread * _thread);
  
  extern void _IL_TaskMethods_Exit(ILExecThread * _thread, ILInt32 _p1);
  extern void _IL_TaskMethods_SetExitCode(ILExecThread * _thread, ILInt32 _p1);
  extern System_Array * _IL_TaskMethods_GetCommandLineArgs(ILExecThread * 
_thread);
+ extern ILString * _IL_TaskMethods_GetEnvironmentVariable(ILExecThread * 
_thread, ILString * _p1);
  extern ILInt32 _IL_TaskMethods_GetEnvironmentCount(ILExecThread * _thread);
  extern ILString * _IL_TaskMethods_GetEnvironmentKey(ILExecThread * _thread, 
ILInt32 _p1);
***************
*** 548,551 ****
--- 549,553 ----
  extern ILInt32 _IL_FileMethods_Copy(ILExecThread * _thread, ILString * _p1, 
ILString * _p2);
  
+ extern ILString * _IL_InfoMethods_GetUserStorageDir(ILExecThread * _thread);
  extern ILInt32 _IL_InfoMethods_GetPlatformID(ILExecThread * _thread);
  extern ILString * _IL_InfoMethods_GetRuntimeVersion(ILExecThread * _thread);
***************
*** 556,560 ****
  extern ILInt64 _IL_InfoMethods_GetWorkingSet(ILExecThread * _thread);
  extern ILString * _IL_InfoMethods_GetGlobalConfigDir(ILExecThread * _thread);
- extern ILString * _IL_InfoMethods_GetUserStorageDir(ILExecThread * _thread);
  
  extern ILNativeInt _IL_RegexpMethods_CompileWithSyntaxInternal(ILExecThread * 
_thread, ILString * _p1, ILInt32 _p2);
--- 558,561 ----

Index: int_table.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_table.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -r1.86 -r1.87
*** int_table.c 31 Aug 2003 03:45:42 -0000      1.86
--- int_table.c 1 Sep 2003 00:37:43 -0000       1.87
***************
*** 1269,1272 ****
--- 1269,1273 ----
  
  IL_METHOD_BEGIN(FormatterServices_Methods)
+       IL_METHOD("InternalGetSerializableMembers", 
"(oSystem.Type;)[oSystem.Reflection.MemberInfo;", 
_IL_FormatterServices_InternalGetSerializableMembers, marshal_ppp)
        IL_METHOD("InternalGetUninitializedObject", 
"(oSystem.Type;)oSystem.Object;", 
_IL_FormatterServices_InternalGetUninitializedObject, marshal_ppp)
  IL_METHOD_END
***************
*** 2358,2365 ****
  
  IL_METHOD_BEGIN(TaskMethods_Methods)
-       IL_METHOD("GetEnvironmentVariable", "(oSystem.String;)oSystem.String;", 
_IL_TaskMethods_GetEnvironmentVariable, marshal_ppp)
        IL_METHOD("Exit", "(i)V", _IL_TaskMethods_Exit, marshal_vpi)
        IL_METHOD("SetExitCode", "(i)V", _IL_TaskMethods_SetExitCode, 
marshal_vpi)
        IL_METHOD("GetCommandLineArgs", "()[oSystem.String;", 
_IL_TaskMethods_GetCommandLineArgs, marshal_pp)
        IL_METHOD("GetEnvironmentCount", "()i", 
_IL_TaskMethods_GetEnvironmentCount, marshal_ip)
        IL_METHOD("GetEnvironmentKey", "(i)oSystem.String;", 
_IL_TaskMethods_GetEnvironmentKey, marshal_ppi)
--- 2359,2366 ----
  
  IL_METHOD_BEGIN(TaskMethods_Methods)
        IL_METHOD("Exit", "(i)V", _IL_TaskMethods_Exit, marshal_vpi)
        IL_METHOD("SetExitCode", "(i)V", _IL_TaskMethods_SetExitCode, 
marshal_vpi)
        IL_METHOD("GetCommandLineArgs", "()[oSystem.String;", 
_IL_TaskMethods_GetCommandLineArgs, marshal_pp)
+       IL_METHOD("GetEnvironmentVariable", "(oSystem.String;)oSystem.String;", 
_IL_TaskMethods_GetEnvironmentVariable, marshal_ppp)
        IL_METHOD("GetEnvironmentCount", "()i", 
_IL_TaskMethods_GetEnvironmentCount, marshal_ip)
        IL_METHOD("GetEnvironmentKey", "(i)oSystem.String;", 
_IL_TaskMethods_GetEnvironmentKey, marshal_ppi)
***************
*** 2516,2519 ****
--- 2517,2521 ----
  
  IL_METHOD_BEGIN(InfoMethods_Methods)
+       IL_METHOD("GetUserStorageDir", "()oSystem.String;", 
_IL_InfoMethods_GetUserStorageDir, marshal_pp)
        IL_METHOD("GetPlatformID", "()vSystem.PlatformID;", 
_IL_InfoMethods_GetPlatformID, marshal_ip)
        IL_METHOD("GetRuntimeVersion", "()oSystem.String;", 
_IL_InfoMethods_GetRuntimeVersion, marshal_pp)
***************
*** 2524,2528 ****
        IL_METHOD("GetWorkingSet", "()l", _IL_InfoMethods_GetWorkingSet, 
marshal_lp)
        IL_METHOD("GetGlobalConfigDir", "()oSystem.String;", 
_IL_InfoMethods_GetGlobalConfigDir, marshal_pp)
-       IL_METHOD("GetUserStorageDir", "()oSystem.String;", 
_IL_InfoMethods_GetUserStorageDir, marshal_pp)
  IL_METHOD_END
  
--- 2526,2529 ----

Index: internal.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/internal.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** internal.c  16 Apr 2003 04:51:28 -0000      1.38
--- internal.c  1 Sep 2003 00:37:43 -0000       1.39
***************
*** 66,69 ****
--- 66,70 ----
        #define _IL_SignatureHelper_suppressed
        #define _IL_ParameterBuilder_suppressed
+       #define _IL_FormatterServices_suppressed
  #endif
  #if !defined(IL_CONFIG_RUNTIME_INFRA) && !defined(IL_CONFIG_REFLECTION)

Index: lib_type.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_type.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** lib_type.c  8 Aug 2003 07:10:32 -0000       1.41
--- lib_type.c  1 Sep 2003 00:37:43 -0000       1.42
***************
*** 2509,2512 ****
--- 2509,2581 ----
  }
  
+ #ifdef IL_CONFIG_REFLECTION
+ 
+ /*
+  * private static MemberInfo[] InternalGetSerializableMembers(type);
+  */
+ System_Array *_IL_FormatterServices_InternalGetSerializableMembers
+                       (ILExecThread *_thread, ILObject *type)
+ {
+       ILClass *classInfo;
+       ILClass *info;
+       ILField *field;
+       ILInt32 size;
+       System_Array *array;
+       ILObject **buf;
+ 
+       /* Convert the type into an ILClass structure */
+       classInfo = _ILGetClrClass(_thread, type);
+ 
+       /* Count the number of serializable fields in the type */
+       info = classInfo;
+       size = 0;
+       while(info != 0)
+       {
+               field = 0;
+               while((field = (ILField *)ILClassNextMemberByKind
+                                       (info, (ILMember *)field, 
IL_META_MEMBERKIND_FIELD)) != 0)
+               {
+                       if(!ILField_IsNotSerialized(field))
+                       {
+                               ++size;
+                       }
+               }
+               info = ILClass_Parent(info);
+       }
+ 
+       /* Allocate an array to hold the serializable fields */
+       array = (System_Array *)ILExecThreadNew
+                               (_thread, "[oSystem.Reflection.MemberInfo;",
+                                "(Ti)V", (ILVaInt)size);
+       if(!array)
+       {
+               return 0;
+       }
+       buf = (ILObject **)(ArrayToBuffer(array));
+ 
+       /* Populate the array */
+       info = classInfo;
+       size = 0;
+       while(info != 0)
+       {
+               field = 0;
+               while((field = (ILField *)ILClassNextMemberByKind
+                                       (info, (ILMember *)field, 
IL_META_MEMBERKIND_FIELD)) != 0)
+               {
+                       if(!ILField_IsNotSerialized(field))
+                       {
+                               buf[++size] = ItemToClrObject
+                                       (_thread, &(field->member.programItem));
+                       }
+               }
+               info = ILClass_Parent(info);
+       }
+ 
+       /* Return the final array to the caller */
+       return array;
+ }
+ 
+ #endif /* IL_CONFIG_REFLECTION */
+ 
  /*
   * protected override bool HasGenericArgumentsImpl();





reply via email to

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