[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h, 1.71, 1.72 int_table
From: |
Richard Baumann <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h, 1.71, 1.72 int_table.c, 1.74, 1.75 lib_reflect.c, 1.43, 1.44 |
Date: |
Thu, 07 Aug 2003 10:02:55 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv8978/engine
Modified Files:
int_proto.h int_table.c lib_reflect.c
Log Message:
Add and implement some assembly related internal calls.
Index: int_proto.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_proto.h,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -r1.71 -r1.72
*** int_proto.h 25 Jul 2003 08:33:44 -0000 1.71
--- int_proto.h 7 Aug 2003 14:02:53 -0000 1.72
***************
*** 6,9 ****
--- 6,11 ----
extern ILObject * _IL_Object_MemberwiseClone(ILExecThread * _thread, ILObject
* _this);
+ extern System_Array * _IL_AppDomain_GetAssemblies(ILExecThread * _thread,
ILObject * _this);
+
extern void _IL_ArgIterator_ctor_RuntimeArgumentHandle(ILExecThread *
_thread, void * _this, void * _p1);
extern void _IL_ArgIterator_ctor_RuntimeArgumentHandlepV(ILExecThread *
_thread, void * _this, void * _p1, void * _p2);
***************
*** 249,260 ****
extern ILBool _IL_GCHandle_GCValidate(ILExecThread * _thread, ILInt32 _p1);
extern ILNativeInt _IL_Marshal_AllocHGlobal(ILExecThread * _thread,
ILNativeInt _p1);
extern void _IL_Marshal_CopyMU(ILExecThread * _thread, ILObject * _p1,
ILInt32 _p2, ILNativeInt _p3, ILInt32 _p4);
extern void _IL_Marshal_CopyUM(ILExecThread * _thread, ILNativeInt _p1,
ILObject * _p2, ILInt32 _p3, ILInt32 _p4);
- extern void _IL_Marshal_FreeHGlobal(ILExecThread * _thread, ILNativeInt _p1);
extern ILNativeInt _IL_Marshal_OffsetOfInternal(ILExecThread * _thread,
ILObject * _p1, ILString * _p2);
- extern ILString * _IL_Marshal_PtrToStringAnsiInternal(ILExecThread * _thread,
ILNativeInt _p1, ILInt32 _p2);
extern ILString * _IL_Marshal_PtrToStringAutoInternal(ILExecThread * _thread,
ILNativeInt _p1, ILInt32 _p2);
- extern ILString * _IL_Marshal_PtrToStringUniInternal(ILExecThread * _thread,
ILNativeInt _p1, ILInt32 _p2);
extern ILBool _IL_Marshal_PtrToStructureInternal(ILExecThread * _thread,
ILNativeInt _p1, ILObject * _p2, ILBool _p3);
extern ILBool _IL_Marshal_DestroyStructureInternal(ILExecThread * _thread,
ILNativeInt _p1, ILObject * _p2);
--- 251,262 ----
extern ILBool _IL_GCHandle_GCValidate(ILExecThread * _thread, ILInt32 _p1);
+ extern void _IL_Marshal_FreeHGlobal(ILExecThread * _thread, ILNativeInt _p1);
extern ILNativeInt _IL_Marshal_AllocHGlobal(ILExecThread * _thread,
ILNativeInt _p1);
+ extern ILString * _IL_Marshal_PtrToStringUniInternal(ILExecThread * _thread,
ILNativeInt _p1, ILInt32 _p2);
+ extern ILString * _IL_Marshal_PtrToStringAnsiInternal(ILExecThread * _thread,
ILNativeInt _p1, ILInt32 _p2);
extern void _IL_Marshal_CopyMU(ILExecThread * _thread, ILObject * _p1,
ILInt32 _p2, ILNativeInt _p3, ILInt32 _p4);
extern void _IL_Marshal_CopyUM(ILExecThread * _thread, ILNativeInt _p1,
ILObject * _p2, ILInt32 _p3, ILInt32 _p4);
extern ILNativeInt _IL_Marshal_OffsetOfInternal(ILExecThread * _thread,
ILObject * _p1, ILString * _p2);
extern ILString * _IL_Marshal_PtrToStringAutoInternal(ILExecThread * _thread,
ILNativeInt _p1, ILInt32 _p2);
extern ILBool _IL_Marshal_PtrToStructureInternal(ILExecThread * _thread,
ILNativeInt _p1, ILObject * _p2, ILBool _p3);
extern ILBool _IL_Marshal_DestroyStructureInternal(ILExecThread * _thread,
ILNativeInt _p1, ILObject * _p2);
***************
*** 302,305 ****
--- 304,308 ----
extern void _IL_Assembly_GetEntryPoint(ILExecThread * _thread, void *
_result, ILObject * _this);
extern ILString * _IL_Assembly_GetImageRuntimeVersion(ILExecThread * _thread,
ILObject * _this);
+ extern ILString * _IL_Assembly_GetLocation(ILExecThread * _thread, ILObject *
_this);
extern ILObject * _IL_MethodBase_GetMethodFromHandle(ILExecThread * _thread,
void * _p1);
***************
*** 367,372 ****
extern ILObject * _IL_ClrType_GetGenericType(ILExecThread * _thread, ILObject
* _this);
- extern ILObject * _IL_Module_GetAssembly(ILExecThread * _thread, ILObject *
_this);
extern ILObject * _IL_Module_GetModuleType(ILExecThread * _thread, ILObject *
_this);
extern ILString * _IL_Module_GetFullName(ILExecThread * _thread, ILObject *
_this);
extern ILObject * _IL_Module_GetType(ILExecThread * _thread, ILObject *
_this, ILString * _p1, ILBool _p2, ILBool _p3);
--- 370,375 ----
extern ILObject * _IL_ClrType_GetGenericType(ILExecThread * _thread, ILObject
* _this);
extern ILObject * _IL_Module_GetModuleType(ILExecThread * _thread, ILObject *
_this);
+ extern ILObject * _IL_Module_GetAssembly(ILExecThread * _thread, ILObject *
_this);
extern ILString * _IL_Module_GetFullName(ILExecThread * _thread, ILObject *
_this);
extern ILObject * _IL_Module_GetType(ILExecThread * _thread, ILObject *
_this, ILString * _p1, ILBool _p2, ILBool _p3);
***************
*** 454,457 ****
--- 457,468 ----
extern ILInt32 _IL_StackFrame_InternalGetTotalFrames(ILExecThread * _thread);
+ extern ILString * _IL_InfoMethods_GetRuntimeVersion(ILExecThread * _thread);
+ extern ILString * _IL_InfoMethods_GetNetBIOSMachineName(ILExecThread *
_thread);
+ extern ILInt32 _IL_InfoMethods_GetPlatformID(ILExecThread * _thread);
+ extern ILString * _IL_InfoMethods_GetUserDomainName(ILExecThread * _thread);
+ extern ILBool _IL_InfoMethods_IsUserInteractive(ILExecThread * _thread);
+ extern ILString * _IL_InfoMethods_GetUserName(ILExecThread * _thread);
+ extern ILInt64 _IL_InfoMethods_GetWorkingSet(ILExecThread * _thread);
+
extern void _IL_CryptoMethods_Decrypt(ILExecThread * _thread, ILNativeInt
_p1, System_Array * _p2, ILInt32 _p3, System_Array * _p4, ILInt32 _p5);
extern void _IL_CryptoMethods_Encrypt(ILExecThread * _thread, ILNativeInt
_p1, System_Array * _p2, ILInt32 _p3, System_Array * _p4, ILInt32 _p5);
***************
*** 493,498 ****
extern void _IL_DirMethods_GetPathInfo(ILExecThread * _thread, void *
_result);
- extern ILBool _IL_FileMethods_ValidatePathname(ILExecThread * _thread,
ILString * _p1);
extern ILInt32 _IL_FileMethods_GetFileType(ILExecThread * _thread, ILString *
_p1);
extern ILInt32 _IL_FileMethods_SetCreationTime(ILExecThread * _thread,
ILString * _p1, ILInt64 _p2);
extern ILInt32 _IL_FileMethods_SetLastAccessTime(ILExecThread * _thread,
ILString * _p1, ILInt64 _p2);
--- 504,509 ----
extern void _IL_DirMethods_GetPathInfo(ILExecThread * _thread, void *
_result);
extern ILInt32 _IL_FileMethods_GetFileType(ILExecThread * _thread, ILString *
_p1);
+ extern ILBool _IL_FileMethods_ValidatePathname(ILExecThread * _thread,
ILString * _p1);
extern ILInt32 _IL_FileMethods_SetCreationTime(ILExecThread * _thread,
ILString * _p1, ILInt64 _p2);
extern ILInt32 _IL_FileMethods_SetLastAccessTime(ILExecThread * _thread,
ILString * _p1, ILInt64 _p2);
***************
*** 515,527 ****
extern ILBool _IL_FileMethods_HasAsync(ILExecThread * _thread);
extern ILInt32 _IL_FileMethods_Copy(ILExecThread * _thread, ILString * _p1,
ILString * _p2);
-
- extern ILString * _IL_InfoMethods_GetRuntimeVersion(ILExecThread * _thread);
- extern ILString * _IL_InfoMethods_GetNetBIOSMachineName(ILExecThread *
_thread);
- extern ILInt32 _IL_InfoMethods_GetPlatformID(ILExecThread * _thread);
- extern ILString * _IL_InfoMethods_GetUserDomainName(ILExecThread * _thread);
- extern ILBool _IL_InfoMethods_IsUserInteractive(ILExecThread * _thread);
- extern ILString * _IL_InfoMethods_GetUserName(ILExecThread * _thread);
- extern ILInt64 _IL_InfoMethods_GetWorkingSet(ILExecThread * _thread);
- extern ILString * _IL_InfoMethods_GetSpecialFolder(ILExecThread * _thread,
ILInt32 _p1);
extern ILNativeInt _IL_RegexpMethods_CompileWithSyntaxInternal(ILExecThread *
_thread, ILString * _p1, ILInt32 _p2);
--- 526,529 ----
Index: int_table.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_table.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -r1.74 -r1.75
*** int_table.c 25 Jul 2003 08:33:44 -0000 1.74
--- int_table.c 7 Aug 2003 14:02:53 -0000 1.75
***************
*** 39,42 ****
--- 39,50 ----
#endif
+ #ifndef _IL_AppDomain_suppressed
+
+ IL_METHOD_BEGIN(AppDomain_Methods)
+ IL_METHOD("GetAssemblies", "(T)[oSystem.Reflection.Assembly;",
_IL_AppDomain_GetAssemblies, marshal_ppp)
+ IL_METHOD_END
+
+ #endif
+
#if !defined(HAVE_LIBFFI)
***************
*** 1313,1319 ****
#if !defined(HAVE_LIBFFI)
! static void marshal_vppiji(void (*fn)(), void *rvalue, void **avalue)
{
! (*(void (*)(void *, void *, ILInt32, ILNativeUInt, ILInt32))fn)(*((void
* *)(avalue[0])), *((void * *)(avalue[1])), *((ILInt32 *)(avalue[2])),
*((ILNativeUInt *)(avalue[3])), *((ILInt32 *)(avalue[4])));
}
--- 1321,1327 ----
#if !defined(HAVE_LIBFFI)
! static void marshal_ppji(void (*fn)(), void *rvalue, void **avalue)
{
! *((void * *)rvalue) = (*(void * (*)(void *, ILNativeUInt,
ILInt32))fn)(*((void * *)(avalue[0])), *((ILNativeUInt *)(avalue[1])),
*((ILInt32 *)(avalue[2])));
}
***************
*** 1322,1328 ****
#if !defined(HAVE_LIBFFI)
! static void marshal_vpjpii(void (*fn)(), void *rvalue, void **avalue)
{
! (*(void (*)(void *, ILNativeUInt, void *, ILInt32, ILInt32))fn)(*((void
* *)(avalue[0])), *((ILNativeUInt *)(avalue[1])), *((void * *)(avalue[2])),
*((ILInt32 *)(avalue[3])), *((ILInt32 *)(avalue[4])));
}
--- 1330,1336 ----
#if !defined(HAVE_LIBFFI)
! static void marshal_vppiji(void (*fn)(), void *rvalue, void **avalue)
{
! (*(void (*)(void *, void *, ILInt32, ILNativeUInt, ILInt32))fn)(*((void
* *)(avalue[0])), *((void * *)(avalue[1])), *((ILInt32 *)(avalue[2])),
*((ILNativeUInt *)(avalue[3])), *((ILInt32 *)(avalue[4])));
}
***************
*** 1331,1337 ****
#if !defined(HAVE_LIBFFI)
! static void marshal_jppp(void (*fn)(), void *rvalue, void **avalue)
{
! *((ILNativeUInt *)rvalue) = (*(ILNativeUInt (*)(void *, void *, void
*))fn)(*((void * *)(avalue[0])), *((void * *)(avalue[1])), *((void *
*)(avalue[2])));
}
--- 1339,1345 ----
#if !defined(HAVE_LIBFFI)
! static void marshal_vpjpii(void (*fn)(), void *rvalue, void **avalue)
{
! (*(void (*)(void *, ILNativeUInt, void *, ILInt32, ILInt32))fn)(*((void
* *)(avalue[0])), *((ILNativeUInt *)(avalue[1])), *((void * *)(avalue[2])),
*((ILInt32 *)(avalue[3])), *((ILInt32 *)(avalue[4])));
}
***************
*** 1340,1346 ****
#if !defined(HAVE_LIBFFI)
! static void marshal_ppji(void (*fn)(), void *rvalue, void **avalue)
{
! *((void * *)rvalue) = (*(void * (*)(void *, ILNativeUInt,
ILInt32))fn)(*((void * *)(avalue[0])), *((ILNativeUInt *)(avalue[1])),
*((ILInt32 *)(avalue[2])));
}
--- 1348,1354 ----
#if !defined(HAVE_LIBFFI)
! static void marshal_jppp(void (*fn)(), void *rvalue, void **avalue)
{
! *((ILNativeUInt *)rvalue) = (*(ILNativeUInt (*)(void *, void *, void
*))fn)(*((void * *)(avalue[0])), *((void * *)(avalue[1])), *((void *
*)(avalue[2])));
}
***************
*** 1485,1496 ****
IL_METHOD_BEGIN(Marshal_Methods)
IL_METHOD("AllocHGlobal", "(j)j", _IL_Marshal_AllocHGlobal, marshal_jpj)
IL_METHOD("CopyMU", "(oSystem.Array;iji)V", _IL_Marshal_CopyMU,
marshal_vppiji)
IL_METHOD("CopyUM", "(joSystem.Array;ii)V", _IL_Marshal_CopyUM,
marshal_vpjpii)
- IL_METHOD("FreeHGlobal", "(j)V", _IL_Marshal_FreeHGlobal, marshal_vpj)
IL_METHOD("OffsetOfInternal", "(oSystem.Type;oSystem.String;)j",
_IL_Marshal_OffsetOfInternal, marshal_jppp)
- IL_METHOD("PtrToStringAnsiInternal", "(ji)oSystem.String;",
_IL_Marshal_PtrToStringAnsiInternal, marshal_ppji)
IL_METHOD("PtrToStringAutoInternal", "(ji)oSystem.String;",
_IL_Marshal_PtrToStringAutoInternal, marshal_ppji)
- IL_METHOD("PtrToStringUniInternal", "(ji)oSystem.String;",
_IL_Marshal_PtrToStringUniInternal, marshal_ppji)
IL_METHOD("PtrToStructureInternal", "(joSystem.Object;Z)Z",
_IL_Marshal_PtrToStructureInternal, marshal_bpjpb)
IL_METHOD("DestroyStructureInternal", "(joSystem.Type;)Z",
_IL_Marshal_DestroyStructureInternal, marshal_bpjp)
--- 1493,1504 ----
IL_METHOD_BEGIN(Marshal_Methods)
+ IL_METHOD("FreeHGlobal", "(j)V", _IL_Marshal_FreeHGlobal, marshal_vpj)
IL_METHOD("AllocHGlobal", "(j)j", _IL_Marshal_AllocHGlobal, marshal_jpj)
+ IL_METHOD("PtrToStringUniInternal", "(ji)oSystem.String;",
_IL_Marshal_PtrToStringUniInternal, marshal_ppji)
+ IL_METHOD("PtrToStringAnsiInternal", "(ji)oSystem.String;",
_IL_Marshal_PtrToStringAnsiInternal, marshal_ppji)
IL_METHOD("CopyMU", "(oSystem.Array;iji)V", _IL_Marshal_CopyMU,
marshal_vppiji)
IL_METHOD("CopyUM", "(joSystem.Array;ii)V", _IL_Marshal_CopyUM,
marshal_vpjpii)
IL_METHOD("OffsetOfInternal", "(oSystem.Type;oSystem.String;)j",
_IL_Marshal_OffsetOfInternal, marshal_jppp)
IL_METHOD("PtrToStringAutoInternal", "(ji)oSystem.String;",
_IL_Marshal_PtrToStringAutoInternal, marshal_ppji)
IL_METHOD("PtrToStructureInternal", "(joSystem.Object;Z)Z",
_IL_Marshal_PtrToStructureInternal, marshal_bpjpb)
IL_METHOD("DestroyStructureInternal", "(joSystem.Type;)Z",
_IL_Marshal_DestroyStructureInternal, marshal_bpjp)
***************
*** 1568,1571 ****
--- 1576,1580 ----
IL_METHOD("GetEntryPoint", "(T)vSystem.RuntimeMethodHandle;",
_IL_Assembly_GetEntryPoint, marshal_vppp)
IL_METHOD("GetImageRuntimeVersion", "(T)oSystem.String;",
_IL_Assembly_GetImageRuntimeVersion, marshal_ppp)
+ IL_METHOD("GetLocation", "(T)oSystem.String;",
_IL_Assembly_GetLocation, marshal_ppp)
IL_METHOD_END
***************
*** 1843,1848 ****
IL_METHOD_BEGIN(Module_Methods)
- IL_METHOD("GetAssembly", "(T)oSystem.Reflection.Assembly;",
_IL_Module_GetAssembly, marshal_ppp)
IL_METHOD("GetModuleType", "(T)oSystem.Type;",
_IL_Module_GetModuleType, marshal_ppp)
IL_METHOD("GetFullName", "(T)oSystem.String;", _IL_Module_GetFullName,
marshal_ppp)
IL_METHOD("GetType", "(ToSystem.String;ZZ)oSystem.Type;",
_IL_Module_GetType, marshal_ppppbb)
--- 1852,1857 ----
IL_METHOD_BEGIN(Module_Methods)
IL_METHOD("GetModuleType", "(T)oSystem.Type;",
_IL_Module_GetModuleType, marshal_ppp)
+ IL_METHOD("GetAssembly", "(T)oSystem.Reflection.Assembly;",
_IL_Module_GetAssembly, marshal_ppp)
IL_METHOD("GetFullName", "(T)oSystem.String;", _IL_Module_GetFullName,
marshal_ppp)
IL_METHOD("GetType", "(ToSystem.String;ZZ)oSystem.Type;",
_IL_Module_GetType, marshal_ppppbb)
***************
*** 2205,2208 ****
--- 2214,2240 ----
#if !defined(HAVE_LIBFFI)
+ static void marshal_lp(void (*fn)(), void *rvalue, void **avalue)
+ {
+ *((ILInt64 *)rvalue) = (*(ILInt64 (*)(void *))fn)(*((void *
*)(avalue[0])));
+ }
+
+ #endif
+
+ #ifndef _IL_InfoMethods_suppressed
+
+ IL_METHOD_BEGIN(InfoMethods_Methods)
+ IL_METHOD("GetRuntimeVersion", "()oSystem.String;",
_IL_InfoMethods_GetRuntimeVersion, marshal_pp)
+ IL_METHOD("GetNetBIOSMachineName", "()oSystem.String;",
_IL_InfoMethods_GetNetBIOSMachineName, marshal_pp)
+ IL_METHOD("GetPlatformID", "()vSystem.PlatformID;",
_IL_InfoMethods_GetPlatformID, marshal_ip)
+ IL_METHOD("GetUserDomainName", "()oSystem.String;",
_IL_InfoMethods_GetUserDomainName, marshal_pp)
+ IL_METHOD("IsUserInteractive", "()Z",
_IL_InfoMethods_IsUserInteractive, marshal_bp)
+ IL_METHOD("GetUserName", "()oSystem.String;",
_IL_InfoMethods_GetUserName, marshal_pp)
+ IL_METHOD("GetWorkingSet", "()l", _IL_InfoMethods_GetWorkingSet,
marshal_lp)
+ IL_METHOD_END
+
+ #endif
+
+ #if !defined(HAVE_LIBFFI)
+
static void marshal_vpjpipi(void (*fn)(), void *rvalue, void **avalue)
{
***************
*** 2356,2361 ****
IL_METHOD_BEGIN(FileMethods_Methods)
- IL_METHOD("ValidatePathname", "(oSystem.String;)Z",
_IL_FileMethods_ValidatePathname, marshal_bpp)
IL_METHOD("GetFileType", "(oSystem.String;)vPlatform.FileType;",
_IL_FileMethods_GetFileType, marshal_ipp)
IL_METHOD("SetCreationTime", "(oSystem.String;l)vPlatform.Errno;",
_IL_FileMethods_SetCreationTime, marshal_ippl)
IL_METHOD("SetLastAccessTime", "(oSystem.String;l)vPlatform.Errno;",
_IL_FileMethods_SetLastAccessTime, marshal_ippl)
--- 2388,2393 ----
IL_METHOD_BEGIN(FileMethods_Methods)
IL_METHOD("GetFileType", "(oSystem.String;)vPlatform.FileType;",
_IL_FileMethods_GetFileType, marshal_ipp)
+ IL_METHOD("ValidatePathname", "(oSystem.String;)Z",
_IL_FileMethods_ValidatePathname, marshal_bpp)
IL_METHOD("SetCreationTime", "(oSystem.String;l)vPlatform.Errno;",
_IL_FileMethods_SetCreationTime, marshal_ippl)
IL_METHOD("SetLastAccessTime", "(oSystem.String;l)vPlatform.Errno;",
_IL_FileMethods_SetLastAccessTime, marshal_ippl)
***************
*** 2384,2411 ****
#if !defined(HAVE_LIBFFI)
- static void marshal_lp(void (*fn)(), void *rvalue, void **avalue)
- {
- *((ILInt64 *)rvalue) = (*(ILInt64 (*)(void *))fn)(*((void *
*)(avalue[0])));
- }
-
- #endif
-
- #ifndef _IL_InfoMethods_suppressed
-
- IL_METHOD_BEGIN(InfoMethods_Methods)
- IL_METHOD("GetRuntimeVersion", "()oSystem.String;",
_IL_InfoMethods_GetRuntimeVersion, marshal_pp)
- IL_METHOD("GetNetBIOSMachineName", "()oSystem.String;",
_IL_InfoMethods_GetNetBIOSMachineName, marshal_pp)
- IL_METHOD("GetPlatformID", "()vSystem.PlatformID;",
_IL_InfoMethods_GetPlatformID, marshal_ip)
- IL_METHOD("GetUserDomainName", "()oSystem.String;",
_IL_InfoMethods_GetUserDomainName, marshal_pp)
- IL_METHOD("IsUserInteractive", "()Z",
_IL_InfoMethods_IsUserInteractive, marshal_bp)
- IL_METHOD("GetUserName", "()oSystem.String;",
_IL_InfoMethods_GetUserName, marshal_pp)
- IL_METHOD("GetWorkingSet", "()l", _IL_InfoMethods_GetWorkingSet,
marshal_lp)
- IL_METHOD("GetSpecialFolder",
"(vSystem.Environment/SpecialFolder;)oSystem.String;",
_IL_InfoMethods_GetSpecialFolder, marshal_ppi)
- IL_METHOD_END
-
- #endif
-
- #if !defined(HAVE_LIBFFI)
-
static void marshal_ipjpi(void (*fn)(), void *rvalue, void **avalue)
{
--- 2416,2419 ----
***************
*** 2811,2814 ****
--- 2819,2825 ----
} InternalClassInfo;
static InternalClassInfo const internalClassTable[] = {
+ #ifndef _IL_AppDomain_suppressed
+ {"AppDomain", "System", AppDomain_Methods},
+ #endif
#ifndef _IL_ArgIterator_suppressed
{"ArgIterator", "System", ArgIterator_Methods},
Index: lib_reflect.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_reflect.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** lib_reflect.c 6 Aug 2003 04:40:30 -0000 1.43
--- lib_reflect.c 7 Aug 2003 14:02:53 -0000 1.44
***************
*** 758,761 ****
--- 758,834 ----
/*
+ * public Assembly[] GetAssemblies();
+ */
+ System_Array *_IL_AppDomain_GetAssemblies(ILExecThread *thread,
+ ILObject *_this)
+ {
+ ILContext *context;
+ ILImage *image;
+ ILInt32 num;
+ System_Array *array;
+ ILObject **buffer;
+ ILImage **images;
+ ILImage **ptr;
+
+ IL_METADATA_RDLOCK(thread);
+
+ context = thread->process->context;
+
+ /* count out the number of images */
+ image = 0;
+ num = 0;
+ while((image = ILContextNextImage(context, image)) != 0)
+ {
+ ++num;
+ }
+
+ /* create the image array */
+ if (!(images = (ILImage *)ILMalloc(sizeof(ILImage *)*num)))
+ {
+ IL_METADATA_UNLOCK(thread);
+ ILExecThreadThrowOutOfMemory(thread);
+ return 0;
+ }
+
+ /* fill the image array */
+ image = 0;
+ ptr = images;
+ while((image = ILContextNextImage(context, image)) != 0)
+ {
+ *ptr = image;
+ ++ptr;
+ }
+
+ IL_METADATA_UNLOCK(thread);
+
+ /* create the assembly array */
+ array = (System_Array *)ILExecThreadNew(thread,
+ "[oSystem.Reflection.Assembly;",
+ "(Ti)V", (ILVaInt)num);
+ if(!array)
+ {
+ ILExecThreadThrowOutOfMemory(thread);
+ return 0;
+ }
+
+ /* fill the assembly array */
+ ptr = images;
+ buffer = (ILObject **)(ArrayToBuffer(array));
+ while(num > 0)
+ {
+ *buffer = ImageToAssembly(thread, *ptr);
+ ++buffer;
+ ++ptr;
+ --num;
+ }
+
+ /* cleanup */
+ ILFree(images);
+
+ /* return the assembly array */
+ return array;
+ }
+
+ /*
* public static Assembly GetCallingAssembly();
*/
***************
*** 949,952 ****
--- 1022,1080 ----
/* We don't support manifest files yet */
return 0;
+ }
+
+ /*
+ * private String GetLocation();
+ */
+ ILString *_IL_Assembly_GetLocation(ILExecThread *thread,
+ ILObject *_this)
+ {
+ ILString *retval;
+ ILProgramItem *item;
+ ILImage *image;
+ char *path;
+ int len;
+
+ /* Bail out we have no filename to work with */
+ if (!(item = (ILProgramItem *)_ILClrFromObject(thread, _this)))
+ {
+ return 0;
+ }
+ if (!(image = ILProgramItem_Image(item)))
+ {
+ return 0;
+ }
+ if(!(image->filename))
+ {
+ return 0;
+ }
+
+ /* Strip the base name off the image's filename */
+ len = strlen(image->filename);
+ while(len > 0 &&
+ image->filename[len-1] != '/' &&
+ image->filename[len-1] != '\\')
+ {
+ --len;
+ }
+
+ /* Bail out we have an empty path */
+ if (!len)
+ {
+ return 0;
+ }
+
+ /* Construct the path */
+ if(!(path = (char *)ILMalloc(len+1)))
+ {
+ ILExecThreadThrowOutOfMemory(thread);
+ return 0;
+ }
+ strncpy(path, image->filename, len);
+ retval = ILStringCreate(thread, path);
+ ILFree(path);
+
+ /* Return the path to the caller */
+ return retval;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h, 1.71, 1.72 int_table.c, 1.74, 1.75 lib_reflect.c, 1.43, 1.44,
Richard Baumann <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Xml/Serialization SoapAttributeAttribute.cs, 1.1, 1.2 SoapElementAttribute.cs, 1.1, 1.2 SoapEnumAttribute.cs, 1.1, 1.2 SoapIgnoreAttribute.cs, 1.1, 1.2 SoapIncludeAttribute.cs, 1.1, 1.2 SoapTypeAttribute.cs, 1.1, 1.2 XmlAnyAttributeAttribute.cs, 1.1, 1.2 XmlAnyElementAttribute.cs, 1.1, 1.2 XmlArrayAttribute.cs, 1.1, 1.2 XmlArrayItemAttribute.cs, 1.1, 1.2 XmlAttributeAttribute.cs, 1.1, 1.2 XmlChoiceIdentifierAttribute.cs, 1.1, 1.2 XmlElementAttribute.cs, 1.1, 1.2 XmlEnumAttribute.cs, 1.1, 1.2 XmlIgnoreAttribute.cs, 1.1, 1.2 XmlIncludeAttribute.cs, 1.1, 1.2 XmlNamespaceDeclarationsAttribute.cs, 1.1, 1.2 XmlRootAttribute.cs, 1.1, 1.2 XmlTextAttribute.cs, 1.1, 1.2 XmlTypeAttribute.cs, 1.1, 1.2
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.1240,1.1241
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Xml/Serialization SoapAttributeAttribute.cs, 1.1, 1.2 SoapElementAttribute.cs, 1.1, 1.2 SoapEnumAttribute.cs, 1.1, 1.2 SoapIgnoreAttribute.cs, 1.1, 1.2 SoapIncludeAttribute.cs, 1.1, 1.2 SoapTypeAttribute.cs, 1.1, 1.2 XmlAnyAttributeAttribute.cs, 1.1, 1.2 XmlAnyElementAttribute.cs, 1.1, 1.2 XmlArrayAttribute.cs, 1.1, 1.2 XmlArrayItemAttribute.cs, 1.1, 1.2 XmlAttributeAttribute.cs, 1.1, 1.2 XmlChoiceIdentifierAttribute.cs, 1.1, 1.2 XmlElementAttribute.cs, 1.1, 1.2 XmlEnumAttribute.cs, 1.1, 1.2 XmlIgnoreAttribute.cs, 1.1, 1.2 XmlIncludeAttribute.cs, 1.1, 1.2 XmlNamespaceDeclarationsAttribute.cs, 1.1, 1.2 XmlRootAttribute.cs, 1.1, 1.2 XmlTextAttribute.cs, 1.1, 1.2 XmlTypeAttribute.cs, 1.1, 1.2
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.1240,1.1241
- Index(es):