[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine cvmc_call.c,1.24,1.25 null_coder
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine cvmc_call.c,1.24,1.25 null_coder.c,1.17,1.18 verify_call.c,1.35,1.36 |
Date: |
Sun, 13 Apr 2003 20:36:02 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv1393/engine
Modified Files:
cvmc_call.c null_coder.c verify_call.c
Log Message:
Handle vararg method calls correctly in "ILCoderCheckCallNull".
Index: cvmc_call.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/cvmc_call.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** cvmc_call.c 24 Feb 2003 00:45:59 -0000 1.24
--- cvmc_call.c 14 Apr 2003 00:36:00 -0000 1.25
***************
*** 117,123 ****
static void CVMCoder_CheckCallNull(ILCoder *coder, ILEngineStackItem *args,
! ILUInt32 numArgs)
{
ILUInt32 size = ComputeStackSize(coder, args, numArgs);
if(size == 1)
{
--- 117,127 ----
static void CVMCoder_CheckCallNull(ILCoder *coder, ILEngineStackItem *args,
! ILUInt32
numArgs, int extraVarArgParam)
{
ILUInt32 size = ComputeStackSize(coder, args, numArgs);
+ if(extraVarArgParam)
+ {
+ ++size;
+ }
if(size == 1)
{
Index: null_coder.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/null_coder.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** null_coder.c 23 Feb 2003 04:24:11 -0000 1.17
--- null_coder.c 14 Apr 2003 00:36:00 -0000 1.18
***************
*** 271,275 ****
}
static void Coder_CheckCallNull(ILCoder *coder, ILEngineStackItem *args,
! ILUInt32 numArgs)
{
}
--- 271,275 ----
}
static void Coder_CheckCallNull(ILCoder *coder, ILEngineStackItem *args,
! ILUInt32 numArgs,
int extraVarArgParam)
{
}
Index: verify_call.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/verify_call.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** verify_call.c 13 Apr 2003 10:26:58 -0000 1.35
--- verify_call.c 14 Apr 2003 00:36:00 -0000 1.36
***************
*** 173,177 ****
ILUInt32 stackSize,
ILType *signature,
ILMethod *method, int
unsafeAllowed,
! int suppressThis, int
indirectCall)
{
ILClass *owner = (method ? ILMethod_Owner(method) : 0);
--- 173,178 ----
ILUInt32 stackSize,
ILType *signature,
ILMethod *method, int
unsafeAllowed,
! int suppressThis, int
indirectCall,
! ILUInt32
*numVarArgParams)
{
ILClass *owner = (method ? ILMethod_Owner(method) : 0);
***************
*** 192,195 ****
--- 193,197 ----
/* Check the vararg vs non-vararg conventions, and get the
number of non-vararg parameters */
+ *numVarArgParams = 0;
#ifdef IL_CONFIG_VARARGS
if(indirectCall)
***************
*** 619,622 ****
--- 621,625 ----
ILCoderPackVarArgs(coder, signature, numParams + 1,
stack + numParams,
totalParams - numParams);
+ *numVarArgParams = totalParams - numParams;
}
#endif /* IL_CONFIG_VARARGS */
***************
*** 955,958 ****
--- 958,962 ----
ILType *returnType;
ILInt32 numParams;
+ ILUInt32 numVarArgParams;
int inlineType;
***************
*** 1008,1012 ****
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, methodInfo,
!
unsafeAllowed, 0, 0);
if(numParams >= 0)
{
--- 1012,1016 ----
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, methodInfo,
!
unsafeAllowed, 0, 0, &numVarArgParams);
if(numParams >= 0)
{
***************
*** 1103,1107 ****
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, 0,
!
unsafeAllowed, 0, 1);
if(numParams >= 0)
{
--- 1107,1112 ----
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, 0,
!
unsafeAllowed, 0, 1,
!
&numVarArgParams);
if(numParams >= 0)
{
***************
*** 1186,1190 ****
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, methodInfo,
!
unsafeAllowed, 0, 0);
if(numParams >= 0)
{
--- 1191,1196 ----
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, methodInfo,
!
unsafeAllowed, 0, 0,
!
&numVarArgParams);
if(numParams >= 0)
{
***************
*** 1215,1219 ****
ILCoderCheckCallNull
(coder, stack +
stackSize - numParams,
!
(ILUInt32)numParams);
}
ILCoderCallMethod(coder, stack
+ stackSize - numParams,
--- 1221,1227 ----
ILCoderCheckCallNull
(coder, stack +
stackSize - numParams,
!
((ILUInt32)numParams) - numVarArgParams,
!
(ILType_Kind(methodSignature) &
!
IL_TYPE_COMPLEX_METHOD_SENTINEL) != 0);
}
ILCoderCallMethod(coder, stack
+ stackSize - numParams,
***************
*** 1297,1301 ****
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, methodInfo,
!
unsafeAllowed, 1, 0);
if(numParams < 0)
{
--- 1305,1310 ----
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, methodInfo,
!
unsafeAllowed, 1, 0,
!
&numVarArgParams);
if(numParams < 0)
{
***************
*** 1337,1341 ****
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, methodInfo,
!
unsafeAllowed, 0, 0);
if(numParams < 0)
{
--- 1346,1351 ----
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, methodInfo,
!
unsafeAllowed, 0, 0,
!
&numVarArgParams);
if(numParams < 0)
{
***************
*** 1485,1489 ****
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, methodInfo,
!
unsafeAllowed, 0, 0);
case IL_OP_CALLI:
--- 1495,1500 ----
numParams = MatchSignature(coder, stack, stackSize,
methodSignature, methodInfo,
!
unsafeAllowed, 0, 0,
!
&numVarArgParams);
case IL_OP_CALLI:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine cvmc_call.c,1.24,1.25 null_coder.c,1.17,1.18 verify_call.c,1.35,1.36,
Rhys Weatherley <address@hidden> <=