[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.24,1.25 cs_inv
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.24,1.25 cs_invoke.tc,1.17,1.18 cs_oper.tc,1.26,1.27 cs_stmt.tc,1.26,1.27 |
Date: |
Fri, 15 Nov 2002 20:02:34 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc/csharp
In directory subversions:/tmp/cvs-serv16619/cscc/csharp
Modified Files:
cs_gather.c cs_invoke.tc cs_oper.tc cs_stmt.tc
Log Message:
Multiple step coercions using user defined operations
Index: cs_gather.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_gather.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** cs_gather.c 13 Nov 2002 17:18:04 -0000 1.24
--- cs_gather.c 16 Nov 2002 01:02:30 -0000 1.25
***************
*** 1734,1737 ****
--- 1734,1738 ----
ILNode_ClassDefn *defn;
ILScope *scope;
+ ILScope *aliasScope;
ILNode *origDefn;
const char *name;
***************
*** 1752,1758 ****
namespace = 0;
}
! error = ILScopeDeclareType(parentScope, child,
name, namespace, &scope,
&origDefn);
if(error != IL_SCOPE_ERROR_OK)
{
--- 1753,1766 ----
namespace = 0;
}
!
! /* NOTE: this is sure to be a subscope of globalscope
! * and yet can contain the type correctly.*/
!
aliasScope=((ILNode_Namespace*)(defn->namespaceNode))->localScope;
! if(!aliasScope)aliasScope=parentScope; /* making sure */
!
! error = ILScopeDeclareType(aliasScope, child,
name, namespace, &scope,
&origDefn);
+
if(error != IL_SCOPE_ERROR_OK)
{
Index: cs_invoke.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_invoke.tc,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** cs_invoke.tc 15 Nov 2002 01:37:42 -0000 1.17
--- cs_invoke.tc 16 Nov 2002 01:02:30 -0000 1.18
***************
*** 1314,1318 ****
/* We already started matching as an element
type,
so we must keep matching as an element type
*/
! if(!ILCanCoerce(info, args[argNum].type,
paramType))
{
return 0;
--- 1314,1318 ----
/* We already started matching as an element
type,
so we must keep matching as an element type
*/
! if(!ILCanCoerce(info, args[argNum].type,
paramType,1))
{
return 0;
***************
*** 1324,1333 ****
elemType = GetArrayElemType(args[argNum].type);
if(elemType != ILType_Invalid &&
! ILCanCoerce(info, elemType, paramType))
{
/* Matched as an array */
++paramNum;
}
! else if(!ILCanCoerce(info, args[argNum].type,
paramType))
{
if(args[argNum].type==ILType_Null)
--- 1324,1333 ----
elemType = GetArrayElemType(args[argNum].type);
if(elemType != ILType_Invalid &&
! ILCanCoerce(info, elemType, paramType,1))
{
/* Matched as an array */
++paramNum;
}
! else if(!ILCanCoerce(info, args[argNum].type,
paramType,1))
{
if(args[argNum].type==ILType_Null)
***************
*** 1587,1591 ****
elemType = GetArrayElemType(args[argNum].type);
if(elemType != ILType_Invalid &&
! ILCanCoerce(info, elemType, paramType))
{
/* Pass the argument as an array */
--- 1587,1591 ----
elemType = GetArrayElemType(args[argNum].type);
if(elemType != ILType_Invalid &&
! ILCanCoerce(info, elemType, paramType,1))
{
/* Pass the argument as an array */
Index: cs_oper.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_oper.tc,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** cs_oper.tc 15 Nov 2002 21:46:52 -0000 1.26
--- cs_oper.tc 16 Nov 2002 01:02:30 -0000 1.27
***************
*** 86,90 ****
argType2=ILTypeGetParam(sig,2);
! if(ILCanCoerce(info,CSSemGetType(*value1),argType1))
{
ILCoerce(info,node->expr1,
--- 86,90 ----
argType2=ILTypeGetParam(sig,2);
! if(ILCanCoerce(info,CSSemGetType(*value1),argType1,1))
{
ILCoerce(info,node->expr1,
***************
*** 94,98 ****
/* CSSemSetRValue(*value1, argType1); *//* not needed */
}
! if(ILCanCoerce(info,CSSemGetType(*value2),argType2))
{
ILCoerce(info,node->expr2,
--- 94,98 ----
/* CSSemSetRValue(*value1, argType1); *//* not needed */
}
! if(ILCanCoerce(info,CSSemGetType(*value2),argType2,1))
{
ILCoerce(info,node->expr2,
***************
*** 853,857 ****
return value1;
}
-
/* Insert coercion nodes to convert the rvalue appropriately */
ILCoerce(info, node->expr2, &(node->expr2),
--- 853,856 ----
***************
*** 961,964 ****
--- 960,964 ----
method = FindUserBinaryOperator(info, name, CSSemGetType(value1),
CSSemGetType(value2));
+
if(method)
{
Index: cs_stmt.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_stmt.tc,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** cs_stmt.tc 13 Nov 2002 20:33:27 -0000 1.26
--- cs_stmt.tc 16 Nov 2002 01:02:30 -0000 1.27
***************
*** 1344,1348 ****
{
thrownType = CSSemType(node->type, info, &(node->type));
! if(!ILCanCoerce(info, thrownType, exceptionType))
{
CCErrorOnLine(yygetfilename(node), yygetlinenum(node),
--- 1344,1348 ----
{
thrownType = CSSemType(node->type, info, &(node->type));
! if(!ILCanCoerce(info, thrownType, exceptionType,0))
{
CCErrorOnLine(yygetfilename(node), yygetlinenum(node),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.24,1.25 cs_invoke.tc,1.17,1.18 cs_oper.tc,1.26,1.27 cs_stmt.tc,1.26,1.27,
Gopal.V <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1839,1.1840
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_coerce.c,1.13,1.14 cg_coerce.h,1.14,1.15
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1839,1.1840
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_coerce.c,1.13,1.14 cg_coerce.h,1.14,1.15
- Index(es):