[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine call.c,1.27,1.28 engine.h,1.68,1
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine call.c,1.27,1.28 engine.h,1.68,1.69 pinvoke.c,1.20,1.21 |
Date: |
Wed, 19 Feb 2003 23:54:07 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv10326/engine
Modified Files:
call.c engine.h pinvoke.c
Log Message:
Use the marshalling information on the delegate for closure processing,
instead of the marshalling information on the target.
Index: call.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/call.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** call.c 26 Aug 2002 11:38:49 -0000 1.27
--- call.c 20 Feb 2003 04:54:04 -0000 1.28
***************
*** 411,415 ****
void _ILCallUnpackDirectResult(ILExecThread *thread, ILMethod *method,
! int isCtor, void *result)
{
ILType *signature = ILMethod_Signature(method);
--- 411,415 ----
void _ILCallUnpackDirectResult(ILExecThread *thread, ILMethod *method,
! int isCtor, void *result,
void *userData)
{
ILType *signature = ILMethod_Signature(method);
***************
*** 543,547 ****
void _ILCallUnpackVResult(ILExecThread *thread, ILMethod *method,
! int isCtor, void *_result)
{
ILExecValue *result = (ILExecValue *)_result;
--- 543,547 ----
void _ILCallUnpackVResult(ILExecThread *thread, ILMethod *method,
! int isCtor, void *_result, void
*userData)
{
ILExecValue *result = (ILExecValue *)_result;
***************
*** 711,715 ****
{
/* Unpack the return value */
! (*unpack)(thread, method, isCtor, result);
}
--- 711,715 ----
{
/* Unpack the return value */
! (*unpack)(thread, method, isCtor, result, userData);
}
Index: engine.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/engine.h,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -r1.68 -r1.69
*** engine.h 17 Feb 2003 05:20:31 -0000 1.68
--- engine.h 20 Feb 2003 04:54:04 -0000 1.69
***************
*** 272,276 ****
*/
void _ILCallUnpackDirectResult(ILExecThread *thread, ILMethod *method,
! int isCtor, void *result);
/*
--- 272,276 ----
*/
void _ILCallUnpackDirectResult(ILExecThread *thread, ILMethod *method,
! int isCtor, void *result,
void *userData);
/*
***************
*** 279,283 ****
*/
void _ILCallUnpackVResult(ILExecThread *thread, ILMethod *method,
! int isCtor, void *result);
/*
--- 279,283 ----
*/
void _ILCallUnpackVResult(ILExecThread *thread, ILMethod *method,
! int isCtor, void *result, void
*userData);
/*
***************
*** 291,295 ****
*/
typedef void (*ILCallUnpackFunc)(ILExecThread *thread, ILMethod *method,
! int isCtor, void *result);
/*
--- 291,295 ----
*/
typedef void (*ILCallUnpackFunc)(ILExecThread *thread, ILMethod *method,
! int isCtor, void *result,
void *userData);
/*
Index: pinvoke.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/pinvoke.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** pinvoke.c 17 Feb 2003 05:20:31 -0000 1.20
--- pinvoke.c 20 Feb 2003 04:54:04 -0000 1.21
***************
*** 442,445 ****
--- 442,455 ----
/*
+ * User data for "PackDelegateParams".
+ */
+ typedef struct
+ {
+ void **args;
+ ILMethod *pinvokeInfo;
+
+ } PackDelegateUserData;
+
+ /*
* Pack the parameters for a delegate closure call onto the CVM stack.
*/
***************
*** 447,451 ****
int isCtor, void *_this, void
*userData)
{
! void **args = (void **)userData;
ILType *signature = ILMethod_Signature(method);
CVMWord *stacktop, *stacklimit;
--- 457,462 ----
int isCtor, void *_this, void
*userData)
{
! void **args = ((PackDelegateUserData *)userData)->args;
! ILMethod *pinvokeInfo = ((PackDelegateUserData *)userData)->pinvokeInfo;
ILType *signature = ILMethod_Signature(method);
CVMWord *stacktop, *stacklimit;
***************
*** 478,482 ****
{
/* Marshal parameters that need special handling */
! marshalType = ILPInvokeGetMarshalType(0, method, param,
&customName, &customNameLen,
&customCookie, &customCookieLen);
--- 489,493 ----
{
/* Marshal parameters that need special handling */
! marshalType = ILPInvokeGetMarshalType(0, pinvokeInfo, param,
&customName, &customNameLen,
&customCookie, &customCookieLen);
***************
*** 701,706 ****
*/
static void UnpackDelegateResult(ILExecThread *thread, ILMethod *method,
! int isCtor, void *result)
{
ILType *signature = ILMethod_Signature(method);
ILType *paramType;
--- 712,718 ----
*/
static void UnpackDelegateResult(ILExecThread *thread, ILMethod *method,
! int isCtor, void *result,
void *userData)
{
+ ILMethod *pinvokeInfo = ((PackDelegateUserData *)userData)->pinvokeInfo;
ILType *signature = ILMethod_Signature(method);
ILType *paramType;
***************
*** 715,719 ****
/* Marshal return types that need special handling */
marshalType = ILPInvokeGetMarshalType
! (0, method, 0, &customName, &customNameLen,
&customCookie, &customCookieLen);
if(marshalType != IL_META_MARSHAL_DIRECT)
--- 727,731 ----
/* Marshal return types that need special handling */
marshalType = ILPInvokeGetMarshalType
! (0, pinvokeInfo, 0, &customName, &customNameLen,
&customCookie, &customCookieLen);
if(marshalType != IL_META_MARSHAL_DIRECT)
***************
*** 897,900 ****
--- 909,913 ----
ILType *type;
ILUInt32 size;
+ PackDelegateUserData userData;
/* If this is a multicast delegate, then execute "prev" first */
***************
*** 919,926 ****
/* Call the method */
if(_ILCallMethod(thread, method,
UnpackDelegateResult, result,
0, ((System_Delegate *)delegate)->target,
! PackDelegateParams, args))
{
/* An exception occurred, which is already stored in the thread
*/
--- 932,942 ----
/* Call the method */
+ userData.args = args;
+ userData.pinvokeInfo = (ILMethod *)ILTypeGetDelegateMethod
+ (ILType_FromClass(GetObjectClass(delegate)));
if(_ILCallMethod(thread, method,
UnpackDelegateResult, result,
0, ((System_Delegate *)delegate)->target,
! PackDelegateParams, &userData))
{
/* An exception occurred, which is already stored in the thread
*/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine call.c,1.27,1.28 engine.h,1.68,1.69 pinvoke.c,1.20,1.21,
Rhys Weatherley <address@hidden> <=