2004-12-06 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Sun, 5 Dec 2004 22:29:04 +0000 (22:29 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Sun, 5 Dec 2004 22:29:04 +0000 (22:29 -0000)
* RdpPattern.cs : fixed setupTable(). Avoid boxing.

svn path=/trunk/mcs/; revision=37153

mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng.Derivative/ChangeLog
mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng.Derivative/RdpPatterns.cs

index 0d1977433de425310e3efbb5175cc4b7dc67431c..f2c1539b8ef44fe50a7b4ada41bddbe7b8df11b6 100644 (file)
@@ -1,3 +1,7 @@
+2004-12-06  Atsushi Enomoto <atsushi@ximian.com>
+
+       * RdpPattern.cs : fixed setupTable(). Avoid boxing.
+
 2004-12-05  Atsushi Enomoto <atsushi@ximian.com>
 
        * RdpPattern.cs : RdpAttribute now omits value check when the argument
index 85e3f838c2914f389c7f17dfac48baddb14b3293..1b208e35ca7f63f86dd5f602a0a11d6ed5305fb1 100644 (file)
@@ -59,7 +59,7 @@ namespace Commons.Xml.Relaxng.Derivative
 \r
                public abstract RdpContentType ContentType { get; }\r
 \r
-               private Hashtable setupTable (RelaxngPatternType type, RdpPattern p)\r
+               private Hashtable setupTable (Type type, RdpPattern p)\r
                {\r
                        // Why?\r
                        if (patternPool == null) {\r
@@ -81,7 +81,7 @@ namespace Commons.Xml.Relaxng.Derivative
 \r
                public RdpChoice MakeChoice (RdpPattern p1, RdpPattern p2)\r
                {\r
-                       Hashtable p1Table = setupTable (RelaxngPatternType.Choice, p1);\r
+                       Hashtable p1Table = setupTable (typeof (RdpChoice), p1);\r
                        if (p1Table [p2] == null) {\r
                                RdpChoice c = new RdpChoice (p1, p2);\r
                                c.setInternTable (this.patternPool);\r
@@ -92,7 +92,7 @@ namespace Commons.Xml.Relaxng.Derivative
 \r
                public RdpPattern MakeGroup (RdpPattern p1, RdpPattern p2)\r
                {\r
-                       Hashtable p1Table = setupTable (RelaxngPatternType.Group, p1);\r
+                       Hashtable p1Table = setupTable (typeof (RdpGroup), p1);\r
                        if (p1Table [p2] == null) {\r
                                RdpGroup g = new RdpGroup (p1, p2);\r
                                g.setInternTable (this.patternPool);\r
@@ -103,7 +103,7 @@ namespace Commons.Xml.Relaxng.Derivative
 \r
                public RdpInterleave MakeInterleave (RdpPattern p1, RdpPattern p2)\r
                {\r
-                       Hashtable p1Table = setupTable (RelaxngPatternType.Interleave, p1);\r
+                       Hashtable p1Table = setupTable (typeof (RdpInterleave), p1);\r
                        if (p1Table [p2] == null) {\r
                                RdpInterleave i = new RdpInterleave (p1, p2);\r
                                i.setInternTable (this.patternPool);\r
@@ -114,7 +114,7 @@ namespace Commons.Xml.Relaxng.Derivative
 \r
                public RdpAfter MakeAfter (RdpPattern p1, RdpPattern p2)\r
                {\r
-                       Hashtable p1Table = setupTable (RelaxngPatternType.After, p1);\r
+                       Hashtable p1Table = setupTable (typeof (RdpAfter), p1);\r
                        if (p1Table [p2] == null) {\r
                                RdpAfter a = new RdpAfter (p1, p2);\r
                                a.setInternTable (this.patternPool);\r
@@ -158,7 +158,7 @@ namespace Commons.Xml.Relaxng.Derivative
                        RdpAbstractBinary binary =\r
                                this as RdpAbstractBinary;\r
                        if (binary != null) {\r
-                               Hashtable lTable = setupTable (PatternType, binary.LValue);\r
+                               Hashtable lTable = setupTable (GetType (), binary.LValue);\r
                                if (lTable [binary.RValue] == null) {\r
                                        lTable [binary.RValue] = this;\r
                                        binary.LValue.setInternTable (ht);\r