[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: cscctest/csharp/expr cast9.cs,NONE,1.1 cast9
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: cscctest/csharp/expr cast9.cs,NONE,1.1 cast9.il,NONE,1.1 cast9.jl,NONE,1.1 cast1.il,1.3,1.4 cast8.cs,1.1,1.2 |
Date: |
Sun, 22 Jun 2003 09:51:33 -0400 |
Update of /cvsroot/dotgnu-pnet/cscctest/csharp/expr
In directory subversions:/tmp/cvs-serv5183/csharp/expr
Modified Files:
cast1.il cast8.cs
Added Files:
cast9.cs cast9.il cast9.jl
Log Message:
fix cast1.il , add cast9 tests
--- NEW FILE ---
/*
* cast9.cs - Test the handling of indirect or two step casts
*
* Copyright (C) 2001 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
using System;
public class Convertible
{
public static implicit operator Parent(Convertible a)
{
return new Parent();
}
}
public class Parent
{
}
public class Child : Parent
{
}
public class Testing
{
public static void Main()
{
Child y=(Child) (new Convertible());
}
}
--- NEW FILE ---
.assembly extern '.library'
{
.ver 0:0:0:0
}
.assembly '<Assembly>'
{
.ver 0:0:0:0
}
.module '<Module>'
.class public auto ansi 'Convertible' extends ['.library']'System'.'Object'
{
.method public static hidebysig specialname class 'Parent' 'op_Implicit'(class
'Convertible' 'a') cil managed
{
newobj instance void 'Parent'::'.ctor'()
ret
.maxstack 1
} // method op_Implicit
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil
managed
{
ldarg.0
call instance void ['.library']'System'.'Object'::'.ctor'()
ret
.maxstack 1
} // method .ctor
} // class Convertible
.class public auto ansi 'Parent' extends ['.library']'System'.'Object'
{
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil
managed
{
ldarg.0
call instance void ['.library']'System'.'Object'::'.ctor'()
ret
.maxstack 1
} // method .ctor
} // class Parent
.class public auto ansi 'Child' extends 'Parent'
{
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil
managed
{
ldarg.0
call instance void 'Parent'::'.ctor'()
ret
.maxstack 1
} // method .ctor
} // class Child
.class public auto ansi 'Testing' extends ['.library']'System'.'Object'
{
.method public static hidebysig void 'Main'() cil managed
{
.locals init (class 'Child')
newobj instance void 'Convertible'::'.ctor'()
call class 'Parent' 'Convertible'::'op_Implicit'(class 'Convertible')
castclass 'Child'
stloc.0
ret
.maxstack 1
} // method Main
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil
managed
{
ldarg.0
call instance void ['.library']'System'.'Object'::'.ctor'()
ret
.maxstack 1
} // method .ctor
} // class Testing
--- NEW FILE ---
.assembly extern '.library'
{
.ver 0:0:0:0
}
.assembly '<Assembly>'
{
.ver 0:0:0:0
}
.module '<Module>'
.class public auto ansi 'Convertible' extends ['.library']'System'.'Object'
{
.method public static hidebysig specialname class 'Parent' 'op_Implicit'(class
'Convertible' 'a') cil managed java
{
new 'Parent'
dup
invokespecial instance void 'Parent'::'.ctor'()
areturn
.locals 1
.maxstack 2
} // method op_Implicit
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil
managed java
{
aload_0
invokespecial instance void ['.library']'System'.'Object'::'.ctor'()
return
.locals 1
.maxstack 1
} // method .ctor
} // class Convertible
.class public auto ansi 'Parent' extends ['.library']'System'.'Object'
{
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil
managed java
{
aload_0
invokespecial instance void ['.library']'System'.'Object'::'.ctor'()
return
.locals 1
.maxstack 1
} // method .ctor
} // class Parent
.class public auto ansi 'Child' extends 'Parent'
{
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil
managed java
{
aload_0
invokespecial instance void 'Parent'::'.ctor'()
return
.locals 1
.maxstack 1
} // method .ctor
} // class Child
.class public auto ansi 'Testing' extends ['.library']'System'.'Object'
{
.method public static hidebysig void 'Main'() cil managed java
{
new 'Convertible'
dup
invokespecial instance void 'Convertible'::'.ctor'()
invokestatic class 'Parent' 'Convertible'::'op_Implicit'(class
'Convertible')
checkcast 'Child'
astore_0
return
.locals 1
.maxstack 2
} // method Main
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil
managed java
{
aload_0
invokespecial instance void ['.library']'System'.'Object'::'.ctor'()
return
.locals 1
.maxstack 1
} // method .ctor
} // class Testing
Index: cast1.il
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/csharp/expr/cast1.il,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** cast1.il 21 Dec 2002 14:02:40 -0000 1.3
--- cast1.il 22 Jun 2003 13:51:30 -0000 1.4
***************
*** 147,151 ****
stloc.0
ldloc.3
! conv.ovf.i1.un
stloc.1
ldloc.3
--- 147,151 ----
stloc.0
ldloc.3
! conv.ovf.u1.un
stloc.1
ldloc.3
***************
*** 214,218 ****
stloc.0
ldloc.s 5
! conv.ovf.i1.un
stloc.1
ldloc.s 5
--- 214,218 ----
stloc.0
ldloc.s 5
! conv.ovf.u1.un
stloc.1
ldloc.s 5
***************
*** 285,289 ****
stloc.0
ldloc.s 7
! conv.ovf.i1.un
stloc.1
ldloc.s 7
--- 285,289 ----
stloc.0
ldloc.s 7
! conv.ovf.u1.un
stloc.1
ldloc.s 7
***************
*** 322,326 ****
stloc.0
ldloc.s 8
! conv.ovf.i1.un
stloc.1
ldloc.s 8
--- 322,326 ----
stloc.0
ldloc.s 8
! conv.ovf.u1.un
stloc.1
ldloc.s 8
***************
*** 592,596 ****
stloc.0
ldloc.3
! conv.i1
stloc.1
ldloc.3
--- 592,596 ----
stloc.0
ldloc.3
! conv.u1
stloc.1
ldloc.3
***************
*** 658,662 ****
stloc.0
ldloc.s 5
! conv.i1
stloc.1
ldloc.s 5
--- 658,662 ----
stloc.0
ldloc.s 5
! conv.u1
stloc.1
ldloc.s 5
***************
*** 727,731 ****
stloc.0
ldloc.s 7
! conv.i1
stloc.1
ldloc.s 7
--- 727,731 ----
stloc.0
ldloc.s 7
! conv.u1
stloc.1
ldloc.s 7
***************
*** 763,767 ****
stloc.0
ldloc.s 8
! conv.i1
stloc.1
ldloc.s 8
--- 763,767 ----
stloc.0
ldloc.s 8
! conv.u1
stloc.1
ldloc.s 8
Index: cast8.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/csharp/expr/cast8.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** cast8.cs 9 May 2003 15:29:29 -0000 1.1
--- cast8.cs 22 Jun 2003 13:51:30 -0000 1.2
***************
*** 1,4 ****
/*
! * cast3.cs - Test the handling of name collisions for cast expressions
*
* Copyright (C) 2001 Southern Storm Software, Pty Ltd.
--- 1,4 ----
/*
! * cast8.cs - Test the handling of name collisions for cast expressions
*
* Copyright (C) 2001 Southern Storm Software, Pty Ltd.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: cscctest/csharp/expr cast9.cs,NONE,1.1 cast9.il,NONE,1.1 cast9.jl,NONE,1.1 cast1.il,1.3,1.4 cast8.cs,1.1,1.2,
Gopal.V <address@hidden> <=