[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_coerce.c,1.17,1.18
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_coerce.c,1.17,1.18 |
Date: |
Mon, 18 Nov 2002 19:29:44 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/codegen
In directory subversions:/tmp/cvs-serv26442/codegen
Modified Files:
cg_coerce.c
Log Message:
minor enhancements to indirect conversions
Index: cg_coerce.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_coerce.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** cg_coerce.c 18 Nov 2002 23:35:37 -0000 1.17
--- cg_coerce.c 19 Nov 2002 00:29:40 -0000 1.18
***************
*** 584,589 ****
}
argType=ILTypeGetParam(signature,1);
! if(ILCanCoerceKind(info,returnType,toType,kinds,0) &&
! ILCanCoerceKind(info,fromType,argType,kinds,0))
{
if(itype1)(*itype1)=argType;
--- 584,591 ----
}
argType=ILTypeGetParam(signature,1);
! if(((ILCanCoerceKind(info,returnType,toType,kinds,0) &&
!
ILCanCoerceKind(info,fromType,argType,kinds,0)))
! || ((explicit &&
ILCanCastKind(info,returnType,toType,
! kinds,0) &&
ILCanCastKind(info,fromType,argType,kinds,0))))
{
if(itype1)(*itype1)=argType;
***************
*** 625,630 ****
argType=ILTypeGetParam(signature,1);
! if(ILCanCoerceKind(info,returnType,toType,kinds,0) &&
! ILCanCoerceKind(info,fromType,argType,kinds,0))
{
if(itype1)(*itype1)=argType;
--- 627,634 ----
argType=ILTypeGetParam(signature,1);
! if(((ILCanCoerceKind(info,returnType,toType,kinds,0) &&
!
ILCanCoerceKind(info,fromType,argType,kinds,0)))
! || ((explicit &&
ILCanCastKind(info,returnType,toType,
! kinds,0) &&
ILCanCastKind(info,fromType,argType,kinds,0))))
{
if(itype1)(*itype1)=argType;
***************
*** 641,646 ****
--- 645,652 ----
/* start explicit checks */
+
arg1Class = ILTypeToClass(info, fromType);
arg2Class = ILTypeToClass(info, toType);
+
while(arg1Class != 0)
{
***************
*** 677,682 ****
if(itype1)(*itype1)=argType;
if(itype2)(*itype2)=returnType;
!
GetConvertRules(info,fromType,argType,0,kinds,rules1);
!
GetConvertRules(info,returnType,toType,0,kinds,rules2);
return 1;
}
--- 683,688 ----
if(itype1)(*itype1)=argType;
if(itype2)(*itype2)=returnType;
!
GetConvertRules(info,fromType,argType,1,kinds,rules1);
!
GetConvertRules(info,returnType,toType,1,kinds,rules2);
return 1;
}
***************
*** 719,723 ****
if(itype2)(*itype2)=returnType;
GetConvertRules(info,fromType,argType,0,kinds,rules1);
!
GetConvertRules(info,returnType,toType,0,kinds,rules2);
return 1;
}
--- 725,729 ----
if(itype2)(*itype2)=returnType;
GetConvertRules(info,fromType,argType,0,kinds,rules1);
!
GetConvertRules(info,returnType,toType,1,kinds,rules2);
return 1;
}
***************
*** 1022,1026 ****
ApplyRules(info, node, parent, &rules, t1);
ILCoerceKind(info,*parent,parent,t1,t2,kinds,0);
! ApplyRules(info, *parent, parent, &rules, toType);
return 1;
}
--- 1028,1032 ----
ApplyRules(info, node, parent, &rules, t1);
ILCoerceKind(info,*parent,parent,t1,t2,kinds,0);
! ApplyRules(info, *parent, parent, &rules2, toType);
return 1;
}
***************
*** 1075,1083 ****
return 1;
}
! else if(GetIndirectConvertRules(info,fromType,toType,1,
IL_CONVERT_ALL,&rules,&rules2,&t1,&t2))
{
ApplyRules(info, node, parent, &rules, t1);
! ILCast(info,*parent,parent,t1,t2,indirect);
ApplyRules(info, *parent, parent, &rules2, toType);
return 1;
--- 1081,1089 ----
return 1;
}
! else if(indirect && GetIndirectConvertRules(info,fromType,toType,1,
IL_CONVERT_ALL,&rules,&rules2,&t1,&t2))
{
ApplyRules(info, node, parent, &rules, t1);
! ILCast(info,*parent,parent,t1,t2,0);
ApplyRules(info, *parent, parent, &rules2, toType);
return 1;
***************
*** 1106,1110 ****
ApplyRules(info, node, parent, &rules, t1);
ILCastKind(info,*parent,parent,t1,t2,kinds,0);
! ApplyRules(info, *parent, parent, &rules, toType);
return 1;
}
--- 1112,1116 ----
ApplyRules(info, node, parent, &rules, t1);
ILCastKind(info,*parent,parent,t1,t2,kinds,0);
! ApplyRules(info, *parent, parent, &rules2, toType);
return 1;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/codegen cg_coerce.c,1.17,1.18,
Gopal.V <address@hidden> <=