[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_resolve.c,1.13,1.14 cg_resol
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_resolve.c,1.13,1.14 cg_resolve.h,1.4,1.5 |
Date: |
Wed, 26 Feb 2003 01:34:22 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/codegen
In directory subversions:/tmp/cvs-serv3426/codegen
Modified Files:
cg_resolve.c cg_resolve.h
Log Message:
Pass the expression nodes to the operator resolution routines in
codegen so that implicit constant coercions (e.g. int -> uint)
can be performed.
Index: cg_resolve.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_resolve.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** cg_resolve.c 15 Feb 2003 02:14:52 -0000 1.13
--- cg_resolve.c 26 Feb 2003 06:34:20 -0000 1.14
***************
*** 39,43 ****
static ILMethod *ResolveMethod(ILGenInfo *info, ILClass *classInfo,
ILClass *callScope,
const char *name,
! ILType **args, int
numArgs,
ILType *returnType,
ILUInt32 attrs,
int normalOrVirtual,
int dontInherit,
--- 39,43 ----
static ILMethod *ResolveMethod(ILGenInfo *info, ILClass *classInfo,
ILClass *callScope,
const char *name,
! ILType **args,
ILNode **nodes, int numArgs,
ILType *returnType,
ILUInt32 attrs,
int normalOrVirtual,
int dontInherit,
***************
*** 96,103 ****
if(!ILTypeIdentical(argType, args[arg - 1]))
{
! if(!ILCanCoerceKind(info, args[arg -
1], argType,
!
IL_CONVERT_STANDARD,indirect))
{
! break;
}
same = 0;
--- 96,115 ----
if(!ILTypeIdentical(argType, args[arg - 1]))
{
! if(nodes)
{
! if(!ILCanCoerceNodeKind(info,
nodes[arg - 1],
!
args[arg - 1], argType,
!
IL_CONVERT_STANDARD, indirect))
! {
! break;
! }
! }
! else
! {
! if(!ILCanCoerceKind(info,
args[arg - 1], argType,
!
IL_CONVERT_STANDARD, indirect))
! {
! break;
! }
}
same = 0;
***************
*** 136,140 ****
{
method = ResolveMethod(info,
ILImplementsGetInterface(impl),
!
callScope, name, args, numArgs,
returnType, attrs, normalOrVirtual,
dontInherit,indirect);
--- 148,152 ----
{
method = ResolveMethod(info,
ILImplementsGetInterface(impl),
!
callScope, name, args, nodes, numArgs,
returnType, attrs, normalOrVirtual,
dontInherit,indirect);
***************
*** 160,164 ****
ILType **args,
int numArgs)
{
! return ResolveMethod(info, classInfo, callScope, name, args, numArgs, 0,
IL_META_METHODDEF_STATIC, 0, 0, 1);
}
--- 172,176 ----
ILType **args,
int numArgs)
{
! return ResolveMethod(info, classInfo, callScope, name, args, 0,
numArgs, 0,
IL_META_METHODDEF_STATIC, 0, 0, 1);
}
***************
*** 169,173 ****
{
return ResolveMethod(info, classInfo, callScope, name,
! args, numArgs, 0, 0, 1, 0, 1);
}
--- 181,185 ----
{
return ResolveMethod(info, classInfo, callScope, name,
! args, 0, numArgs, 0, 0, 1, 0,
1);
}
***************
*** 176,180 ****
{
return ResolveMethod(info, classInfo, callScope, ".ctor",
! args, numArgs, ILType_Void,
IL_META_METHODDEF_SPECIAL_NAME |
IL_META_METHODDEF_RT_SPECIAL_NAME,
0, 1, 1);
--- 188,192 ----
{
return ResolveMethod(info, classInfo, callScope, ".ctor",
! args, 0, numArgs, ILType_Void,
IL_META_METHODDEF_SPECIAL_NAME |
IL_META_METHODDEF_RT_SPECIAL_NAME,
0, 1, 1);
***************
*** 197,206 ****
ILMethod *ILResolveUnaryOperator(ILGenInfo *info, ILClass *classInfo,
! const char *name,
ILType *argType)
{
ILType *args[1];
args[0] = argType;
return ResolveMethod(info, classInfo, DefaultCallScope(info),
! name, args, 1, 0,
IL_META_METHODDEF_STATIC |
IL_META_METHODDEF_SPECIAL_NAME, 0,
0, 1);
--- 209,221 ----
ILMethod *ILResolveUnaryOperator(ILGenInfo *info, ILClass *classInfo,
! const char *name,
ILType *argType,
! ILNode
*argNode)
{
ILType *args[1];
+ ILNode *nodes[1];
args[0] = argType;
+ nodes[0] = argNode;
return ResolveMethod(info, classInfo, DefaultCallScope(info),
! name, args, nodes, 1, 0,
IL_META_METHODDEF_STATIC |
IL_META_METHODDEF_SPECIAL_NAME, 0,
0, 1);
***************
*** 209,219 ****
ILMethod *ILResolveBinaryOperator(ILGenInfo *info, ILClass *classInfo,
const char
*name, ILType *arg1Type,
! ILType
*arg2Type)
{
ILType *args[2];
args[0] = arg1Type;
args[1] = arg2Type;
return ResolveMethod(info, classInfo, DefaultCallScope(info),
! name, args, 2, 0,
IL_META_METHODDEF_STATIC |
IL_META_METHODDEF_SPECIAL_NAME, 0,
0, 1);
--- 224,238 ----
ILMethod *ILResolveBinaryOperator(ILGenInfo *info, ILClass *classInfo,
const char
*name, ILType *arg1Type,
! ILNode
*arg1Node, ILType *arg2Type,
! ILNode
*arg2Node)
{
ILType *args[2];
+ ILNode *nodes[2];
args[0] = arg1Type;
args[1] = arg2Type;
+ nodes[0] = arg1Node;
+ nodes[1] = arg2Node;
return ResolveMethod(info, classInfo, DefaultCallScope(info),
! name, args, nodes, 2, 0,
IL_META_METHODDEF_STATIC |
IL_META_METHODDEF_SPECIAL_NAME, 0,
0, 1);
***************
*** 227,231 ****
args[0] = fromType;
return ResolveMethod(info, classInfo, DefaultCallScope(info),
! name, args, 1, toType,
IL_META_METHODDEF_STATIC |
IL_META_METHODDEF_SPECIAL_NAME, 0,
0, 0);
--- 246,250 ----
args[0] = fromType;
return ResolveMethod(info, classInfo, DefaultCallScope(info),
! name, args, 0, 1, toType,
IL_META_METHODDEF_STATIC |
IL_META_METHODDEF_SPECIAL_NAME, 0,
0, 0);
Index: cg_resolve.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_resolve.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** cg_resolve.h 13 Jun 2002 11:22:33 -0000 1.4
--- cg_resolve.h 26 Feb 2003 06:34:20 -0000 1.5
***************
*** 50,54 ****
*/
ILMethod *ILResolveUnaryOperator(ILGenInfo *info, ILClass *classInfo,
! const char
*name, ILType *argType);
/*
--- 50,55 ----
*/
ILMethod *ILResolveUnaryOperator(ILGenInfo *info, ILClass *classInfo,
! const char
*name, ILType *argType,
! ILNode
*argNode);
/*
***************
*** 57,61 ****
ILMethod *ILResolveBinaryOperator(ILGenInfo *info, ILClass *classInfo,
const char
*name, ILType *arg1Type,
! ILType
*arg2Type);
/*
--- 58,63 ----
ILMethod *ILResolveBinaryOperator(ILGenInfo *info, ILClass *classInfo,
const char
*name, ILType *arg1Type,
! ILNode
*arg1Node, ILType *arg2Type,
! ILNode
*arg2Node);
/*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/codegen cg_resolve.c,1.13,1.14 cg_resolve.h,1.4,1.5,
Rhys Weatherley <address@hidden> <=