[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.20,1.21 cg_optabl
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_coerce.c,1.20,1.21 cg_optable.c,1.16,1.17 |
Date: |
Wed, 26 Feb 2003 06:41:38 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/codegen
In directory subversions:/tmp/cvs-serv746/codegen
Modified Files:
cg_coerce.c cg_optable.c
Log Message:
Add explicit conversions from numeric to pointer types.
Index: cg_coerce.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_coerce.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** cg_coerce.c 26 Feb 2003 10:33:08 -0000 1.20
--- cg_coerce.c 26 Feb 2003 11:41:32 -0000 1.21
***************
*** 380,384 ****
if(ILType_IsPointer(toType) && ILIsBuiltinNumeric(fromType))
{
! return 1;
}
}
--- 380,389 ----
if(ILType_IsPointer(toType) && ILIsBuiltinNumeric(fromType))
{
! conv = ILFindConversion(fromType, toType, explicit, 1);
! if(conv)
! {
! rules->builtin = conv;
! return 1;
! }
}
}
Index: cg_optable.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_optable.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** cg_optable.c 16 Nov 2002 19:25:48 -0000 1.16
--- cg_optable.c 26 Feb 2003 11:41:32 -0000 1.17
***************
*** 135,138 ****
--- 135,140 ----
#define IL_EXPLICIT_OPERATOR(type) \
{&ILSystem##type, 1, 0},
+ #define IL_UNSAFE_OPERATOR_REVERSE \
+ {&ILUnmanagedPtr, 1, 1},
#define IL_UNSAFE_OPERATOR(type) \
{&ILSystem##type, 1, 1},
***************
*** 870,873 ****
--- 872,876 ----
explicit operator ulong(int x);
explicit operator char(int x);
+ explicit operator void *(int x);
*/
***************
*** 887,890 ****
--- 890,894 ----
IL_EXPLICIT_OPERATOR(UInt64)
IL_EXPLICIT_OPERATOR(Char)
+ IL_UNSAFE_OPERATOR_REVERSE
IL_END_CONVERT_TABLE
***************
*** 904,907 ****
--- 908,912 ----
explicit operator int(uint x);
explicit operator char(uint x);
+ explicit operator void *(uint x);
*/
***************
*** 921,924 ****
--- 926,930 ----
IL_EXPLICIT_OPERATOR(Int32)
IL_EXPLICIT_OPERATOR(Char)
+ IL_UNSAFE_OPERATOR_REVERSE
IL_END_CONVERT_TABLE
***************
*** 938,941 ****
--- 944,948 ----
explicit operator ulong(long x);
explicit operator char(long x);
+ explicit operator void *(long x);
*/
***************
*** 955,958 ****
--- 962,966 ----
IL_EXPLICIT_OPERATOR(UInt64)
IL_EXPLICIT_OPERATOR(Char)
+ IL_UNSAFE_OPERATOR_REVERSE
IL_END_CONVERT_TABLE
***************
*** 972,975 ****
--- 980,984 ----
explicit operator long(ulong x);
explicit operator char(ulong x);
+ explicit operator void *(ulong x);
*/
***************
*** 989,992 ****
--- 998,1002 ----
IL_EXPLICIT_OPERATOR(Int64)
IL_EXPLICIT_OPERATOR(Char)
+ IL_UNSAFE_OPERATOR_REVERSE
IL_END_CONVERT_TABLE
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/codegen cg_coerce.c,1.20,1.21 cg_optable.c,1.16,1.17,
Rhys Weatherley <address@hidden> <=