[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.48,1.49 int_table.
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h,1.48,1.49 int_table.c,1.50,1.51 lib_emit.c,1.4,1.5 |
Date: |
Fri, 21 Mar 2003 20:35:55 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv14175/engine
Modified Files:
int_proto.h int_table.c lib_emit.c
Log Message:
Stub out internalcalls related to classes and methods.
Index: int_proto.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_proto.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -r1.48 -r1.49
*** int_proto.h 20 Mar 2003 06:26:20 -0000 1.48
--- int_proto.h 22 Mar 2003 01:35:52 -0000 1.49
***************
*** 367,373 ****
extern ILUInt8 * _IL_ClrResourceStream_ResourceGetAddress(ILExecThread *
_thread, ILNativeInt _p1, ILInt64 _p2);
extern ILNativeInt _IL_AssemblyBuilder_ClrAssemblyCreate(ILExecThread *
_thread, ILString * _p1, ILInt32 _p2, ILInt32 _p3, ILInt32 _p4, ILInt32 _p5,
ILInt32 _p6, ILNativeInt * writer);
extern void _IL_AssemblyBuilder_ClrSetEntryPoint(ILExecThread * _thread,
ILObject * _this, ILNativeInt _p1, ILInt32 _p2);
! extern ILInt32 _IL_AssemblyBuilder_ClrGetItemToken(ILExecThread * _thread,
ILNativeInt _p1);
extern ILNativeInt _IL_EventBuilder_ClrEventCreate(ILExecThread * _thread,
ILNativeInt _p1, ILString * _p2, ILObject * _p3, ILInt32 _p4);
--- 367,384 ----
extern ILUInt8 * _IL_ClrResourceStream_ResourceGetAddress(ILExecThread *
_thread, ILNativeInt _p1, ILInt64 _p2);
+ extern ILNativeInt _IL_TypeBuilder_ClrTypeCreate(ILExecThread * _thread,
ILNativeInt _p1, ILString * _p2, ILString * _p3, ILInt32 _p4, void * _p5);
+ extern void _IL_TypeBuilder_ClrTypeSetPackingSize(ILExecThread * _thread,
ILNativeInt _p1, ILInt32 _p2);
+ extern void _IL_TypeBuilder_ClrTypeSetClassSize(ILExecThread * _thread,
ILNativeInt _p1, ILInt32 _p2);
+ extern void _IL_TypeBuilder_ClrTypeAddInterface(ILExecThread * _thread,
ILNativeInt _p1, void * _p2);
+ extern ILInt32 _IL_TypeBuilder_ClrTypeGetPackingSize(ILExecThread * _thread,
ILNativeInt _p1);
+ extern ILInt32 _IL_TypeBuilder_ClrTypeGetClassSize(ILExecThread * _thread,
ILNativeInt _p1);
+ extern void _IL_TypeBuilder_ClrTypeSetParent(ILExecThread * _thread,
ILNativeInt _p1, void * _p2);
+ extern ILInt32 _IL_TypeBuilder_ClrTypeImport(ILExecThread * _thread,
ILNativeInt _p1, ILNativeInt _p2);
+ extern ILInt32 _IL_TypeBuilder_ClrTypeImportMember(ILExecThread * _thread,
ILNativeInt _p1, ILNativeInt _p2);
+
+ extern ILInt32 _IL_AssemblyBuilder_ClrGetItemToken(ILExecThread * _thread,
ILNativeInt _p1);
extern ILNativeInt _IL_AssemblyBuilder_ClrAssemblyCreate(ILExecThread *
_thread, ILString * _p1, ILInt32 _p2, ILInt32 _p3, ILInt32 _p4, ILInt32 _p5,
ILInt32 _p6, ILNativeInt * writer);
extern void _IL_AssemblyBuilder_ClrSetEntryPoint(ILExecThread * _thread,
ILObject * _this, ILNativeInt _p1, ILInt32 _p2);
! extern ILNativeInt _IL_AssemblyBuilder_ClrGetItemFromToken(ILExecThread *
_thread, ILNativeInt _p1, ILInt32 _p2);
extern ILNativeInt _IL_EventBuilder_ClrEventCreate(ILExecThread * _thread,
ILNativeInt _p1, ILString * _p2, ILObject * _p3, ILInt32 _p4);
***************
*** 379,383 ****
--- 390,398 ----
extern void _IL_FieldBuilder_ClrFieldSetOffset(ILExecThread * _thread,
ILNativeInt _p1, ILInt32 _p2);
+ extern ILNativeInt _IL_MethodBuilder_ClrMethodCreate(ILExecThread * _thread,
ILNativeInt _p1, ILString * _p2, ILInt32 _p3, ILInt32 _p4, ILObject * _p5,
System_Array * _p6);
+ extern void _IL_MethodBuilder_ClrMethodSetImplAttrs(ILExecThread * _thread,
ILNativeInt _p1, ILInt32 _p2);
+
extern ILNativeInt _IL_ModuleBuilder_ClrModuleCreate(ILExecThread * _thread,
ILNativeInt _p1, ILString * _p2);
+ extern ILInt32 _IL_ModuleBuilder_ClrModuleCreateString(ILExecThread *
_thread, ILNativeInt _p1, ILString * _p2);
extern ILNativeInt _IL_PropertyBuilder_ClrPropertyCreate(ILExecThread *
_thread, ILNativeInt _p1, ILString * _p2, ILInt32 _p3, ILObject * _p4,
System_Array * _p5);
Index: int_table.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_table.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -r1.50 -r1.51
*** int_table.c 20 Mar 2003 06:26:20 -0000 1.50
--- int_table.c 22 Mar 2003 01:35:52 -0000 1.51
***************
*** 1830,1833 ****
--- 1830,1876 ----
#if !defined(HAVE_LIBFFI)
+ static void marshal_jpjppip(void (*fn)(), void *rvalue, void **avalue)
+ {
+ *((ILNativeUInt *)rvalue) = (*(ILNativeUInt (*)(void *, ILNativeUInt,
void *, void *, ILInt32, void *))fn)(*((void * *)(avalue[0])), *((ILNativeUInt
*)(avalue[1])), *((void * *)(avalue[2])), *((void * *)(avalue[3])), *((ILInt32
*)(avalue[4])), *((void * *)(avalue[5])));
+ }
+
+ #endif
+
+ #if !defined(HAVE_LIBFFI)
+
+ static void marshal_vpji(void (*fn)(), void *rvalue, void **avalue)
+ {
+ (*(void (*)(void *, ILNativeUInt, ILInt32))fn)(*((void *
*)(avalue[0])), *((ILNativeUInt *)(avalue[1])), *((ILInt32 *)(avalue[2])));
+ }
+
+ #endif
+
+ #if !defined(HAVE_LIBFFI)
+
+ static void marshal_ipjj(void (*fn)(), void *rvalue, void **avalue)
+ {
+ *((ILNativeInt *)rvalue) = (*(ILInt32 (*)(void *, ILNativeUInt,
ILNativeUInt))fn)(*((void * *)(avalue[0])), *((ILNativeUInt *)(avalue[1])),
*((ILNativeUInt *)(avalue[2])));
+ }
+
+ #endif
+
+ #ifndef _IL_TypeBuilder_suppressed
+
+ IL_METHOD_BEGIN(TypeBuilder_Methods)
+ IL_METHOD("ClrTypeCreate",
"(joSystem.String;oSystem.String;vSystem.Reflection.TypeAttributes;vSystem.Reflection.Emit.TypeToken;)j",
_IL_TypeBuilder_ClrTypeCreate, marshal_jpjppip)
+ IL_METHOD("ClrTypeSetPackingSize", "(ji)V",
_IL_TypeBuilder_ClrTypeSetPackingSize, marshal_vpji)
+ IL_METHOD("ClrTypeSetClassSize", "(ji)V",
_IL_TypeBuilder_ClrTypeSetClassSize, marshal_vpji)
+ IL_METHOD("ClrTypeAddInterface",
"(jvSystem.Reflection.Emit.TypeToken;)V", _IL_TypeBuilder_ClrTypeAddInterface,
marshal_vpjp)
+ IL_METHOD("ClrTypeGetPackingSize", "(j)i",
_IL_TypeBuilder_ClrTypeGetPackingSize, marshal_ipj)
+ IL_METHOD("ClrTypeGetClassSize", "(j)i",
_IL_TypeBuilder_ClrTypeGetClassSize, marshal_ipj)
+ IL_METHOD("ClrTypeSetParent", "(jvSystem.Reflection.Emit.TypeToken;)V",
_IL_TypeBuilder_ClrTypeSetParent, marshal_vpjp)
+ IL_METHOD("ClrTypeImport", "(jj)i", _IL_TypeBuilder_ClrTypeImport,
marshal_ipjj)
+ IL_METHOD("ClrTypeImportMember", "(jj)i",
_IL_TypeBuilder_ClrTypeImportMember, marshal_ipjj)
+ IL_METHOD_END
+
+ #endif
+
+ #if !defined(HAVE_LIBFFI)
+
static void marshal_jppiiiiip(void (*fn)(), void *rvalue, void **avalue)
{
***************
*** 1849,1855 ****
IL_METHOD_BEGIN(AssemblyBuilder_Methods)
IL_METHOD("ClrAssemblyCreate",
"(oSystem.String;iiiivSystem.Reflection.Emit.AssemblyBuilderAccess;&j)j",
_IL_AssemblyBuilder_ClrAssemblyCreate, marshal_jppiiiiip)
IL_METHOD("ClrSetEntryPoint",
"(TjvSystem.Reflection.Emit.PEFileKinds;)V",
_IL_AssemblyBuilder_ClrSetEntryPoint, marshal_vppji)
! IL_METHOD("ClrGetItemToken", "(j)i",
_IL_AssemblyBuilder_ClrGetItemToken, marshal_ipj)
IL_METHOD_END
--- 1892,1899 ----
IL_METHOD_BEGIN(AssemblyBuilder_Methods)
+ IL_METHOD("ClrGetItemToken", "(j)i",
_IL_AssemblyBuilder_ClrGetItemToken, marshal_ipj)
IL_METHOD("ClrAssemblyCreate",
"(oSystem.String;iiiivSystem.Reflection.Emit.AssemblyBuilderAccess;&j)j",
_IL_AssemblyBuilder_ClrAssemblyCreate, marshal_jppiiiiip)
IL_METHOD("ClrSetEntryPoint",
"(TjvSystem.Reflection.Emit.PEFileKinds;)V",
_IL_AssemblyBuilder_ClrSetEntryPoint, marshal_vppji)
! IL_METHOD("ClrGetItemFromToken", "(ji)j",
_IL_AssemblyBuilder_ClrGetItemFromToken, marshal_jpji)
IL_METHOD_END
***************
*** 1883,1902 ****
#endif
#if !defined(HAVE_LIBFFI)
! static void marshal_vpji(void (*fn)(), void *rvalue, void **avalue)
{
! (*(void (*)(void *, ILNativeUInt, ILInt32))fn)(*((void *
*)(avalue[0])), *((ILNativeUInt *)(avalue[1])), *((ILInt32 *)(avalue[2])));
}
#endif
! #ifndef _IL_FieldBuilder_suppressed
! IL_METHOD_BEGIN(FieldBuilder_Methods)
! IL_METHOD("ClrFieldCreate",
"(joSystem.String;oSystem.Type;vSystem.Reflection.FieldAttributes;)j",
_IL_FieldBuilder_ClrFieldCreate, marshal_jpjppi)
! IL_METHOD("ClrFieldSetConstant", "(joSystem.Object;)V",
_IL_FieldBuilder_ClrFieldSetConstant, marshal_vpjp)
! IL_METHOD("ClrFieldSetMarshal", "(j[B)V",
_IL_FieldBuilder_ClrFieldSetMarshal, marshal_vpjp)
! IL_METHOD("ClrFieldSetOffset", "(ji)V",
_IL_FieldBuilder_ClrFieldSetOffset, marshal_vpji)
IL_METHOD_END
--- 1927,1955 ----
#endif
+ #ifndef _IL_FieldBuilder_suppressed
+
+ IL_METHOD_BEGIN(FieldBuilder_Methods)
+ IL_METHOD("ClrFieldCreate",
"(joSystem.String;oSystem.Type;vSystem.Reflection.FieldAttributes;)j",
_IL_FieldBuilder_ClrFieldCreate, marshal_jpjppi)
+ IL_METHOD("ClrFieldSetConstant", "(joSystem.Object;)V",
_IL_FieldBuilder_ClrFieldSetConstant, marshal_vpjp)
+ IL_METHOD("ClrFieldSetMarshal", "(j[B)V",
_IL_FieldBuilder_ClrFieldSetMarshal, marshal_vpjp)
+ IL_METHOD("ClrFieldSetOffset", "(ji)V",
_IL_FieldBuilder_ClrFieldSetOffset, marshal_vpji)
+ IL_METHOD_END
+
+ #endif
+
#if !defined(HAVE_LIBFFI)
! static void marshal_jpjpiipp(void (*fn)(), void *rvalue, void **avalue)
{
! *((ILNativeUInt *)rvalue) = (*(ILNativeUInt (*)(void *, ILNativeUInt,
void *, ILInt32, ILInt32, void *, void *))fn)(*((void * *)(avalue[0])),
*((ILNativeUInt *)(avalue[1])), *((void * *)(avalue[2])), *((ILInt32
*)(avalue[3])), *((ILInt32 *)(avalue[4])), *((void * *)(avalue[5])), *((void *
*)(avalue[6])));
}
#endif
! #ifndef _IL_MethodBuilder_suppressed
! IL_METHOD_BEGIN(MethodBuilder_Methods)
! IL_METHOD("ClrMethodCreate",
"(joSystem.String;vSystem.Reflection.MethodAttributes;vSystem.Reflection.CallingConventions;oSystem.Type;[oSystem.Type;)j",
_IL_MethodBuilder_ClrMethodCreate, marshal_jpjpiipp)
! IL_METHOD("ClrMethodSetImplAttrs",
"(jvSystem.Reflection.MethodImplAttributes;)V",
_IL_MethodBuilder_ClrMethodSetImplAttrs, marshal_vpji)
IL_METHOD_END
***************
*** 1912,1919 ****
--- 1965,1982 ----
#endif
+ #if !defined(HAVE_LIBFFI)
+
+ static void marshal_ipjp(void (*fn)(), void *rvalue, void **avalue)
+ {
+ *((ILNativeInt *)rvalue) = (*(ILInt32 (*)(void *, ILNativeUInt, void
*))fn)(*((void * *)(avalue[0])), *((ILNativeUInt *)(avalue[1])), *((void *
*)(avalue[2])));
+ }
+
+ #endif
+
#ifndef _IL_ModuleBuilder_suppressed
IL_METHOD_BEGIN(ModuleBuilder_Methods)
IL_METHOD("ClrModuleCreate", "(joSystem.String;)j",
_IL_ModuleBuilder_ClrModuleCreate, marshal_jpjp)
+ IL_METHOD("ClrModuleCreateString", "(joSystem.String;)i",
_IL_ModuleBuilder_ClrModuleCreateString, marshal_ipjp)
IL_METHOD_END
***************
*** 2611,2614 ****
--- 2674,2680 ----
{"MethodBase", "System.Reflection", MethodBase_Methods},
#endif
+ #ifndef _IL_MethodBuilder_suppressed
+ {"MethodBuilder", "System.Reflection.Emit", MethodBuilder_Methods},
+ #endif
#ifndef _IL_Module_suppressed
{"Module", "System.Reflection", Module_Methods},
***************
*** 2673,2676 ****
--- 2739,2745 ----
#ifndef _IL_Type_suppressed
{"Type", "System", Type_Methods},
+ #endif
+ #ifndef _IL_TypeBuilder_suppressed
+ {"TypeBuilder", "System.Reflection.Emit", TypeBuilder_Methods},
#endif
#ifndef _IL_TypedReference_suppressed
Index: lib_emit.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_emit.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** lib_emit.c 20 Mar 2003 06:26:20 -0000 1.4
--- lib_emit.c 22 Mar 2003 01:35:52 -0000 1.5
***************
*** 72,75 ****
--- 72,93 ----
/*
+ * internal static IntPtr GetItemFromToken(IntPtr assembly, int token);
+ */
+ ILNativeInt _IL_AssemblyBuilder_ClrGetItemFromToken(ILExecThread *_thread,
+
ILNativeInt assembly,
+
ILInt32 token)
+ {
+ if(assembly)
+ {
+ return (ILNativeInt)ILProgramItem_FromToken
+ (ILProgramItem_Image((ILAssembly *)assembly),
(ILToken)token);
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ /*
* private static IntPtr ClrEventCreate(IntPtr classInfo, String name,
*
Type type, EventAttributes attrs);
***************
*** 139,143 ****
/*
! * private IntPtr ClrModuleCreate(IntPtr assembly, String name);
*/
ILNativeInt _IL_ModuleBuilder_ClrModuleCreate(ILExecThread *_thread,
--- 157,161 ----
/*
! * private static IntPtr ClrModuleCreate(IntPtr assembly, String name);
*/
ILNativeInt _IL_ModuleBuilder_ClrModuleCreate(ILExecThread *_thread,
***************
*** 152,155 ****
--- 170,184 ----
/*
+ * private static int ClrModuleCreateString(IntPtr module, String str);
+ */
+ ILInt32 _IL_ModuleBuilder_ClrModuleCreateString(ILExecThread *_thread,
+
ILNativeInt module,
+
ILString *str)
+ {
+ /* TODO */
+ return 0;
+ }
+
+ /*
* private static IntPtr ClrPropertyCreate(IntPtr classInfo, String name,
*
PropertyAttributes attrs,
***************
*** 189,192 ****
--- 218,353 ----
{
/* TODO */
+ }
+
+ /*
+ * private static IntPtr ClrTypeCreate(IntPtr module, String name,
+ *
String nspace, TypeAttributes attr,
+ *
TypeToken parent);
+ */
+ ILNativeInt _IL_TypeBuilder_ClrTypeCreate(ILExecThread *_thread,
+
ILNativeInt module,
+
ILString *name,
+
ILString *nspace,
+
ILInt32 attr,
+
void *parent)
+ {
+ /* TODO */
+ return 0;
+ }
+
+ /*
+ * private static void ClrTypeSetPackingSize(IntPtr classInfo, int
packingSize);
+ */
+ void _IL_TypeBuilder_ClrTypeSetPackingSize(ILExecThread *_thread,
+
ILNativeInt classInfo,
+
ILInt32 packingSize)
+ {
+ /* TODO */
+ }
+
+ /*
+ * private static void ClrTypeSetClassSize(IntPtr classInfo, int classSize);
+ */
+ void _IL_TypeBuilder_ClrTypeSetClassSize(ILExecThread *_thread,
+
ILNativeInt classInfo,
+
ILInt32 classSize)
+ {
+ /* TODO */
+ }
+
+ /*
+ * private static void ClrTypeAddInterface(IntPtr classInfo, TypeToken iface);
+ */
+ void _IL_TypeBuilder_ClrTypeAddInterface(ILExecThread *_thread,
+
ILNativeInt classInfo,
+
void *iface)
+ {
+ /* TODO */
+ }
+
+ /*
+ * private static int ClrTypeGetPackingSize(IntPtr classInfo);
+ */
+ ILInt32 _IL_TypeBuilder_ClrTypeGetPackingSize(ILExecThread *_thread,
+
ILNativeInt classInfo)
+ {
+ /* TODO */
+ return 0;
+ }
+
+ /*
+ * private static int ClrTypeGetClassSize(IntPtr classInfo);
+ */
+ ILInt32 _IL_TypeBuilder_ClrTypeGetClassSize(ILExecThread *_thread,
+
ILNativeInt classInfo)
+ {
+ /* TODO */
+ return 0;
+ }
+
+ /*
+ * private static void ClrTypeSetParent(IntPtr classInfo, TypeToken parent);
+ */
+ void _IL_TypeBuilder_ClrTypeSetParent(ILExecThread *_thread,
+
ILNativeInt classInfo,
+ void
*parent)
+ {
+ /* TODO */
+ }
+
+ /*
+ * internal static int ClrTypeImport(IntPtr module, IntPtr classInfo);
+ */
+ ILInt32 _IL_TypeBuilder_ClrTypeImport(ILExecThread *_thread,
+
ILNativeInt module,
+
ILNativeInt classInfo)
+ {
+ /* TODO */
+ return 0;
+ }
+
+ /*
+ * internal static int ClrTypeImportMember(IntPtr module, IntPtr memberInfo);
+ */
+ ILInt32 _IL_TypeBuilder_ClrTypeImportMember(ILExecThread *_thread,
+
ILNativeInt module,
+
ILNativeInt memberInfo)
+ {
+ /* TODO */
+ return 0;
+ }
+
+ /*
+ * internal static IntPtr ClrMethodCreate(IntPtr classInfo, String name,
+ *
MethodAttributes attributes,
+ *
CallingConventions callingConvention,
+ *
Type returnType,
+ *
Type[] parameterTypes);
+ */
+ ILNativeInt _IL_MethodBuilder_ClrMethodCreate(ILExecThread *_thread,
+
ILNativeInt classInfo,
+
ILString *name,
+
ILInt32 attributes,
+
ILInt32 callingConvention,
+
ILObject *returnType,
+
System_Array *parameterTypes)
+ {
+ /* TODO */
+ return 0;
+ }
+
+ /*
+ * internal static void ClrMethodSetImplAttrs(IntPtr method,
+ *
MethodImplAttributes attributes);
+ */
+ void _IL_MethodBuilder_ClrMethodSetImplAttrs(ILExecThread *_thread,
+
ILNativeInt item,
+
ILInt32 attributes)
+ {
+ if(item)
+ {
+ ILMethodSetImplAttrs((ILMethod *)item, ~((unsigned long)0),
+ (unsigned
long)(long)attributes);
+ }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h,1.48,1.49 int_table.c,1.50,1.51 lib_emit.c,1.4,1.5,
Rhys Weatherley <address@hidden> <=