Author: ankit
Date: 2005-12-13 10:26:00 -0500 (Tue, 13 Dec 2005)
New Revision: 54297
Added:
trunk/mcs/ilasm/tests/dotted-names.il
Modified:
trunk/mcs/ilasm/codegen/ChangeLog
trunk/mcs/ilasm/codegen/TypeDef.cs
trunk/mcs/ilasm/parser/ChangeLog
trunk/mcs/ilasm/parser/ILParser.jay
trunk/mcs/ilasm/tests/ChangeLog
Log:
In ilasm/tests:
2005-12-13 Ankit Jain <[EMAIL PROTECTED]>
* dotted-names.il: New. Test for dotted names in namespace, class.
In ilasm/codegen:
2005-12-13 Ankit Jain <[EMAIL PROTECTED]>
* TypeDef.cs (TypeDef.ctor): Ensure that 'name' contains only the last
part
of the full (namespace + name) dotted name.
In ilasm/parser:
2005-12-13 Ankit Jain <[EMAIL PROTECTED]>
* ILParser.jay (class_head | D_CLASS ..): Use 'comp_name' instead of
'id' to allow
dotted names.
Modified: trunk/mcs/ilasm/codegen/ChangeLog
===================================================================
--- trunk/mcs/ilasm/codegen/ChangeLog 2005-12-13 15:18:30 UTC (rev 54296)
+++ trunk/mcs/ilasm/codegen/ChangeLog 2005-12-13 15:26:00 UTC (rev 54297)
@@ -1,3 +1,8 @@
+2005-12-13 Ankit Jain <[EMAIL PROTECTED]>
+
+ * TypeDef.cs (TypeDef.ctor): Ensure that 'name' contains only the last
part
+ of the full (namespace + name) dotted name.
+
2005-12-12 Ankit Jain <[EMAIL PROTECTED]>
* TypeDef.cs (TypeDef.Define): Ensure nested visibility for a nested
class.
Modified: trunk/mcs/ilasm/codegen/TypeDef.cs
===================================================================
--- trunk/mcs/ilasm/codegen/TypeDef.cs 2005-12-13 15:18:30 UTC (rev 54296)
+++ trunk/mcs/ilasm/codegen/TypeDef.cs 2005-12-13 15:26:00 UTC (rev 54297)
@@ -55,8 +55,6 @@
IClassRef parent, ArrayList impl_list,
Location location)
{
this.attr = attr;
- this.name_space = name_space;
- this.name = name;
this.parent = parent;
this.impl_list = impl_list;
@@ -73,6 +71,15 @@
is_value_class = false;
is_enum_class = false;
+
+ int lastdot = name.LastIndexOf ('.');
+ if (lastdot >= 0) {
+ this.name_space = name_space + "." +
name.Substring (0, lastdot);
+ this.name = name.Substring (lastdot + 1);
+ } else {
+ this.name_space = name_space;
+ this.name = name;
+ }
}
public string Name {
Modified: trunk/mcs/ilasm/parser/ChangeLog
===================================================================
--- trunk/mcs/ilasm/parser/ChangeLog 2005-12-13 15:18:30 UTC (rev 54296)
+++ trunk/mcs/ilasm/parser/ChangeLog 2005-12-13 15:26:00 UTC (rev 54297)
@@ -1,3 +1,8 @@
+2005-12-13 Ankit Jain <[EMAIL PROTECTED]>
+
+ * ILParser.jay (class_head | D_CLASS ..): Use 'comp_name' instead of
'id' to allow
+ dotted names.
+
2005-12-09 Ankit Jain <[EMAIL PROTECTED]>
* ILParser.jay (class_decl | D_OVERRIDE ..): Update usage of
ITypeRef.GetMethodRef
Modified: trunk/mcs/ilasm/parser/ILParser.jay
===================================================================
--- trunk/mcs/ilasm/parser/ILParser.jay 2005-12-13 15:18:30 UTC (rev 54296)
+++ trunk/mcs/ilasm/parser/ILParser.jay 2005-12-13 15:26:00 UTC (rev 54297)
@@ -554,7 +554,7 @@
}
;
-class_head : D_CLASS class_attr id formal_typars_clause
extends_clause
+class_head : D_CLASS class_attr comp_name formal_typars_clause
extends_clause
impl_clause
{
codegen.BeginTypeDef ((TypeAttr) $2, (string)
$3,
Modified: trunk/mcs/ilasm/tests/ChangeLog
===================================================================
--- trunk/mcs/ilasm/tests/ChangeLog 2005-12-13 15:18:30 UTC (rev 54296)
+++ trunk/mcs/ilasm/tests/ChangeLog 2005-12-13 15:26:00 UTC (rev 54297)
@@ -1,3 +1,7 @@
+2005-12-13 Ankit Jain <[EMAIL PROTECTED]>
+
+ * dotted-names.il: New. Test for dotted names in namespace, class.
+
2005-12-12 Ankit Jain <[EMAIL PROTECTED]>
* nested.il: New. Ensure nested visibility for nested types.
Added: trunk/mcs/ilasm/tests/dotted-names.il
===================================================================
--- trunk/mcs/ilasm/tests/dotted-names.il 2005-12-13 15:18:30 UTC (rev
54296)
+++ trunk/mcs/ilasm/tests/dotted-names.il 2005-12-13 15:26:00 UTC (rev
54297)
@@ -0,0 +1,17 @@
+//Tests dotted names (namespace, class names)
+//It should emit namespace = A.B.C and type name = D
+
+//.assembly extern mscorlib
+//{
+//}
+
+.module Output
+
+.namespace A.B {
+
+.class public auto autochar sealed beforefieldinit C.D
+ extends [mscorlib]System.Object
+{
+}
+
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches