From df1c0e8b41404ed2d372dd9d5d2db02e08b7a47e Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 24 Mar 2006 19:02:26 +0000 Subject: add sections for system.codedom and system.data svn path=/trunk/mono/; revision=58475 --- data/net_2_0/machine.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/net_2_0/machine.config b/data/net_2_0/machine.config index 119a250e621..7fed86def07 100644 --- a/data/net_2_0/machine.config +++ b/data/net_2_0/machine.config @@ -9,6 +9,8 @@
+
+
-- cgit v1.2.3 From dc6150ea6c6e357aa11fd16fb0fa6f08be6d403d Mon Sep 17 00:00:00 2001 From: Paolo Molaro Date: Fri, 24 Mar 2006 19:06:46 +0000 Subject: Fixed compilation after Zoltan's breakage. svn path=/trunk/mono/; revision=58476 --- mono/mini/mini-arm.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/mono/mini/mini-arm.c b/mono/mini/mini-arm.c index 3ba69e59f9b..abd311aaa63 100644 --- a/mono/mini/mini-arm.c +++ b/mono/mini/mini-arm.c @@ -1868,9 +1868,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) g_assert (imm8 >= 0); ARM_CMP_REG_IMM (code, ins->sreg1, imm8, rot_amount); break; - case OP_X86_TEST_NULL: - g_assert_not_reached (); - break; case CEE_BREAK: *(int*)code = 0xe7f001f0; *(int*)code = 0xef9f0001; @@ -2402,14 +2399,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case CEE_CONV_R8: ARM_FLTD (code, ins->dreg, ins->sreg1); break; - case OP_X86_FP_LOAD_I8: - g_assert_not_reached (); - /*x86_fild_membase (code, ins->inst_basereg, ins->inst_offset, TRUE);*/ - break; - case OP_X86_FP_LOAD_I4: - g_assert_not_reached (); - /*x86_fild_membase (code, ins->inst_basereg, ins->inst_offset, FALSE);*/ - break; case OP_FCONV_TO_I1: code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 1, TRUE); break; -- cgit v1.2.3 From cde2e75a1a142889c5f23d485d0e54bf7b7a42b5 Mon Sep 17 00:00:00 2001 From: Paolo Molaro Date: Fri, 24 Mar 2006 19:07:58 +0000 Subject: Fri Mar 24 20:07:19 CET 2006 Paolo Molaro * debug-debugger.c: make it compile without the Boehm GC. svn path=/trunk/mono/; revision=58477 --- mono/mini/ChangeLog | 4 ++++ mono/mini/debug-debugger.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index 1a7b4d0f4e9..4b678153d78 100644 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,4 +1,8 @@ +Fri Mar 24 20:07:19 CET 2006 Paolo Molaro + + * debug-debugger.c: make it compile without the Boehm GC. + Wed Mar 22 18:25:18 CET 2006 Paolo Molaro * mini.c: fixed issue with mismatch when an icall is registered diff --git a/mono/mini/debug-debugger.c b/mono/mini/debug-debugger.c index c9517e1a0b9..24ca5b004a7 100644 --- a/mono/mini/debug-debugger.c +++ b/mono/mini/debug-debugger.c @@ -301,7 +301,9 @@ debugger_gc_push_all_stacks (void) MonoDebuggerThread *thread = g_ptr_array_index (thread_array, i); gpointer end_stack = (thread->tid == tid) ? &i : thread->end_stack; +#ifdef USE_INCLUDED_LIBGC GC_push_all_stack (end_stack, thread->start_stack); +#endif } } @@ -341,7 +343,9 @@ mono_debugger_init (void) thread_array = g_ptr_array_new (); mono_install_thread_callbacks (&thread_callbacks); +#ifdef USE_INCLUDED_LIBGC gc_thread_vtable = &debugger_thread_vtable; +#endif mono_debugger_notification_function (MONO_DEBUGGER_EVENT_INITIALIZE_THREAD_MANAGER, GetCurrentThreadId (), 0); } -- cgit v1.2.3 From 2ced08a1f887627c5f53c4160117ed299bd54563 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Fri, 24 Mar 2006 19:16:42 +0000 Subject: 2006-03-24 Martin Baulig * class.c (mono_class_setup_fields): Added support for generic instances; fixes #77580. svn path=/trunk/mono/; revision=58478 --- mono/metadata/ChangeLog | 5 +++++ mono/metadata/class.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog index 4a90eebf332..f831ed0d8e4 100644 --- a/mono/metadata/ChangeLog +++ b/mono/metadata/ChangeLog @@ -1,3 +1,8 @@ +2006-03-24 Martin Baulig + + * class.c (mono_class_setup_fields): Added support for generic + instances; fixes #77580. + 2006-03-24 Gonzalo Paniagua Javier * assembly.c: publickeytoken is case insensitive. Fixes bug #77898. diff --git a/mono/metadata/class.c b/mono/metadata/class.c index 8801b31d29f..1545ca95ac8 100644 --- a/mono/metadata/class.c +++ b/mono/metadata/class.c @@ -770,7 +770,7 @@ static void mono_class_setup_fields (MonoClass *class) { MonoImage *m = class->image; - const int top = class->field.count; + int top = class->field.count; guint32 layout = class->flags & TYPE_ATTRIBUTE_LAYOUT_MASK; MonoTableInfo *t = &m->tables [MONO_TABLE_FIELD]; int i, blittable = TRUE; @@ -784,8 +784,11 @@ mono_class_setup_fields (MonoClass *class) if (class->size_inited) return; - if (class->inited) - mono_class_init (class); + if (class->generic_class) { + MonoClass *gklass = class->generic_class->container_class; + mono_class_setup_fields (gklass); + top = gklass->field.count; + } class->instance_size = 0; class->class_size = 0; -- cgit v1.2.3 From f6b2726e966d26ef1f6ce0ad364aa3dd83aa11c3 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Fri, 24 Mar 2006 19:17:03 +0000 Subject: New test. svn path=/trunk/mcs/; revision=58479 --- mcs/tests/gtest-264.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 mcs/tests/gtest-264.cs diff --git a/mcs/tests/gtest-264.cs b/mcs/tests/gtest-264.cs new file mode 100755 index 00000000000..9f16bf9b600 --- /dev/null +++ b/mcs/tests/gtest-264.cs @@ -0,0 +1,22 @@ +public class BaseList +{ + // without this field instantiation everything works fine. + object obj = new object (); +} + +public class XXX : BaseList +{ +} + +public class Crash +{ + public static void Main() + { + // After creating an array, instantiation got broken. + XXX [] arr = new XXX [0]; + // this array creation is OK + // BaseList [] arr = new BaseList [0]; + + new BaseList (); // even this causes SISSEGV + } +} -- cgit v1.2.3 From 92d092d80a096f6c65d2801582d8a47269d0ddf4 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 24 Mar 2006 19:21:48 +0000 Subject: add a couple more tests svn path=/trunk/mcs/; revision=58480 --- .../System.Configuration/Test/standalone/Makefile | 4 +-- .../System.Configuration/Test/standalone/t30.cs | 27 +++++++++++++++++++ .../Test/standalone/t30.exe.config | 10 ++++++++ .../Test/standalone/t30.exe.expected | 1 + .../System.Configuration/Test/standalone/t31.cs | 30 ++++++++++++++++++++++ .../Test/standalone/t31.exe.config | 10 ++++++++ .../Test/standalone/t31.exe.expected | 1 + 7 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 mcs/class/System.Configuration/Test/standalone/t30.cs create mode 100644 mcs/class/System.Configuration/Test/standalone/t30.exe.config create mode 100644 mcs/class/System.Configuration/Test/standalone/t30.exe.expected create mode 100644 mcs/class/System.Configuration/Test/standalone/t31.cs create mode 100644 mcs/class/System.Configuration/Test/standalone/t31.exe.config create mode 100644 mcs/class/System.Configuration/Test/standalone/t31.exe.expected diff --git a/mcs/class/System.Configuration/Test/standalone/Makefile b/mcs/class/System.Configuration/Test/standalone/Makefile index d344a269937..4a4ad17000a 100644 --- a/mcs/class/System.Configuration/Test/standalone/Makefile +++ b/mcs/class/System.Configuration/Test/standalone/Makefile @@ -1,4 +1,4 @@ -TESTS = t1.exe t2.exe t3.exe t4.exe t5.exe t6.exe t7.exe t8.exe t9.exe t10.exe t11.exe t12.exe t13.exe t14.exe t15.exe t16.exe t17.exe t18.exe t19.exe t20.exe t21.exe t22.exe t23.exe t24.exe t25.exe t26.exe t27.exe t28.exe t29.exe +TESTS = t1.exe t2.exe t3.exe t4.exe t5.exe t6.exe t7.exe t8.exe t9.exe t10.exe t11.exe t12.exe t13.exe t14.exe t15.exe t16.exe t17.exe t18.exe t19.exe t20.exe t21.exe t22.exe t23.exe t24.exe t25.exe t26.exe t27.exe t28.exe t29.exe t30.exe t31.exe check: local compare @@ -18,4 +18,4 @@ clean: rm -f *.exe *.mdb *.result %.exe: %.cs - gmcs /debug $< -r:System.Configuration.dll + gmcs /debug $< -r:System.Configuration.dll -r:System.Web.dll diff --git a/mcs/class/System.Configuration/Test/standalone/t30.cs b/mcs/class/System.Configuration/Test/standalone/t30.cs new file mode 100644 index 00000000000..b2c3c82760b --- /dev/null +++ b/mcs/class/System.Configuration/Test/standalone/t30.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Text; +using System.Configuration; +using System.Web; +using System.Web.Configuration; + +class T30 +{ + static void Main(string[] args) + { + try + { + CompilationSection section = (CompilationSection)ConfigurationManager.GetSection ("system.web/compilation"); + + section = (CompilationSection)ConfigurationManager.GetSection ("system.web/compilation"); + + Console.WriteLine ("there are {0} assemblies listed in the section", section.Assemblies.Count); + } + catch (Exception e) + { + // Error. + Console.WriteLine(e.ToString()); + } + } +} diff --git a/mcs/class/System.Configuration/Test/standalone/t30.exe.config b/mcs/class/System.Configuration/Test/standalone/t30.exe.config new file mode 100644 index 00000000000..d473daaea54 --- /dev/null +++ b/mcs/class/System.Configuration/Test/standalone/t30.exe.config @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/mcs/class/System.Configuration/Test/standalone/t30.exe.expected b/mcs/class/System.Configuration/Test/standalone/t30.exe.expected new file mode 100644 index 00000000000..7b6647494ae --- /dev/null +++ b/mcs/class/System.Configuration/Test/standalone/t30.exe.expected @@ -0,0 +1 @@ +there are 2 assemblies listed in the section diff --git a/mcs/class/System.Configuration/Test/standalone/t31.cs b/mcs/class/System.Configuration/Test/standalone/t31.cs new file mode 100644 index 00000000000..4c8dfaf3dd0 --- /dev/null +++ b/mcs/class/System.Configuration/Test/standalone/t31.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Text; +using System.Configuration; +using System.Web; +using System.Web.Configuration; +using _Configuration = System.Configuration.Configuration; + +class T31 +{ + static void Main(string[] args) + { + try + { + _Configuration cfg = ConfigurationManager.OpenExeConfiguration (ConfigurationUserLevel.None); + + CompilationSection section = (CompilationSection)cfg.GetSection ("system.web/compilation"); + + section = (CompilationSection)cfg.GetSection ("system.web/compilation"); + + Console.WriteLine ("there are {0} assemblies listed in the section", section.Assemblies.Count); + } + catch (Exception e) + { + // Error. + Console.WriteLine(e.ToString()); + } + } +} diff --git a/mcs/class/System.Configuration/Test/standalone/t31.exe.config b/mcs/class/System.Configuration/Test/standalone/t31.exe.config new file mode 100644 index 00000000000..d473daaea54 --- /dev/null +++ b/mcs/class/System.Configuration/Test/standalone/t31.exe.config @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/mcs/class/System.Configuration/Test/standalone/t31.exe.expected b/mcs/class/System.Configuration/Test/standalone/t31.exe.expected new file mode 100644 index 00000000000..7b6647494ae --- /dev/null +++ b/mcs/class/System.Configuration/Test/standalone/t31.exe.expected @@ -0,0 +1 @@ +there are 2 assemblies listed in the section -- cgit v1.2.3 From 151d55b2dd1ce21df6781cee901f971bf17e66f1 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Fri, 24 Mar 2006 20:23:50 +0000 Subject: 2006-03-24 Mike Kestner * ListView.cs: Handle (Large|Small)ImageList == null more robustly. * ListView.Item.cs: fix layout issues with null image lists and images smaller than checkbox size. * ThemeWin32Classic.cs: Draw a 12 pixel line in ListView LargeIcon mode like MS does. It's weird, but consistent. ;-) Fixes #77890. svn path=/trunk/mcs/; revision=58486 --- .../System.Windows.Forms/ChangeLog | 9 +++++++ .../System.Windows.Forms/ListView.cs | 12 ++++++---- .../System.Windows.Forms/ListViewItem.cs | 28 ++++++++++++---------- .../System.Windows.Forms/ThemeWin32Classic.cs | 24 ++++++++----------- 4 files changed, 43 insertions(+), 30 deletions(-) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index 77da6ca1297..b774f075e15 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,12 @@ +2006-03-24 Mike Kestner + + * ListView.cs: Handle (Large|Small)ImageList == null more robustly. + * ListView.Item.cs: fix layout issues with null image lists and images + smaller than checkbox size. + * ThemeWin32Classic.cs: Draw a 12 pixel line in ListView LargeIcon + mode like MS does. It's weird, but consistent. ;-) + Fixes #77890. + 2006-03-24 Mike Kestner * ListView.cs: Scroll wheel support for the item control. Fixes diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs index 91437996b64..e8b5627c537 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs @@ -849,16 +849,20 @@ namespace System.Windows.Forms Size LargeIconItemSize { get { - int w = Math.Max (text_size.Width, 2 + CheckBoxSize.Width + LargeImageList.ImageSize.Width); - int h = text_size.Height + 2 + Math.Max (CheckBoxSize.Height, LargeImageList.ImageSize.Height); + int image_w = LargeImageList == null ? 12 : LargeImageList.ImageSize.Width; + int image_h = LargeImageList == null ? 2 : LargeImageList.ImageSize.Height; + int w = CheckBoxSize.Width + 2 + Math.Max (text_size.Width, image_w); + int h = text_size.Height + 2 + Math.Max (CheckBoxSize.Height, image_h); return new Size (w, h); } } Size SmallIconItemSize { get { - int w = text_size.Width + 2 + CheckBoxSize.Width + SmallImageList.ImageSize.Width; - int h = Math.Max (text_size.Height, Math.Max (CheckBoxSize.Height, SmallImageList.ImageSize.Height)); + int image_w = SmallImageList == null ? 0 : SmallImageList.ImageSize.Width; + int image_h = SmallImageList == null ? 0 : SmallImageList.ImageSize.Height; + int w = text_size.Width + 2 + CheckBoxSize.Width + image_w; + int h = Math.Max (text_size.Height, Math.Max (CheckBoxSize.Height, image_h)); return new Size (w, h); } } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs index eb9a3a1c26c..3672af7c8a1 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs @@ -21,9 +21,7 @@ // // Author: // Ravindra (rkumar@novell.com) -// -// Todo: -// - Drawing of focus rectangle +// Mike Kestner @@ -530,7 +528,7 @@ namespace System.Windows.Forms } label_rect.Height = icon_rect.Height = item_ht; - checkbox_rect.Y = icon_rect.Height - checkbox_rect.Height - 1; + checkbox_rect.Y = item_rect.Height - checkbox_rect.Height; label_rect.X = icon_rect.Right + 1; @@ -554,23 +552,29 @@ namespace System.Windows.Forms case View.LargeIcon: label_rect = icon_rect = Rectangle.Empty; - if (owner.LargeImageList != null) { + if (owner.LargeImageList == null) { + icon_rect.Size = new Size (12, 2); + } else { icon_rect.Width = owner.LargeImageList.ImageSize.Width; icon_rect.Height = owner.LargeImageList.ImageSize.Height; } - checkbox_rect.Y = icon_rect.Height - checkbox_rect.Height - 1; + if (checkbox_rect.Height > icon_rect.Height) + icon_rect.Y = checkbox_rect.Height - icon_rect.Height; + else + checkbox_rect.Y = icon_rect.Height - checkbox_rect.Height; + - if (text_size.Width <= (checkbox_rect.Width + icon_rect.Width)) { + if (text_size.Width <= icon_rect.Width) { icon_rect.X = checkbox_rect.Width + 1; label_rect.X = icon_rect.X + (icon_rect.Width - text_size.Width) / 2; - label_rect.Y = Math.Max (checkbox_rect.Bottom, icon_rect.Bottom) + 2; + label_rect.Y = icon_rect.Bottom + 2; label_rect.Size = text_size; } else { int centerX = text_size.Width / 2; - icon_rect.X = centerX - icon_rect.Width / 2; - checkbox_rect.X = (icon_rect.X - checkbox_rect.Width); - label_rect.Y = Math.Max (checkbox_rect.Bottom, icon_rect.Bottom) + 2; + icon_rect.X = checkbox_rect.Width + 1 + centerX - icon_rect.Width / 2; + label_rect.X = checkbox_rect.Width + 1; + label_rect.Y = icon_rect.Bottom + 2; label_rect.Size = text_size; } @@ -591,7 +595,7 @@ namespace System.Windows.Forms icon_rect.Height = owner.SmallImageList.ImageSize.Height; } - checkbox_rect.Y = icon_rect.Height - checkbox_rect.Height + 1; + checkbox_rect.Y = item_ht - checkbox_rect.Height; label_rect.X = icon_rect.Right + 1; label_rect.Width = text_size.Width; label_rect.Height = icon_rect.Height = item_ht; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs index 5ea211b1c5b..3a88dbc72eb 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs @@ -1523,8 +1523,8 @@ namespace System.Windows.Forms Rectangle rect_checkrect = item.CheckRectReal; rect_checkrect.X += col_offset; - Rectangle rect_iconrect = item.GetBounds (ItemBoundsPortion.Icon); - rect_iconrect.X += col_offset; + Rectangle icon_rect = item.GetBounds (ItemBoundsPortion.Icon); + icon_rect.X += col_offset; Rectangle full_rect = item.GetBounds (ItemBoundsPortion.Entire); full_rect.X += col_offset; Rectangle text_rect = item.GetBounds (ItemBoundsPortion.Label); @@ -1576,20 +1576,16 @@ namespace System.Windows.Forms } } - // Item is drawn as a special case, as it is not just text if (control.View == View.LargeIcon) { - if (item.ImageIndex > -1 && - control.LargeImageList != null && - item.ImageIndex < control.LargeImageList.Images.Count) - control.LargeImageList.Draw (dc, rect_iconrect.Location, - item.ImageIndex); - } - else { - if (item.ImageIndex > -1 && - control.SmallImageList != null && + if (control.LargeImageList == null) { + Pen pen = new Pen (ColorWindowText, 2); + dc.DrawLine (pen, icon_rect.Left, icon_rect.Y, icon_rect.Left + 11, icon_rect.Y); + } else if (item.ImageIndex > -1 && item.ImageIndex < control.LargeImageList.Images.Count) + control.LargeImageList.Draw (dc, icon_rect.Location, item.ImageIndex); + } else { + if (item.ImageIndex > -1 && control.SmallImageList != null && item.ImageIndex < control.SmallImageList.Images.Count) - control.SmallImageList.Draw (dc, rect_iconrect.Location, - item.ImageIndex); + control.SmallImageList.Draw (dc, icon_rect.Location, item.ImageIndex); } // draw the item text -- cgit v1.2.3 From 1b91d218c449bfdc26582ba41a8889482f8c8e75 Mon Sep 17 00:00:00 2001 From: Paolo Molaro Date: Fri, 24 Mar 2006 20:34:04 +0000 Subject: magic file(1) patch. svn path=/trunk/mono/; revision=58489 --- docs/magic.diff | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/magic.diff diff --git a/docs/magic.diff b/docs/magic.diff new file mode 100644 index 00000000000..c8dee8e1627 --- /dev/null +++ b/docs/magic.diff @@ -0,0 +1,15 @@ +This is a patch that can be applied to the magic file used by file(1) to +recognize mono assemblies. +Apply it to the magic file (usually in /usr/share/file/magic or +/usr/share/misc/magic) and recompile it with file -C. + +--- magic.old 2006-03-24 21:12:25.000000000 +0100 ++++ magic 2006-03-24 21:12:17.000000000 +0100 +@@ -7205,6 +7205,7 @@ + >>>>(0x3c.l+4) leshort 0x290 PA-RISC + >>>>(0x3c.l+22) leshort&0x0100 >0 32-bit + >>>>(0x3c.l+22) leshort&0x1000 >0 system file ++>>>>(0x3c.l+232) lelong >0 Mono/.Net assembly + + >>>>(0x3c.l+0xf8) string UPX0 \b, UPX compressed + >>>>(0x3c.l+0xf8) search/0x140 PEC2 \b, PECompact2 compressed -- cgit v1.2.3 From 463b9cef4ac30b0da21d18d6fdcc4131a035eea8 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 24 Mar 2006 21:05:41 +0000 Subject: 2006-03-24 Chris Toshok * WebConfigurationHost.cs: fix bug where OpenWebConfiguration ("/") would result in 2 configurations for that toplevel path to be opened. svn path=/trunk/mcs/; revision=58491 --- .../System.Web/System.Web.Configuration_2.0/ChangeLog | 6 ++++++ .../System.Web.Configuration_2.0/WebConfigurationHost.cs | 15 +++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog index f8dd1c91829..d6efa93add7 100644 --- a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog +++ b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog @@ -1,3 +1,9 @@ +2006-03-24 Chris Toshok + + * WebConfigurationHost.cs: fix bug where OpenWebConfiguration + ("/") would result in 2 configurations for that toplevel path to + be opened. + 2006-03-08 Chris Toshok * ProvidersHelper.cs: implement this static class properly. diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs index 56c13e7c8b9..d7018d48e59 100644 --- a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs +++ b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs @@ -165,16 +165,15 @@ namespace System.Web.Configuration else { int i; - if (locationSubPath == null) { + if (locationSubPath == null) configPath = fullPath; - i = fullPath.LastIndexOf ("/"); - } else { + else configPath = locationSubPath; - if (locationSubPath != "/") - i = locationSubPath.LastIndexOf ('/'); - else - i = -1; - } + + if (configPath == "/") + i = -1; + else + i = configPath.LastIndexOf ("/"); if (i != -1) { locationConfigPath = configPath.Substring (i+1); -- cgit v1.2.3 From 8237bb2866b2d2342e2b7024811508a2625211a0 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 24 Mar 2006 21:20:01 +0000 Subject: 2006-03-24 Chris Toshok * BaseCompiler.cs (GetCompiledType): fall back to CodeDomProvider if system.web/compilation doesn't list a compiler for our language. svn path=/trunk/mcs/; revision=58493 --- mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs | 11 +++++++++-- mcs/class/System.Web/System.Web.Compilation/ChangeLog | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs index 3b4abcf9290..fcdb4938b90 100644 --- a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs +++ b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs @@ -337,8 +337,15 @@ namespace System.Web.Compilation #if NET_2_0 CompilationSection config = (CompilationSection) WebConfigurationManager.GetSection ("system.web/compilation"); Compiler comp = config.Compilers[lang]; - Type t = Type.GetType (comp.Type, true); - provider = Activator.CreateInstance (t) as CodeDomProvider; + if (comp == null) { + CompilerInfo info = CodeDomProvider.GetCompilerInfo (lang); + if (info != null) + provider = info.CreateProvider (); + } + else { + Type t = Type.GetType (comp.Type, true); + provider = Activator.CreateInstance (t) as CodeDomProvider; + } string compilerOptions = comp.CompilerOptions; int warningLevel = comp.WarningLevel; diff --git a/mcs/class/System.Web/System.Web.Compilation/ChangeLog b/mcs/class/System.Web/System.Web.Compilation/ChangeLog index 27fd84ac2fc..a32a1fc45fe 100644 --- a/mcs/class/System.Web/System.Web.Compilation/ChangeLog +++ b/mcs/class/System.Web/System.Web.Compilation/ChangeLog @@ -1,3 +1,9 @@ +2006-03-24 Chris Toshok + + * BaseCompiler.cs (GetCompiledType): fall back to CodeDomProvider + if system.web/compilation doesn't list a compiler for our + language. + 2006-03-13 Chris Toshok * TemplateControlCompiler.cs (InitMethod): when generating the -- cgit v1.2.3 From 3ef0b608391d9966c450e9881e42160ad9790cfa Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 24 Mar 2006 21:22:20 +0000 Subject: * XplatUIX11.cs: Give a max idle time of one second, this * matches MS and forces an Idle event every second when there are no other events in the queue. svn path=/trunk/mcs/; revision=58495 --- mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog | 6 ++++++ mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index b774f075e15..7d71cdb6890 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,9 @@ +2006-03-24 Jackson Harper + + * XplatUIX11.cs: Give a max idle time of one second, this matches + MS and forces an Idle event every second when there are no other + events in the queue. + 2006-03-24 Mike Kestner * ListView.cs: Handle (Large|Small)ImageList == null more robustly. diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs index 36b18d35655..804500c688b 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs @@ -1039,6 +1039,8 @@ namespace System.Windows.Forms { timeout = Timer.Minimum; } + if (timeout > 1000) + timeout = 1000; return timeout; } -- cgit v1.2.3 From 360328e0192c06fe7c60c5cc3623a6faf0cecb1a Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 24 Mar 2006 21:26:26 +0000 Subject: fix another NRE svn path=/trunk/mcs/; revision=58496 --- .../System.Web/System.Web.Compilation/BaseCompiler.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs index fcdb4938b90..44f80a5f5ab 100644 --- a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs +++ b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs @@ -326,6 +326,7 @@ namespace System.Web.Compilation return AppDomain.CurrentDomain.SetupInformation.DynamicBase; } + [MonoTODO ("find out how to extract the warningLevel and compilerOptions in the case")] public virtual Type GetCompiledType () { Type type = CachingCompiler.GetTypeFromCache (parser.InputFile); @@ -337,18 +338,28 @@ namespace System.Web.Compilation #if NET_2_0 CompilationSection config = (CompilationSection) WebConfigurationManager.GetSection ("system.web/compilation"); Compiler comp = config.Compilers[lang]; + + string compilerOptions = ""; + int warningLevel = 0; + if (comp == null) { CompilerInfo info = CodeDomProvider.GetCompilerInfo (lang); - if (info != null) + if (info != null && info.IsCodeDomProviderTypeValid) provider = info.CreateProvider (); + + // XXX there's no way to get + // warningLevel or compilerOptions out + // of the provider.. they're in the + // configuration section, though. } else { Type t = Type.GetType (comp.Type, true); provider = Activator.CreateInstance (t) as CodeDomProvider; + + compilerOptions = comp.CompilerOptions; + warningLevel = comp.WarningLevel; } - string compilerOptions = comp.CompilerOptions; - int warningLevel = comp.WarningLevel; #else CompilationConfiguration config; -- cgit v1.2.3 From 915d986f096f0ba9d471035564e64698b738bcf7 Mon Sep 17 00:00:00 2001 From: Gonzalo Paniagua Javier Date: Fri, 24 Mar 2006 23:11:09 +0000 Subject: 2006-03-24 Gonzalo Paniagua Javier * System.Web.UI/ControlBuilder.cs: when creating a default property builder, handle strings specially. * System.Web.UI/StringPropertyBuilder.cs: new builder used in TextBox 2.0. * System.Web.dll.sources: add StringPropertyBuilder. * System.Web.Compilation/TemplateControlCompiler.cs: handle the new StringPropertyBuilder. Fixes bug #77762. svn path=/trunk/mcs/; revision=58505 --- mcs/class/System.Web/ChangeLog | 4 ++ .../System.Web/System.Web.Compilation/ChangeLog | 5 ++ .../TemplateControlCompiler.cs | 13 ++++++ mcs/class/System.Web/System.Web.UI/ChangeLog | 7 +++ .../System.Web/System.Web.UI/ControlBuilder.cs | 2 + .../System.Web.UI/StringPropertyBuilder.cs | 53 ++++++++++++++++++++++ mcs/class/System.Web/System.Web.dll.sources | 1 + 7 files changed, 85 insertions(+) create mode 100644 mcs/class/System.Web/System.Web.UI/StringPropertyBuilder.cs diff --git a/mcs/class/System.Web/ChangeLog b/mcs/class/System.Web/ChangeLog index 0eae5805500..478b735aa0c 100644 --- a/mcs/class/System.Web/ChangeLog +++ b/mcs/class/System.Web/ChangeLog @@ -1,3 +1,7 @@ +2006-03-24 Gonzalo Paniagua Javier + + * System.Web.dll.sources: add StringPropertyBuilder. + 2006-03-23 Vladimir Krasnov * System.Web.vmwcsproj: grasshopper project file fix, diff --git a/mcs/class/System.Web/System.Web.Compilation/ChangeLog b/mcs/class/System.Web/System.Web.Compilation/ChangeLog index a32a1fc45fe..41f1094ba43 100644 --- a/mcs/class/System.Web/System.Web.Compilation/ChangeLog +++ b/mcs/class/System.Web/System.Web.Compilation/ChangeLog @@ -1,3 +1,8 @@ +2006-03-24 Gonzalo Paniagua Javier + + * System.Web.Compilation/TemplateControlCompiler.cs: handle the new + StringPropertyBuilder. + 2006-03-24 Chris Toshok * BaseCompiler.cs (GetCompiledType): fall back to CodeDomProvider diff --git a/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs index 7f154519837..12d8178c587 100644 --- a/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs +++ b/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs @@ -981,6 +981,19 @@ namespace System.Web.Compilation continue; } + if (b is StringPropertyBuilder) { + StringPropertyBuilder pb = (StringPropertyBuilder) b; + string str = (pb.Children.Count > 0) ? (string) pb.Children [0] : null; + if (str != null) { + CodeMemberMethod method = builder.method; + CodeAssignStatement assign = new CodeAssignStatement (); + assign.Left = new CodePropertyReferenceExpression (ctrlVar, pb.PropertyName); + assign.Right = new CodePrimitiveExpression (str); + method.Statements.Add (assign); + } + continue; + } + #if NET_2_0 if (b is ContentBuilderInternal) { ContentBuilderInternal cb = (ContentBuilderInternal) b; diff --git a/mcs/class/System.Web/System.Web.UI/ChangeLog b/mcs/class/System.Web/System.Web.UI/ChangeLog index e1a73b8c23a..edda7999856 100644 --- a/mcs/class/System.Web/System.Web.UI/ChangeLog +++ b/mcs/class/System.Web/System.Web.UI/ChangeLog @@ -1,3 +1,10 @@ +2006-03-24 Gonzalo Paniagua Javier + + * ControlBuilder.cs: when creating a default property builder, handle + strings specially. + + * StringPropertyBuilder.cs: new builder used in TextBox 2.0. + 2006-03-15 Vladimir Krasnov * ControlCollection.cs: fixed CopyTo method, fixes bug when if target diff --git a/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs b/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs index 8bc063a0f77..e7eaa18f869 100644 --- a/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs +++ b/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs @@ -351,6 +351,8 @@ namespace System.Web.UI { builder = new CollectionBuilder (); } else if (typeof (ITemplate).IsAssignableFrom (propType)) { builder = new TemplateBuilder (prop); + } else if (typeof (string) == propType) { + builder = new StringPropertyBuilder (prop.Name); } else { builder = CreateBuilderFromType (parser, parentBuilder, propType, prop.Name, null, atts, line, fileName); diff --git a/mcs/class/System.Web/System.Web.UI/StringPropertyBuilder.cs b/mcs/class/System.Web/System.Web.UI/StringPropertyBuilder.cs new file mode 100644 index 00000000000..0224c3ef21b --- /dev/null +++ b/mcs/class/System.Web/System.Web.UI/StringPropertyBuilder.cs @@ -0,0 +1,53 @@ +// +// System.Web.UI.StringPropertyBuilder.cs +// +// Authors: +// Gonzalo Paniagua Javier (gonzalo@ximian.com) +// +// Copyright (c) 2006 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System.Web; +namespace System.Web.UI { + class StringPropertyBuilder : ControlBuilder { + string prop_name; + + public StringPropertyBuilder (string prop_name) + { + this.prop_name = prop_name; + } + + public string PropertyName { + get { return prop_name; } + } + + public override bool AllowWhitespaceLiterals () + { + return false; + } + + public override void AppendSubBuilder (ControlBuilder subBuilder) + { + throw new HttpException ("StringPropertyBuilder should never be called"); + } + } +} + diff --git a/mcs/class/System.Web/System.Web.dll.sources b/mcs/class/System.Web/System.Web.dll.sources index 1470dd83a26..40a2234d080 100644 --- a/mcs/class/System.Web/System.Web.dll.sources +++ b/mcs/class/System.Web/System.Web.dll.sources @@ -605,6 +605,7 @@ System.Web.UI/StateBag.cs System.Web.UI/StateItem.cs System.Web.UI/StateManagedCollection.cs System.Web.UI/StaticPartialCachingControl.cs +System.Web.UI/StringPropertyBuilder.cs System.Web.UI/SupportsEventValidationAttribute.cs System.Web.UI/TagPrefixAttribute.cs System.Web.UI/TemplateBuilder.cs -- cgit v1.2.3 From 12ee2462efc1f36e8f330433dccaf21f52ead6e6 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Fri, 24 Mar 2006 23:51:07 +0000 Subject: 2006-03-25 Zoltan Varga * configure.in: Applied patch from David S. Miller : Fix support for sparc/linux. svn path=/trunk/mono/; revision=58506 --- libgc/ChangeLog | 3 +++ libgc/configure.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libgc/ChangeLog b/libgc/ChangeLog index 499d2bb345e..ed2e897aa74 100644 --- a/libgc/ChangeLog +++ b/libgc/ChangeLog @@ -1,3 +1,6 @@ +2006-03-25 Zoltan Varga + + * configure.in: Applied patch from David S. Miller : Fix support for sparc/linux. Mon Mar 20 18:56:21 CET 2006 Paolo Molaro diff --git a/libgc/configure.in b/libgc/configure.in index 89467478da4..d7632da085a 100644 --- a/libgc/configure.in +++ b/libgc/configure.in @@ -77,7 +77,7 @@ case "$THREADS" in THREADS=posix THREADDLLIBS=-lpthread case "$host" in - x86-*-linux* | ia64-*-linux* | i386-*-linux* | i486-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux* | s390*-*-linux* | powerpc-*-linux*) + x86-*-linux* | ia64-*-linux* | i386-*-linux* | i486-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux* | s390*-*-linux* | sparc*-*-linux* | powerpc-*-linux*) AC_DEFINE(GC_LINUX_THREADS) AC_DEFINE(_REENTRANT) if test "${enable_parallel_mark}" = yes; then -- cgit v1.2.3 From 33abcd3e0b87ded581f2b24092c1cdd26707d893 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Fri, 24 Mar 2006 23:57:40 +0000 Subject: 2006-03-25 Zoltan Varga * exceptions-sparc.c: Applied patch from David S. Miller : Implement correct support for sparc/linux. svn path=/trunk/mono/; revision=58508 --- mono/mini/ChangeLog | 3 +++ mono/mini/exceptions-sparc.c | 61 ++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index 4b678153d78..75dfaa04b7d 100644 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,3 +1,6 @@ +2006-03-25 Zoltan Varga + + * exceptions-sparc.c: Applied patch from David S. Miller : Implement correct support for sparc/linux. Fri Mar 24 20:07:19 CET 2006 Paolo Molaro diff --git a/mono/mini/exceptions-sparc.c b/mono/mini/exceptions-sparc.c index 5abbab8a24c..184d28bdcc1 100644 --- a/mono/mini/exceptions-sparc.c +++ b/mono/mini/exceptions-sparc.c @@ -425,6 +425,61 @@ mono_arch_has_unwind_info (gconstpointer addr) return FALSE; } +#ifdef __linux__ + +gboolean +mono_arch_handle_exception (void *sigctx, gpointer obj, gboolean test_only) +{ + MonoContext mctx; + struct sigcontext *sc = sigctx; + gpointer *window; + +#ifdef SPARCV9 + mctx.ip = (gpointer) sc->sigc_regs.tpc; + mctx.sp = (gpointer) sc->sigc_regs.u_regs[14]; +#else + mctx.ip = (gpointer) sc->si_regs.pc; + mctx.sp = (gpointer) sc->si_regs.u_regs[14]; +#endif + + window = (gpointer*)(((guint8*)mctx.sp) + MONO_SPARC_STACK_BIAS); + mctx.fp = window [sparc_fp - 16]; + + mono_handle_exception (&mctx, obj, mctx.ip, test_only); + +#ifdef SPARCV9 + sc->sigc_regs.tpc = (unsigned long) mctx.ip; + sc->sigc_regs.tnpc = (unsigned long) (mctx.ip + 4); + sc->sigc_regs.u_regs[14] = (unsigned long) mctx.sp; +#else + sc->si_regs.pc = (unsigned long) mctx.ip; + sc->si_regs.npc = (unsigned long) (mctx.ip + 4); + sc->si_regs.u_regs[14] = (unsigned long) mctx.sp; +#endif + + window = (gpointer*)(((guint8*)mctx.sp) + MONO_SPARC_STACK_BIAS); + window [sparc_fp - 16] = mctx.fp; + + return TRUE; +} + +gpointer +mono_arch_ip_from_context (void *sigctx) +{ + struct sigcontext *sc = sigctx; + gpointer *ret; + +#ifdef SPARCV9 + ret = (gpointer) sc->sigc_regs.tpc; +#else + ret = (gpointer) sc->si_regs.pc; +#endif + + return ret; +} + +#else /* !__linux__ */ + gboolean mono_arch_handle_exception (void *sigctx, gpointer obj, gboolean test_only) { @@ -437,12 +492,7 @@ mono_arch_handle_exception (void *sigctx, gpointer obj, gboolean test_only) * under documented under solaris. The code below seems to work under * Solaris 9. */ -#ifndef __linux__ g_assert (!ctx->uc_mcontext.gwins); -#else - /* better, but doesn't work all the time. need to rethink! */ - g_assert (!ctx->uc_mcontext.gregs); -#endif mctx.ip = ctx->uc_mcontext.gregs [REG_PC]; mctx.sp = ctx->uc_mcontext.gregs [REG_SP]; @@ -468,3 +518,4 @@ mono_arch_ip_from_context (void *sigctx) return (gpointer)ctx->uc_mcontext.gregs [REG_PC]; } +#endif -- cgit v1.2.3 From 9a12e2a6668ba27b74d4bb48f6cc30d427ba802f Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 24 Mar 2006 23:57:42 +0000 Subject: 2006-03-24 Chris Toshok * CompilerInfo.cs (Init): make this internal as well, so CodeDomConfigurationHandler can call it. * CodeDomConfigurationHandler.cs (ReadCompilers): we need to call CompilerInfo.Init after setting CompilerInfo.TypeName. svn path=/trunk/mcs/; revision=58509 --- mcs/class/System/System.CodeDom.Compiler/ChangeLog | 8 ++++++++ .../System/System.CodeDom.Compiler/CodeDomConfigurationHandler.cs | 1 + mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mcs/class/System/System.CodeDom.Compiler/ChangeLog b/mcs/class/System/System.CodeDom.Compiler/ChangeLog index ac9726e0441..83099d76064 100644 --- a/mcs/class/System/System.CodeDom.Compiler/ChangeLog +++ b/mcs/class/System/System.CodeDom.Compiler/ChangeLog @@ -1,3 +1,11 @@ +2006-03-24 Chris Toshok + + * CompilerInfo.cs (Init): make this internal as well, so + CodeDomConfigurationHandler can call it. + + * CodeDomConfigurationHandler.cs (ReadCompilers): we need to call + CompilerInfo.Init after setting CompilerInfo.TypeName. + 2006-03-11 Miguel de Icaza * CodeDomConfigurationHandler.cs: Comment out unused methods. diff --git a/mcs/class/System/System.CodeDom.Compiler/CodeDomConfigurationHandler.cs b/mcs/class/System/System.CodeDom.Compiler/CodeDomConfigurationHandler.cs index 4e6e0d592c9..d65bc840596 100644 --- a/mcs/class/System/System.CodeDom.Compiler/CodeDomConfigurationHandler.cs +++ b/mcs/class/System/System.CodeDom.Compiler/CodeDomConfigurationHandler.cs @@ -105,6 +105,7 @@ namespace System.CodeDom.Compiler compiler.TypeName = AttValue ("type", child); compiler.CompilerOptions = AttValue ("compilerOptions", child, true, true); compiler.WarningLevel = AttUIntValue ("warningLevel", child, 0); + compiler.Init (); config.Compilers [compiler.Languages] = compiler; } } diff --git a/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs b/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs index f1be4c9fbb6..76c0a0523ec 100644 --- a/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs +++ b/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs @@ -50,7 +50,7 @@ namespace System.CodeDom.Compiler { { } - void Init () + internal void Init () { if (inited) return; -- cgit v1.2.3 From 7d0cc820e7caacd15e61e0ebc50ae72b491257a8 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sat, 25 Mar 2006 00:01:36 +0000 Subject: * WebConfigurationManager.cs (GetConfig): add a fallback case for configuration sections that don't subclass from ConfigurationSection. 2006-03-24 Chris Toshok svn path=/trunk/mcs/; revision=58511 --- .../System.Web.Configuration_2.0/ChangeLog | 6 +++++ .../WebConfigurationManager.cs | 26 ++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog index d6efa93add7..51f68c4be39 100644 --- a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog +++ b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog @@ -1,3 +1,9 @@ +2006-03-24 Chris Toshok + + * WebConfigurationManager.cs (GetConfig): add a fallback case for + configuration sections that don't subclass from + ConfigurationSection. + 2006-03-24 Chris Toshok * WebConfigurationHost.cs: fix bug where OpenWebConfiguration diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs index ca6136caf4b..a57d1bf983e 100644 --- a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs +++ b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs @@ -129,6 +129,7 @@ namespace System.Web.Configuration { string basePath = GetBasePath (path); _Configuration conf; + lock (configurations) { conf = (_Configuration) configurations [basePath]; @@ -271,7 +272,7 @@ namespace System.Web.Configuration { #region stuff copied from WebConfigurationSettings #if TARGET_J2EE - static private IConfigurationSystem oldConfig { + static internal IConfigurationSystem oldConfig { get { return (IConfigurationSystem)AppDomain.CurrentDomain.GetData("WebConfigurationManager.oldConfig"); } @@ -289,13 +290,14 @@ namespace System.Web.Configuration { } } #else + static internal IConfigurationSystem oldConfig; static Web20DefaultConfig config; static IInternalConfigSystem configSystem; #endif const BindingFlags privStatic = BindingFlags.NonPublic | BindingFlags.Static; static readonly object lockobj = new object (); - public static void Init () + internal static void Init () { lock (lockobj) { if (config != null) @@ -312,7 +314,7 @@ namespace System.Web.Configuration { throw new ConfigurationException ("Cannot find method CCS"); object [] args = new object [] {settings}; - changeConfig.Invoke (null, args); + oldConfig = (IConfigurationSystem)changeConfig.Invoke (null, args); config = settings; config.Init (); @@ -368,7 +370,23 @@ namespace System.Web.Configuration { public object GetConfig (string sectionName) { - return WebConfigurationManager.GetWebApplicationSection (sectionName); + object o = WebConfigurationManager.GetWebApplicationSection (sectionName); + + if (o == null || o is IgnoreSection) { + /* this can happen when the section + * handler doesn't subclass from + * ConfigurationSection. let's be + * nice and try to load it using the + * 1.x style routines in case there's + * a 1.x section handler registered + * for it. + */ + object o1 = WebConfigurationManager.oldConfig.GetConfig (sectionName); + if (o1 != null) + return o1; + } + + return o; } public void Init () -- cgit v1.2.3 From ccb5e3dfd7b49e2ea6faa6f7f438f5d5ae1d1669 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sat, 25 Mar 2006 02:57:04 +0000 Subject: Para svn path=/trunk/mono/; revision=58514 --- man/mono.1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/man/mono.1 b/man/mono.1 index bac314961a7..6b65779c42f 100644 --- a/man/mono.1 +++ b/man/mono.1 @@ -279,7 +279,9 @@ The default profiler accepts the following options 'alloc' to profile memory consumption by the application; 'time' to profile the time spent on each routine; 'jit' to collect time spent JIT-compiling methods and 'stat' to perform sample statistical profiling. -If no options are provided the default is 'alloc,time,jit'. By default the +If no options are provided the default is 'alloc,time,jit'. +.PP +By default the profile data is printed to stdout: to change this, use the 'file=filename' option to output the data to filename. .Sp -- cgit v1.2.3 From 899b39f2eb4253e14cdbe7ad92a517e058c008fb Mon Sep 17 00:00:00 2001 From: Gert Driesen Date: Sat, 25 Mar 2006 07:56:55 +0000 Subject: * XmlSchemaImporterTests.cs: Added NotWorking tests as preparation for XmlReflectionImporter and SoapReflectionImporter fixes. Reordered tests. svn path=/trunk/mcs/; revision=58515 --- .../Test/System.Xml.Serialization/ChangeLog | 6 + .../XmlSchemaImporterTests.cs | 763 +++++++++++++++++---- 2 files changed, 620 insertions(+), 149 deletions(-) diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/ChangeLog b/mcs/class/System.XML/Test/System.Xml.Serialization/ChangeLog index a29d4fcd926..5c88244cb38 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/ChangeLog +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/ChangeLog @@ -1,3 +1,9 @@ +2006-03-25 Gert Driesen + + * XmlSchemaImporterTests.cs: Added NotWorking tests as preparation + for XmlReflectionImporter and SoapReflectionImporter fixes. Reordered + tests. + 2006-03-22 Gert Driesen * XmlReflectionImporterTests.cs: Added ImportTypeMapping tests for diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs index bf17406bf32..97acddab4e4 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs @@ -64,77 +64,60 @@ namespace MonoTests.System.XmlSerialization } [Test] - public void ImportTypeMapping_XsdPrimitive_Boolean () + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_AnyURI () { - XmlSchemas schemas = ExportType (typeof (bool)); - ArrayList qnames = GetXmlQualifiedNames (schemas); - Assert.AreEqual (1, qnames.Count, "#1"); - - XmlSchemaImporter importer = new XmlSchemaImporter (schemas); - XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + string schemaFragment = "" + + "" + + " " + + ""; - Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("boolean", map.ElementName, "#3"); - Assert.AreEqual ("NSBoolean", map.Namespace, "#4"); - Assert.AreEqual ("System.Boolean", map.TypeFullName, "#5"); - Assert.AreEqual ("Boolean", map.TypeName, "#6"); - } + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); - [Test] - public void ImportTypeMapping_XsdPrimitive_Short () - { - XmlSchemas schemas = ExportType (typeof (short)); ArrayList qnames = GetXmlQualifiedNames (schemas); Assert.AreEqual (1, qnames.Count, "#1"); - XmlSchemaImporter importer = new XmlSchemaImporter (schemas); - XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); - - Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("short", map.ElementName, "#3"); - Assert.AreEqual ("NSInt16", map.Namespace, "#4"); - Assert.AreEqual ("System.Int16", map.TypeFullName, "#5"); - Assert.AreEqual ("Int16", map.TypeName, "#6"); - } + XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; - [Test] - public void ImportTypeMapping_XsdPrimitive_UnsignedShort () - { - XmlSchemas schemas = ExportType (typeof (ushort)); - ArrayList qnames = GetXmlQualifiedNames (schemas); - Assert.AreEqual (1, qnames.Count, "#1"); + Assert.AreEqual ("anyURI", qname.Name, "#2"); + Assert.AreEqual ("NSAnyURI", qname.Namespace, "#3"); XmlSchemaImporter importer = new XmlSchemaImporter (schemas); XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); - Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("unsignedShort", map.ElementName, "#3"); - Assert.AreEqual ("NSUInt16", map.Namespace, "#4"); - Assert.AreEqual ("System.UInt16", map.TypeFullName, "#5"); - Assert.AreEqual ("UInt16", map.TypeName, "#6"); + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("anyURI", map.ElementName, "#5"); + Assert.AreEqual ("NSAnyURI", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); } [Test] - public void ImportTypeMapping_XsdPrimitive_Int () + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_Base64 () { - XmlSchemas schemas = ExportType (typeof (int)); - ArrayList qnames = GetXmlQualifiedNames (schemas); - Assert.AreEqual (1, qnames.Count, "#1"); + string schemaFragment = "" + + "" + + " " + + ""; + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); XmlSchemaImporter importer = new XmlSchemaImporter (schemas); - XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + XmlTypeMapping map = importer.ImportTypeMapping (new XmlQualifiedName ("base64", "NSBase64")); - Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("int", map.ElementName, "#3"); - Assert.AreEqual ("NSInt32", map.Namespace, "#4"); - Assert.AreEqual ("System.Int32", map.TypeFullName, "#5"); - Assert.AreEqual ("Int32", map.TypeName, "#6"); + Assert.IsNotNull (map, "#1"); + Assert.AreEqual ("base64", map.ElementName, "#2"); + Assert.AreEqual ("NSBase64", map.Namespace, "#3"); + Assert.AreEqual ("System.String", map.TypeFullName, "#4"); + Assert.AreEqual ("String", map.TypeName, "#5"); } [Test] - public void ImportTypeMapping_XsdPrimitive_UnsignedInt () + public void ImportTypeMapping_XsdPrimitive_Base64Binary () { - XmlSchemas schemas = ExportType (typeof (uint)); + XmlSchemas schemas = ExportType (typeof (byte[])); ArrayList qnames = GetXmlQualifiedNames (schemas); Assert.AreEqual (1, qnames.Count, "#1"); @@ -142,16 +125,16 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("unsignedInt", map.ElementName, "#3"); - Assert.AreEqual ("NSUInt32", map.Namespace, "#4"); - Assert.AreEqual ("System.UInt32", map.TypeFullName, "#5"); - Assert.AreEqual ("UInt32", map.TypeName, "#6"); + Assert.AreEqual ("base64Binary", map.ElementName, "#3"); + Assert.AreEqual ("NSByte[]", map.Namespace, "#4"); + Assert.AreEqual ("System.Byte[]", map.TypeFullName, "#5"); + Assert.AreEqual ("Byte[]", map.TypeName, "#6"); } [Test] - public void ImportTypeMapping_XsdPrimitive_Long () + public void ImportTypeMapping_XsdPrimitive_Boolean () { - XmlSchemas schemas = ExportType (typeof (long)); + XmlSchemas schemas = ExportType (typeof (bool)); ArrayList qnames = GetXmlQualifiedNames (schemas); Assert.AreEqual (1, qnames.Count, "#1"); @@ -159,16 +142,16 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("long", map.ElementName, "#3"); - Assert.AreEqual ("NSInt64", map.Namespace, "#4"); - Assert.AreEqual ("System.Int64", map.TypeFullName, "#5"); - Assert.AreEqual ("Int64", map.TypeName, "#6"); + Assert.AreEqual ("boolean", map.ElementName, "#3"); + Assert.AreEqual ("NSBoolean", map.Namespace, "#4"); + Assert.AreEqual ("System.Boolean", map.TypeFullName, "#5"); + Assert.AreEqual ("Boolean", map.TypeName, "#6"); } [Test] - public void ImportTypeMapping_XsdPrimitive_UnsignedLong () + public void ImportTypeMapping_XsdPrimitive_Byte () { - XmlSchemas schemas = ExportType (typeof (ulong)); + XmlSchemas schemas = ExportType (typeof (sbyte)); ArrayList qnames = GetXmlQualifiedNames (schemas); Assert.AreEqual (1, qnames.Count, "#1"); @@ -176,44 +159,73 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("unsignedLong", map.ElementName, "#3"); - Assert.AreEqual ("NSUInt64", map.Namespace, "#4"); - Assert.AreEqual ("System.UInt64", map.TypeFullName, "#5"); - Assert.AreEqual ("UInt64", map.TypeName, "#6"); + Assert.AreEqual ("byte", map.ElementName, "#3"); + Assert.AreEqual ("NSSByte", map.Namespace, "#4"); + Assert.AreEqual ("System.SByte", map.TypeFullName, "#5"); + Assert.AreEqual ("SByte", map.TypeName, "#6"); } [Test] - public void ImportTypeMapping_XsdPrimitive_Float () + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_Char () { - XmlSchemas schemas = ExportType (typeof (float)); - ArrayList qnames = GetXmlQualifiedNames (schemas); - Assert.AreEqual (1, qnames.Count, "#1"); + string schemaFragment = "" + + "" + + " " + + ""; + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); XmlSchemaImporter importer = new XmlSchemaImporter (schemas); - XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); - - Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("float", map.ElementName, "#3"); - Assert.AreEqual ("NSSingle", map.Namespace, "#4"); - Assert.AreEqual ("System.Single", map.TypeFullName, "#5"); - Assert.AreEqual ("Single", map.TypeName, "#6"); + XmlTypeMapping map = importer.ImportTypeMapping (new XmlQualifiedName ("char", "NSChar")); + + Assert.IsNotNull (map, "#A1"); + Assert.AreEqual ("char", map.ElementName, "#A2"); + Assert.AreEqual ("NSChar", map.Namespace, "#A3"); + Assert.AreEqual ("System.String", map.TypeFullName, "#A4"); + Assert.AreEqual ("String", map.TypeName, "#A5"); + +#if ONLY_1_1 + schemas = ExportType (typeof (char)); + importer = new XmlSchemaImporter (schemas); + map = importer.ImportTypeMapping (new XmlQualifiedName ("char", "NSChar")); + + Assert.IsNotNull (map, "#B1"); + Assert.AreEqual ("char", map.ElementName, "#B2"); + Assert.AreEqual ("NSChar", map.Namespace, "#B3"); + Assert.AreEqual ("System.Char", map.TypeFullName, "#B4"); + Assert.AreEqual ("Char", map.TypeName, "#B5"); +#endif } [Test] - public void ImportTypeMapping_XsdPrimitive_Double () + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_Date () { - XmlSchemas schemas = ExportType (typeof (double)); + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + ArrayList qnames = GetXmlQualifiedNames (schemas); Assert.AreEqual (1, qnames.Count, "#1"); + XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; + + Assert.AreEqual ("date", qname.Name, "#2"); + Assert.AreEqual ("NSDate", qname.Namespace, "#3"); + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); - Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("double", map.ElementName, "#3"); - Assert.AreEqual ("NSDouble", map.Namespace, "#4"); - Assert.AreEqual ("System.Double", map.TypeFullName, "#5"); - Assert.AreEqual ("Double", map.TypeName, "#6"); + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("date", map.ElementName, "#5"); + Assert.AreEqual ("NSDate", map.Namespace, "#6"); + Assert.AreEqual ("System.DateTime", map.TypeFullName, "#7"); + Assert.AreEqual ("DateTime", map.TypeName, "#8"); } [Test] @@ -251,9 +263,9 @@ namespace MonoTests.System.XmlSerialization } [Test] - public void ImportTypeMapping_XsdPrimitive_QName () + public void ImportTypeMapping_XsdPrimitive_Double () { - XmlSchemas schemas = ExportType (typeof (XmlQualifiedName)); + XmlSchemas schemas = ExportType (typeof (double)); ArrayList qnames = GetXmlQualifiedNames (schemas); Assert.AreEqual (1, qnames.Count, "#1"); @@ -261,85 +273,106 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("QName", map.ElementName, "#3"); - Assert.AreEqual ("NSXmlQualifiedName", map.Namespace, "#4"); - Assert.AreEqual ("System.Xml.XmlQualifiedName", map.TypeFullName, "#5"); - Assert.AreEqual ("XmlQualifiedName", map.TypeName, "#6"); + Assert.AreEqual ("double", map.ElementName, "#3"); + Assert.AreEqual ("NSDouble", map.Namespace, "#4"); + Assert.AreEqual ("System.Double", map.TypeFullName, "#5"); + Assert.AreEqual ("Double", map.TypeName, "#6"); } [Test] - public void ImportTypeMapping_XsdPrimitive_String () + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_Duration () { - XmlSchemas schemas = ExportType (typeof (string)); + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + ArrayList qnames = GetXmlQualifiedNames (schemas); Assert.AreEqual (1, qnames.Count, "#1"); + XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; + + Assert.AreEqual ("duration", qname.Name, "#2"); + Assert.AreEqual ("NSDuration", qname.Namespace, "#3"); + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); - Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("string", map.ElementName, "#3"); - Assert.AreEqual ("NSString", map.Namespace, "#4"); - Assert.AreEqual ("System.String", map.TypeFullName, "#5"); - Assert.AreEqual ("String", map.TypeName, "#6"); + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("duration", map.ElementName, "#5"); + Assert.AreEqual ("NSDuration", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); } [Test] [Category ("NotWorking")] - [ExpectedException (typeof (XmlSchemaException))] // Type 'http://microsoft.com/wsdl/types/:guid' is not declared - public void ImportTypeMapping_XsdPrimitive_Guid () + public void ImportTypeMapping_XsdPrimitive_ENTITIES () { - XmlSchemas schemas = ExportType (typeof (Guid)); - GetXmlQualifiedNames (schemas); - } + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); - [Test] - public void ImportTypeMapping_XsdPrimitive_UnsignedByte () - { - XmlSchemas schemas = ExportType (typeof (byte)); ArrayList qnames = GetXmlQualifiedNames (schemas); Assert.AreEqual (1, qnames.Count, "#1"); + XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; + + Assert.AreEqual ("ENTITIES", qname.Name, "#2"); + Assert.AreEqual ("NSENTITIES", qname.Namespace, "#3"); + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); - Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("unsignedByte", map.ElementName, "#3"); - Assert.AreEqual ("NSByte", map.Namespace, "#4"); - Assert.AreEqual ("System.Byte", map.TypeFullName, "#5"); - Assert.AreEqual ("Byte", map.TypeName, "#6"); + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("ENTITIES", map.ElementName, "#5"); + Assert.AreEqual ("NSENTITIES", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); } [Test] - public void ImportTypeMapping_XsdPrimitive_Byte () + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_ENTITY () { - XmlSchemas schemas = ExportType (typeof (sbyte)); + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + ArrayList qnames = GetXmlQualifiedNames (schemas); Assert.AreEqual (1, qnames.Count, "#1"); + XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; + + Assert.AreEqual ("ENTITY", qname.Name, "#2"); + Assert.AreEqual ("NSENTITY", qname.Namespace, "#3"); + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); - Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("byte", map.ElementName, "#3"); - Assert.AreEqual ("NSSByte", map.Namespace, "#4"); - Assert.AreEqual ("System.SByte", map.TypeFullName, "#5"); - Assert.AreEqual ("SByte", map.TypeName, "#6"); - } - - [Test] - [Category ("NotWorking")] - [ExpectedException (typeof (XmlSchemaException))] // Type 'http://microsoft.com/wsdl/types/:char' is not declared - public void ImportTypeMapping_XsdPrimitive_Char () - { - XmlSchemas schemas = ExportType (typeof (char)); - GetXmlQualifiedNames (schemas); + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("ENTITY", map.ElementName, "#5"); + Assert.AreEqual ("NSENTITY", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); } [Test] - public void ImportTypeMapping_XsdPrimitive_Base64Binary () + public void ImportTypeMapping_XsdPrimitive_Float () { - XmlSchemas schemas = ExportType (typeof (byte[])); + XmlSchemas schemas = ExportType (typeof (float)); ArrayList qnames = GetXmlQualifiedNames (schemas); Assert.AreEqual (1, qnames.Count, "#1"); @@ -347,19 +380,19 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); Assert.IsNotNull (map, "#2"); - Assert.AreEqual ("base64Binary", map.ElementName, "#3"); - Assert.AreEqual ("NSByte[]", map.Namespace, "#4"); - Assert.AreEqual ("System.Byte[]", map.TypeFullName, "#5"); - Assert.AreEqual ("Byte[]", map.TypeName, "#6"); + Assert.AreEqual ("float", map.ElementName, "#3"); + Assert.AreEqual ("NSSingle", map.Namespace, "#4"); + Assert.AreEqual ("System.Single", map.TypeFullName, "#5"); + Assert.AreEqual ("Single", map.TypeName, "#6"); } [Test] [Category ("NotWorking")] - public void ImportTypeMapping_XsdPrimitive_Duration () + public void ImportTypeMapping_XsdPrimitive_GDay () { string schemaFragment = "" + - "" + - " " + + "" + + " " + ""; XmlSchemas schemas = new XmlSchemas (); @@ -370,26 +403,26 @@ namespace MonoTests.System.XmlSerialization XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; - Assert.AreEqual ("duration", qname.Name, "#2"); - Assert.AreEqual ("NSDuration", qname.Namespace, "#3"); + Assert.AreEqual ("gDay", qname.Name, "#2"); + Assert.AreEqual ("NSGDay", qname.Namespace, "#3"); XmlSchemaImporter importer = new XmlSchemaImporter (schemas); XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); Assert.IsNotNull (map, "#4"); - Assert.AreEqual ("duration", map.ElementName, "#5"); - Assert.AreEqual ("NSDuration", map.Namespace, "#6"); + Assert.AreEqual ("gDay", map.ElementName, "#5"); + Assert.AreEqual ("NSGDay", map.Namespace, "#6"); Assert.AreEqual ("System.String", map.TypeFullName, "#7"); Assert.AreEqual ("String", map.TypeName, "#8"); } [Test] [Category ("NotWorking")] - public void ImportTypeMapping_XsdPrimitive_Date () + public void ImportTypeMapping_XsdPrimitive_GMonthDay () { string schemaFragment = "" + - "" + - " " + + "" + + " " + ""; XmlSchemas schemas = new XmlSchemas (); @@ -400,19 +433,451 @@ namespace MonoTests.System.XmlSerialization XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; - Assert.AreEqual ("date", qname.Name, "#2"); - Assert.AreEqual ("NSDate", qname.Namespace, "#3"); + Assert.AreEqual ("gMonthDay", qname.Name, "#2"); + Assert.AreEqual ("NSGMonthDay", qname.Namespace, "#3"); XmlSchemaImporter importer = new XmlSchemaImporter (schemas); XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); Assert.IsNotNull (map, "#4"); - Assert.AreEqual ("date", map.ElementName, "#5"); - Assert.AreEqual ("NSDate", map.Namespace, "#6"); - Assert.AreEqual ("System.DateTime", map.TypeFullName, "#7"); - Assert.AreEqual ("DateTime", map.TypeName, "#8"); + Assert.AreEqual ("gMonthDay", map.ElementName, "#5"); + Assert.AreEqual ("NSGMonthDay", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); } - + + [Test] + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_Guid () + { + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping (new XmlQualifiedName ("guid", "NSGuid")); + + Assert.IsNotNull (map, "#A1"); + Assert.AreEqual ("guid", map.ElementName, "#A2"); + Assert.AreEqual ("NSGuid", map.Namespace, "#A3"); + Assert.AreEqual ("System.String", map.TypeFullName, "#A4"); + Assert.AreEqual ("String", map.TypeName, "#A5"); + +#if ONLY_1_1 + schemas = ExportType (typeof (Guid)); + importer = new XmlSchemaImporter (schemas); + map = importer.ImportTypeMapping (new XmlQualifiedName ("guid", "NSGuid")); + + Assert.IsNotNull (map, "#B1"); + Assert.AreEqual ("guid", map.ElementName, "#B2"); + Assert.AreEqual ("NSGuid", map.Namespace, "#B3"); + Assert.AreEqual ("System.Guid", map.TypeFullName, "#B4"); + Assert.AreEqual ("Guid", map.TypeName, "#B5"); +#endif + } + + [Test] + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_GYear () + { + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; + + Assert.AreEqual ("gYear", qname.Name, "#2"); + Assert.AreEqual ("NSGYear", qname.Namespace, "#3"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("gYear", map.ElementName, "#5"); + Assert.AreEqual ("NSGYear", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); + } + + [Test] + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_GYearMonth () + { + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; + + Assert.AreEqual ("gYearMonth", qname.Name, "#2"); + Assert.AreEqual ("NSGYearMonth", qname.Namespace, "#3"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("gYearMonth", map.ElementName, "#5"); + Assert.AreEqual ("NSGYearMonth", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); + } + + [Test] + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_HexBinary () + { + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; + + Assert.AreEqual ("hexBinary", qname.Name, "#2"); + Assert.AreEqual ("NSHexBinary", qname.Namespace, "#3"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("hexBinary", map.ElementName, "#5"); + Assert.AreEqual ("NSHexBinary", map.Namespace, "#6"); + Assert.AreEqual ("System.Byte[]", map.TypeFullName, "#7"); + Assert.AreEqual ("Byte[]", map.TypeName, "#8"); + } + + [Test] + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_IDREFS () + { + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; + + Assert.AreEqual ("IDREFS", qname.Name, "#2"); + Assert.AreEqual ("NSIDREFS", qname.Namespace, "#3"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("IDREFS", map.ElementName, "#5"); + Assert.AreEqual ("NSIDREFS", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); + } + + [Test] + public void ImportTypeMapping_XsdPrimitive_Int () + { + XmlSchemas schemas = ExportType (typeof (int)); + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#2"); + Assert.AreEqual ("int", map.ElementName, "#3"); + Assert.AreEqual ("NSInt32", map.Namespace, "#4"); + Assert.AreEqual ("System.Int32", map.TypeFullName, "#5"); + Assert.AreEqual ("Int32", map.TypeName, "#6"); + } + + [Test] + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_Integer () + { + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; + + Assert.AreEqual ("integer", qname.Name, "#2"); + Assert.AreEqual ("NSInteger", qname.Namespace, "#3"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("integer", map.ElementName, "#5"); + Assert.AreEqual ("NSInteger", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); + } + + [Test] + public void ImportTypeMapping_XsdPrimitive_Long () + { + XmlSchemas schemas = ExportType (typeof (long)); + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#2"); + Assert.AreEqual ("long", map.ElementName, "#3"); + Assert.AreEqual ("NSInt64", map.Namespace, "#4"); + Assert.AreEqual ("System.Int64", map.TypeFullName, "#5"); + Assert.AreEqual ("Int64", map.TypeName, "#6"); + } + + [Test] + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_Month () + { + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping (new XmlQualifiedName ("month", "NSMonth")); + + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("month", map.ElementName, "#5"); + Assert.AreEqual ("NSMonth", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); + } + + [Test] + public void ImportTypeMapping_XsdPrimitive_QName () + { + XmlSchemas schemas = ExportType (typeof (XmlQualifiedName)); + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#2"); + Assert.AreEqual ("QName", map.ElementName, "#3"); + Assert.AreEqual ("NSXmlQualifiedName", map.Namespace, "#4"); + Assert.AreEqual ("System.Xml.XmlQualifiedName", map.TypeFullName, "#5"); + Assert.AreEqual ("XmlQualifiedName", map.TypeName, "#6"); + } + + [Test] + public void ImportTypeMapping_XsdPrimitive_Short () + { + XmlSchemas schemas = ExportType (typeof (short)); + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#2"); + Assert.AreEqual ("short", map.ElementName, "#3"); + Assert.AreEqual ("NSInt16", map.Namespace, "#4"); + Assert.AreEqual ("System.Int16", map.TypeFullName, "#5"); + Assert.AreEqual ("Int16", map.TypeName, "#6"); + } + + [Test] + public void ImportTypeMapping_XsdPrimitive_String () + { + XmlSchemas schemas = ExportType (typeof (string)); + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#2"); + Assert.AreEqual ("string", map.ElementName, "#3"); + Assert.AreEqual ("NSString", map.Namespace, "#4"); + Assert.AreEqual ("System.String", map.TypeFullName, "#5"); + Assert.AreEqual ("String", map.TypeName, "#6"); + } + + [Test] + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_Time () + { + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlQualifiedName qname = (XmlQualifiedName) qnames[0]; + + Assert.AreEqual ("time", qname.Name, "#2"); + Assert.AreEqual ("NSTime", qname.Namespace, "#3"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("time", map.ElementName, "#5"); + Assert.AreEqual ("NSTime", map.Namespace, "#6"); + Assert.AreEqual ("System.DateTime", map.TypeFullName, "#7"); + Assert.AreEqual ("DateTime", map.TypeName, "#8"); + } + + [Test] + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_TimeInstant () + { + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping (new XmlQualifiedName ("timeInstant", "NSTimeInstant")); + + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("timeInstant", map.ElementName, "#5"); + Assert.AreEqual ("NSTimeInstant", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); + } + + [Test] + [Category ("NotWorking")] + public void ImportTypeMapping_XsdPrimitive_TimePeriod () + { + string schemaFragment = "" + + "" + + " " + + ""; + + XmlSchemas schemas = new XmlSchemas (); + schemas.Add (XmlSchema.Read (new StringReader (schemaFragment), null)); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping (new XmlQualifiedName ("timePeriod", "NSTimePeriod")); + + Assert.IsNotNull (map, "#4"); + Assert.AreEqual ("timePeriod", map.ElementName, "#5"); + Assert.AreEqual ("NSTimePeriod", map.Namespace, "#6"); + Assert.AreEqual ("System.String", map.TypeFullName, "#7"); + Assert.AreEqual ("String", map.TypeName, "#8"); + } + + [Test] + public void ImportTypeMapping_XsdPrimitive_UnsignedByte () + { + XmlSchemas schemas = ExportType (typeof (byte)); + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#2"); + Assert.AreEqual ("unsignedByte", map.ElementName, "#3"); + Assert.AreEqual ("NSByte", map.Namespace, "#4"); + Assert.AreEqual ("System.Byte", map.TypeFullName, "#5"); + Assert.AreEqual ("Byte", map.TypeName, "#6"); + } + + [Test] + public void ImportTypeMapping_XsdPrimitive_UnsignedInt () + { + XmlSchemas schemas = ExportType (typeof (uint)); + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#2"); + Assert.AreEqual ("unsignedInt", map.ElementName, "#3"); + Assert.AreEqual ("NSUInt32", map.Namespace, "#4"); + Assert.AreEqual ("System.UInt32", map.TypeFullName, "#5"); + Assert.AreEqual ("UInt32", map.TypeName, "#6"); + } + + [Test] + public void ImportTypeMapping_XsdPrimitive_UnsignedLong () + { + XmlSchemas schemas = ExportType (typeof (ulong)); + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#2"); + Assert.AreEqual ("unsignedLong", map.ElementName, "#3"); + Assert.AreEqual ("NSUInt64", map.Namespace, "#4"); + Assert.AreEqual ("System.UInt64", map.TypeFullName, "#5"); + Assert.AreEqual ("UInt64", map.TypeName, "#6"); + } + + [Test] + public void ImportTypeMapping_XsdPrimitive_UnsignedShort () + { + XmlSchemas schemas = ExportType (typeof (ushort)); + ArrayList qnames = GetXmlQualifiedNames (schemas); + Assert.AreEqual (1, qnames.Count, "#1"); + + XmlSchemaImporter importer = new XmlSchemaImporter (schemas); + XmlTypeMapping map = importer.ImportTypeMapping ((XmlQualifiedName) qnames[0]); + + Assert.IsNotNull (map, "#2"); + Assert.AreEqual ("unsignedShort", map.ElementName, "#3"); + Assert.AreEqual ("NSUInt16", map.Namespace, "#4"); + Assert.AreEqual ("System.UInt16", map.TypeFullName, "#5"); + Assert.AreEqual ("UInt16", map.TypeName, "#6"); + } + [Test] public void ImportTypeMapping_EnumSimpleContent () { -- cgit v1.2.3 From 72a7ecf4f4334d7e2725ed93316f9e9b2a358cf0 Mon Sep 17 00:00:00 2001 From: Senganal T Date: Sat, 25 Mar 2006 08:56:36 +0000 Subject: 2006-03-25 Senganal T * Test/System.Data/DataTableTest.cs : Fixed NotWorkingTest * System.Data/DataRow.cs : - RejectChanges : When row is in Deleted state, add the row back to Indexes and Validate the row. svn path=/trunk/mcs/; revision=58516 --- mcs/class/System.Data/System.Data/ChangeLog | 7 +++++++ mcs/class/System.Data/System.Data/DataRow.cs | 3 ++- mcs/class/System.Data/Test/System.Data/ChangeLog | 4 ++++ mcs/class/System.Data/Test/System.Data/DataTableTest.cs | 2 -- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/mcs/class/System.Data/System.Data/ChangeLog b/mcs/class/System.Data/System.Data/ChangeLog index 2f08fbabf9c..0dada68fb3b 100644 --- a/mcs/class/System.Data/System.Data/ChangeLog +++ b/mcs/class/System.Data/System.Data/ChangeLog @@ -1,3 +1,10 @@ +2006-03-25 Senganal T + + * DataRow.cs : + - RejectChanges : When row is in Deleted state, add the row back to + Indexes and Validate the row. + + 2006-03-23 Senganal T * DataTable.cs : diff --git a/mcs/class/System.Data/System.Data/DataRow.cs b/mcs/class/System.Data/System.Data/DataRow.cs index 08f42caa45f..a2ebf7b380e 100644 --- a/mcs/class/System.Data/System.Data/DataRow.cs +++ b/mcs/class/System.Data/System.Data/DataRow.cs @@ -1339,7 +1339,8 @@ namespace System.Data { case DataRowState.Deleted: CheckChildRows (DataRowAction.Rollback); Current = Original; - Table.AddRowToIndexes (this); + // Add row to index and validate if the constraints are satisfied + this.Validate (); break; } } diff --git a/mcs/class/System.Data/Test/System.Data/ChangeLog b/mcs/class/System.Data/Test/System.Data/ChangeLog index 8b83b2d904d..62cbe356396 100644 --- a/mcs/class/System.Data/Test/System.Data/ChangeLog +++ b/mcs/class/System.Data/Test/System.Data/ChangeLog @@ -1,3 +1,7 @@ +2006-03-25 Senganal T + + * DataTableTest.cs : Fixed NotWorkingTest + 2006-03-23 Senganal T * DataTableTest2.cs : diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest.cs index c432b539409..23a430144d3 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableTest.cs @@ -1199,7 +1199,6 @@ namespace MonoTests.System.Data } [Test] - [Category ("NotWorking")] public void ImportRowDeletedTest () { DataTable table = new DataTable (); @@ -1232,7 +1231,6 @@ namespace MonoTests.System.Data AssertEquals ("#3", 2, table.Rows.Count); AssertEquals ("#4", DataRowState.Deleted, table.Rows[1].RowState); - //FIXME : Currenty this fails. try { table.RejectChanges (); Fail ("#5"); -- cgit v1.2.3 From 87e1818b71a3b13b770bfd8fb85e5a8706fa9f68 Mon Sep 17 00:00:00 2001 From: Alexander Olk Date: Sat, 25 Mar 2006 15:39:48 +0000 Subject: 2006-03-25 Alexander Olk * ThemeWin32Classic.cs: First small part of the "de-uglify ThemeWin32Classic" effort, SizeGrip svn path=/trunk/mcs/; revision=58519 --- .../System.Windows.Forms/ChangeLog | 5 ++++ .../System.Windows.Forms/ThemeWin32Classic.cs | 32 +++++++++++++--------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index 7d71cdb6890..014df61d122 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,8 @@ +2006-03-25 Alexander Olk + + * ThemeWin32Classic.cs: First small part of the "de-uglify + ThemeWin32Classic" effort, SizeGrip + 2006-03-24 Jackson Harper * XplatUIX11.cs: Give a max idle time of one second, this matches diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs index 3a88dbc72eb..a1ad2c29893 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs @@ -2598,7 +2598,7 @@ namespace System.Windows.Forms int increment; int barpos_pixels; - block_width = ((client_area.Height) * 2 ) / 3; + block_width = (client_area.Height * 2 ) / 3; barpos_pixels = ((ctrl.Value - ctrl.Minimum) * client_area.Width) / (ctrl.Maximum - ctrl.Minimum); increment = block_width + space_betweenblocks; @@ -4937,19 +4937,25 @@ namespace System.Windows.Forms public override void CPDrawSizeGrip (Graphics dc, Color backColor, Rectangle bounds) { - Point pt = new Point (bounds.Right - 2, bounds.Bottom - 1); - - dc.DrawLine (ResPool.GetPen (ColorControl), pt.X - 12, pt.Y, pt.X, pt.Y); - dc.DrawLine (ResPool.GetPen (ColorControl), pt.X, pt.Y, pt.X, pt.Y - 13); - - // diagonals - for (int i = 0; i < 11; i += 4) { - dc.DrawLine (ResPool.GetPen (ColorControlDark), pt.X - i, pt.Y, pt.X + 1, pt.Y - i - 2); - dc.DrawLine (ResPool.GetPen (ColorControlDark), pt.X - i - 1, pt.Y, pt.X + 1, pt.Y - i - 2); - } + + Point pt = new Point (bounds.Right - 2, bounds.Bottom - 2); - for (int i = 3; i < 13; i += 4) - dc.DrawLine (ResPool.GetPen (ColorControlLight), pt.X - i, pt.Y, pt.X + 1, pt.Y - i - 1); + Pen pen = ResPool.GetPen (ColorControlDark); + + dc.DrawLine (pen, pt.X - 11, pt.Y, pt.X, pt.Y - 11); + dc.DrawLine (pen, pt.X - 10, pt.Y, pt.X, pt.Y - 10); + + dc.DrawLine (pen, pt.X - 7, pt.Y, pt.X, pt.Y - 7); + dc.DrawLine (pen, pt.X - 6, pt.Y, pt.X, pt.Y - 6); + + dc.DrawLine (pen, pt.X - 3, pt.Y, pt.X, pt.Y - 3); + dc.DrawLine (pen, pt.X - 2, pt.Y, pt.X, pt.Y - 2); + + pen = ResPool.GetPen (ColorControlLight); + + dc.DrawLine (pen, pt.X - 12, pt.Y, pt.X, pt.Y - 12); + dc.DrawLine (pen, pt.X - 8, pt.Y, pt.X, pt.Y - 8); + dc.DrawLine (pen, pt.X - 4, pt.Y, pt.X, pt.Y - 4); } -- cgit v1.2.3 From f5a5b1869507518f4bc3ea29f64f4b2d2120292e Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Sat, 25 Mar 2006 16:40:38 +0000 Subject: 2006-03-25 Sebastien Pouliot * RegionDataTest.cs: Add test cases for GetRegionData when a region is path-based (using bitmaps in libgdiplus) and for regions that had a binary operations applied (i.e. using a path tree in libgdiplus). * RegionNonRectTest.cs: Add test cases for GetRegionScans and all binary operators (Union, Intersection, Complement, Exclude and Xor) on path based regions (using bitmaps in libgdiplus). svn path=/trunk/mcs/; revision=58521 --- .../System.Drawing/Test/System.Drawing/ChangeLog | 9 + .../Test/System.Drawing/RegionDataTest.cs | 37 ++ .../Test/System.Drawing/RegionNonRectTest.cs | 560 +++++++++++++++++++++ 3 files changed, 606 insertions(+) diff --git a/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog b/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog index 07a07980a9f..3a7e6db9ba7 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog +++ b/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog @@ -1,3 +1,12 @@ +2006-03-25 Sebastien Pouliot + + * RegionDataTest.cs: Add test cases for GetRegionData when a region is + path-based (using bitmaps in libgdiplus) and for regions that had a + binary operations applied (i.e. using a path tree in libgdiplus). + * RegionNonRectTest.cs: Add test cases for GetRegionScans and all + binary operators (Union, Intersection, Complement, Exclude and Xor) + on path based regions (using bitmaps in libgdiplus). + 2006-02-29 Peter Dennis Bartok * TestFont.cs: LOGFONT must be CharSet=Auto to make sure we have diff --git a/mcs/class/System.Drawing/Test/System.Drawing/RegionDataTest.cs b/mcs/class/System.Drawing/Test/System.Drawing/RegionDataTest.cs index 82e134936f7..0b491065b68 100755 --- a/mcs/class/System.Drawing/Test/System.Drawing/RegionDataTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/RegionDataTest.cs @@ -41,12 +41,20 @@ namespace MonoTests.System.Drawing { private Bitmap bitmap; private Graphics graphic; + private GraphicsPath sp1; + private GraphicsPath sp2; [TestFixtureSetUp] public void FixtureSetUp () { bitmap = new Bitmap (10, 10); graphic = Graphics.FromImage (bitmap); + + sp1 = new GraphicsPath (); + sp1.AddPolygon (new Point[4] { new Point (0, 0), new Point (3, 0), new Point (3, 3), new Point (0, 3) }); + + sp2 = new GraphicsPath (); + sp2.AddPolygon (new Point[4] { new Point (2, 2), new Point (5, 2), new Point (5, 5), new Point (2, 5) }); } [Test] @@ -97,5 +105,34 @@ namespace MonoTests.System.Drawing { Region region = new Region (data); Assert.IsTrue (r.GetBounds (graphic).Equals (region.GetBounds (graphic)), "Bounds"); } + + [Test] + public void CombinedPathRegion () + { + // note: seems identical to PathRegion but it test another code path inside libgdiplus + Region r = new Region (sp1); + r.Xor (sp2); + RegionData data = r.GetRegionData (); + Assert.IsNotNull (data.Data, "Data"); + Region region = new Region (data); + Assert.IsTrue (r.GetBounds (graphic).Equals (region.GetBounds (graphic)), "Bounds"); + } + + [Test] + public void MultiCombinedPathRegion () + { + // note: seems identical to PathRegion but it test another code path inside libgdiplus + Region r1 = new Region (sp1); + r1.Xor (sp2); + Region r2 = new Region (sp2); + r2.Complement (sp1); + + Region r = r1.Clone (); + r.Union (r2); + RegionData data = r.GetRegionData (); + Assert.IsNotNull (data.Data, "Data"); + Region region = new Region (data); + Assert.IsTrue (r.GetBounds (graphic).Equals (region.GetBounds (graphic)), "Bounds"); + } } } diff --git a/mcs/class/System.Drawing/Test/System.Drawing/RegionNonRectTest.cs b/mcs/class/System.Drawing/Test/System.Drawing/RegionNonRectTest.cs index fbc5dbe37ac..1cc034394a6 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/RegionNonRectTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/RegionNonRectTest.cs @@ -44,12 +44,27 @@ namespace MonoTests.System.Drawing { private Bitmap bitmap; private Graphics graphic; + private Matrix matrix; + private GraphicsPath sp1, sp2, sp3, sp4; [TestFixtureSetUp] public void FixtureSetUp () { bitmap = new Bitmap (10, 10); graphic = Graphics.FromImage (bitmap); + matrix = new Matrix (); + + sp1 = new GraphicsPath (); + sp1.AddPolygon (new Point[4] { new Point (0, 0), new Point (3, 0), new Point (3, 3), new Point (0, 3) }); + + sp2 = new GraphicsPath (); + sp2.AddPolygon (new Point[4] { new Point (2, 2), new Point (5, 2), new Point (5, 5), new Point (2, 5) }); + + sp3 = new GraphicsPath (); + sp3.AddPolygon (new Point[4] { new Point (6, 0), new Point (9, 0), new Point (9, 3), new Point (6, 3) }); + + sp4 = new GraphicsPath (); + sp4.AddPolygon (new Point[4] { new Point (8, 0), new Point (11, 0), new Point (11, 3), new Point (8, 3) }); } // a region with an "empty ctor" graphic path is "empty" (i.e. not infinite) @@ -156,5 +171,550 @@ namespace MonoTests.System.Drawing { Region region = new Region (gp); Assert.IsTrue (region.IsInfinite (graphic), "IsInfinite"); } + + [Test] + public void Curve_GetRegionScans () + { + Point[] points = new Point[2] { new Point (-4194304, -4194304), new Point (4194304, 4194304) }; + GraphicsPath gp = new GraphicsPath (); + gp.AddCurve (points); + Region region = new Region (gp); + // too big, returns 0 + Assert.AreEqual (0, region.GetRegionScans (matrix).Length, "GetRegionScans"); + } + + private void DisplaySmallRegion (Region region, int ox, int oy, int width, int height) + { + for (int y = oy ; y < height - 1; y++) { + for (int x = ox; x < width - 1; x++) { + if (region.IsVisible (x, y)) + Console.Write ("X"); + else + Console.Write ("."); + } + Console.WriteLine (); + } + } + + private void DisplaySmallRegion (Region region, int width, int height) + { + DisplaySmallRegion (region, -1, -1, width, height); + } + + + private void CompareSmallRegion (Region region, bool[] expected, int ox, int oy, int width, int height) + { + int p = 0; + for (int y = oy; y < height + oy; y++) { + for (int x = ox; x < width + ox; x++) { + Assert.AreEqual (expected[p], region.IsVisible (x, y), String.Format ("{0},{1}", x, y)); + p++; + } + } + } + + private void CompareSmallRegion (Region region, bool[] expected, int width, int height) + { + CompareSmallRegion (region, expected, -1, -1, width, height); + } + + private void CheckRectF (string msg, int x, int y, int w, int h, RectangleF rect) + { + Assert.AreEqual (x, rect.X, msg + ".X"); + Assert.AreEqual (y, rect.Y, msg + ".Y"); + Assert.AreEqual (w, rect.Width, msg + ".Width"); + Assert.AreEqual (h, rect.Height, msg + ".Height"); + } + + static bool[] sunion = new bool[49] { + false, false, false, false, false, false, false, // ....... + false, true, true, true, false, false, false, // .XXX... + false, true, true, true, false, false, false, // .XXX... + false, true, true, true, true, true, false, // .XXXXX. + false, false, false, true, true, true, false, // ...XXX. + false, false, false, true, true, true, false, // ...XXX. + false, false, false, false, false, false, false, // ....... + }; + + [Test] + public void SmallUnion1 () + { + Region region = new Region (sp1); + region.Union (sp2); + CompareSmallRegion (region, sunion, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (3, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 0, 0, 3, 2, scans[0]); + CheckRectF ("[1]", 0, 2, 5, 1, scans[1]); + CheckRectF ("[2]", 2, 3, 3, 2, scans[2]); + } + + [Test] + public void SmallUnion2 () + { + Region region = new Region (sp2); + region.Union (sp1); + CompareSmallRegion (region, sunion, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (3, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 0, 0, 3, 2, scans[0]); + CheckRectF ("[1]", 0, 2, 5, 1, scans[1]); + CheckRectF ("[2]", 2, 3, 3, 2, scans[2]); + } + + static bool[] self1 = new bool[49] { + false, false, false, false, false, false, false, // ....... + false, true, true, true, false, false, false, // .XXX... + false, true, true, true, false, false, false, // .XXX... + false, true, true, true, false, false, false, // .XXX... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + }; + + [Test] + public void SmallUnion_Self1 () + { + Region region = new Region (sp1); + region.Union (sp1); + CompareSmallRegion (region, self1, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (1, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 0, 0, 3, 3, scans[0]); + } + + static bool[] self2 = new bool[49] { + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, true, true, true, false, // ...XXX. + false, false, false, true, true, true, false, // ...XXX. + false, false, false, true, true, true, false, // ...XXX. + false, false, false, false, false, false, false, // ....... + }; + + [Test] + public void SmallUnion_Self2 () + { + Region region = new Region (sp2); + region.Union (sp2); + CompareSmallRegion (region, self2, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (1, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 2, 2, 3, 3, scans[0]); + } + + static bool[] sintersection = new bool[49] { + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, true, false, false, false, // ...X... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + }; + + [Test] + public void SmallIntersection1 () + { + Region region = new Region (sp1); + region.Intersect (sp2); + CompareSmallRegion (region, sintersection, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (1, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 2, 2, 1, 1, scans[0]); + } + + [Test] + public void SmallIntersection2 () + { + Region region = new Region (sp2); + region.Intersect (sp1); + CompareSmallRegion (region, sintersection, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (1, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 2, 2, 1, 1, scans[0]); + } + + [Test] + public void SmallIntersection_Self1 () + { + Region region = new Region (sp1); + region.Intersect (sp1); + CompareSmallRegion (region, self1, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (1, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 0, 0, 3, 3, scans[0]); + } + + [Test] + public void SmallIntersection_Self2 () + { + Region region = new Region (sp2); + region.Intersect (sp2); + CompareSmallRegion (region, self2, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (1, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 2, 2, 3, 3, scans[0]); + } + + static bool[] sexclude1 = new bool[49] { + false, false, false, false, false, false, false, // ....... + false, true, true, true, false, false, false, // .XXX... + false, true, true, true, false, false, false, // .XXX... + false, true, true, false, false, false, false, // .XX.... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + }; + + [Test] + public void SmallExclude1 () + { + Region region = new Region (sp1); + region.Exclude (sp2); + CompareSmallRegion (region, sexclude1, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (2, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 0, 0, 3, 2, scans[0]); + CheckRectF ("[1]", 0, 2, 2, 1, scans[1]); + } + + static bool[] sexclude2 = new bool[49] { + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, true, true, false, // ....XX. + false, false, false, true, true, true, false, // ...XXX. + false, false, false, true, true, true, false, // ...XXX. + false, false, false, false, false, false, false, // ....... + }; + + [Test] + public void SmallExclude2 () + { + Region region = new Region (sp2); + region.Exclude (sp1); + CompareSmallRegion (region, sexclude2, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (2, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 3, 2, 2, 1, scans[0]); + CheckRectF ("[1]", 2, 3, 3, 2, scans[1]); + } + + static bool[] sempty = new bool[49] { + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + false, false, false, false, false, false, false, // ....... + }; + + [Test] + public void SmallExclude_Self1 () + { + Region region = new Region (sp1); + region.Exclude (sp1); + CompareSmallRegion (region, sempty, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (0, scans.Length, "GetRegionScans"); + } + + [Test] + public void SmallExclude_Self2 () + { + Region region = new Region (sp2); + region.Exclude (sp2); + CompareSmallRegion (region, sempty, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (0, scans.Length, "GetRegionScans"); + } + + [Test] + public void SmallComplement1 () + { + Region region = new Region (sp1); + region.Complement (sp2); + CompareSmallRegion (region, sexclude2, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (2, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 3, 2, 2, 1, scans[0]); + CheckRectF ("[1]", 2, 3, 3, 2, scans[1]); + } + + [Test] + public void SmallComplement2 () + { + Region region = new Region (sp2); + region.Complement (sp1); + CompareSmallRegion (region, sexclude1, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (2, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 0, 0, 3, 2, scans[0]); + CheckRectF ("[1]", 0, 2, 2, 1, scans[1]); + } + + [Test] + public void SmallComplement_Self1 () + { + Region region = new Region (sp1); + region.Complement (sp1); + CompareSmallRegion (region, sempty, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (0, scans.Length, "GetRegionScans"); + } + + [Test] + public void SmallComplement_Self2 () + { + Region region = new Region (sp2); + region.Complement (sp2); + CompareSmallRegion (region, sempty, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (0, scans.Length, "GetRegionScans"); + } + + static bool[] sxor = new bool[49] { + false, false, false, false, false, false, false, // ....... + false, true, true, true, false, false, false, // .XXX... + false, true, true, true, false, false, false, // .XXX... + false, true, true, false, true, true, false, // .XX.XX. + false, false, false, true, true, true, false, // ...XXX. + false, false, false, true, true, true, false, // ...XXX. + false, false, false, false, false, false, false, // ....... + }; + + [Test] + public void SmallXor1 () + { + Region region = new Region (sp1); + region.Xor (sp2); + CompareSmallRegion (region, sxor, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (4, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 0, 0, 3, 2, scans[0]); + CheckRectF ("[1]", 0, 2, 2, 1, scans[1]); + CheckRectF ("[2]", 3, 2, 2, 1, scans[2]); + CheckRectF ("[3]", 2, 3, 3, 2, scans[3]); + } + + [Test] + public void SmallXor2 () + { + Region region = new Region (sp2); + region.Xor (sp1); + CompareSmallRegion (region, sxor, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (4, scans.Length, "GetRegionScans"); + CheckRectF ("[0]", 0, 0, 3, 2, scans[0]); + CheckRectF ("[1]", 0, 2, 2, 1, scans[1]); + CheckRectF ("[2]", 3, 2, 2, 1, scans[2]); + CheckRectF ("[3]", 2, 3, 3, 2, scans[3]); + } + + [Test] + public void SmallXor_Self1 () + { + Region region = new Region (sp1); + region.Xor (sp1); + CompareSmallRegion (region, sempty, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (0, scans.Length, "GetRegionScans"); + } + + [Test] + public void SmallXor_Self2 () + { + Region region = new Region (sp2); + region.Xor (sp2); + CompareSmallRegion (region, sempty, 7, 7); + + RectangleF[] scans = region.GetRegionScans (matrix); + Assert.AreEqual (0, scans.Length, "GetRegionScans"); + } + + [Test] + public void NegativeXor () + { + GraphicsPath neg = new GraphicsPath (); + // identical result (matrix) of XOR but we're using negative coordinates + neg.AddPolygon (new Point[4] { new Point (-2, -2), new Point (1, -2), new Point (1, 1), new Point (-2, 1) }); + + Region region = new Region (sp1); + region.Xor (neg); + CompareSmallRegion (region, sxor, -3, -3, 7, 7); + } + + static bool[] ni_union = new bool[55] { + false, false, false, false, false, false, false, false, false, false, false, // ........... + false, true, true, true, false, false, false, true, true, true, false, // .XXX...XXX. + false, true, true, true, false, false, false, true, true, true, false, // .XXX...XXX. + false, true, true, true, false, false, false, true, true, true, false, // .XXX...XXX. + false, false, false, false, false, false, false, false, false, false, false, // ........... + }; + + [Test] + public void UnionWithoutIntersection () + { + Region region = new Region (sp1); + region.Union (sp3); + CompareSmallRegion (region, ni_union, 11,5 ); + } + + [Test] + // libgdiplus: both region are considered inside as intersecting rectangle because + // part of them co-exists in the same 8x8 bitmap. Full algorithm apply but results + // in an empty bitmap + public void IntersectionWithoutIntersection () + { + Region region = new Region (sp1); + region.Intersect (sp3); + CompareSmallRegion (region, sempty, 7, 7); + } + + [Test] + // libgdiplus: no intersection results in an empty bitmap (optimization) + public void IntersectionWithoutIntersection_Large () + { + Region region = new Region (sp1); + region.Intersect (sp4); + CompareSmallRegion (region, sempty, 7, 7); + } + + [Test] + // libgdiplus: both region are considered inside as intersecting rectangle because + // part of them co-exists in the same 8x8 bitmap. Full algorithm apply but results + // as a copy of sp1 + public void ExcludeWithoutIntersection () + { + Region region = new Region (sp1); + region.Exclude (sp3); + CompareSmallRegion (region, self1, 7, 7); + } + + [Test] + // libgdiplus: no intersection results in a clone of sp1 (optimization) + public void ExcludeWithoutIntersection_Large () + { + Region region = new Region (sp1); + region.Exclude (sp4); + CompareSmallRegion (region, self1, 7, 7); + } + + [Test] + // libgdiplus: both region are considered inside as intersecting rectangle because + // part of them co-exists in the same 8x8 bitmap. Full algorithm apply but results + // as a copy of sp1 + public void ComplementWithoutIntersection () + { + Region region = new Region (sp3); + region.Complement (sp1); + CompareSmallRegion (region, self1, 7, 7); + } + + [Test] + // libgdiplus: no intersection results in a clone of sp1 (optimization) + public void ComplementWithoutIntersection_Large () + { + Region region = new Region (sp4); + region.Complement (sp1); + CompareSmallRegion (region, self1, 7, 7); + } + + [Test] + // libgdiplus: both region are considered inside as intersecting rectangle because + // part of them co-exists in the same 8x8 bitmap. + public void XorWithoutIntersection () + { + Region region = new Region (sp1); + region.Xor (sp3); + CompareSmallRegion (region, ni_union, 11, 5); + } + + static bool[] ni_xor = new bool[65] { + false, false, false, false, false, false, false, false, false, false, false, false, false, // ............. + false, true, true, true, false, false, false, false, false, true, true, true, false, // .XXX.....XXX. + false, true, true, true, false, false, false, false, false, true, true, true, false, // .XXX.....XXX. + false, true, true, true, false, false, false, false, false, true, true, true, false, // .XXX.....XXX. + false, false, false, false, false, false, false, false, false, false, false, false, false, // ............. + }; + + [Test] + // libgdiplus: both region aren't considered as an intersection because they do + // not co-exists in the same 8x8 bitmap. In this case the xor function calls the + // union code (optimization). + public void XorWithoutIntersection_Large () + { + Region region = new Region (sp1); + region.Xor (sp4); + CompareSmallRegion (region, ni_xor, 13, 5); + } + + [Test] + public void IsEqual () + { + Region r1 = new Region (sp1); + Region r2 = new Region (sp2); + Region r3 = new Region (sp3); + Region r4 = new Region (sp4); + // with self + Assert.IsTrue (r1.Equals (r1, graphic), "r1-r1"); + Assert.IsTrue (r2.Equals (r2, graphic), "r2-r2"); + Assert.IsTrue (r3.Equals (r3, graphic), "r3-r3"); + Assert.IsTrue (r4.Equals (r4, graphic), "r4-r4"); + // with a different + Assert.IsFalse (r1.Equals (r4, graphic), "r1-r4"); + Assert.IsFalse (r2.Equals (r3, graphic), "r2-r3"); + Assert.IsFalse (r3.Equals (r2, graphic), "r3-r2"); + Assert.IsFalse (r4.Equals (r1, graphic), "r4-r1"); + // with same (not self) + Region r5 = r1.Clone (); + r1.Exclude (r4); + Assert.IsTrue (r1.Equals (r5, graphic), "r1-r5"); + Assert.IsTrue (r5.Equals (r1, graphic), "r5-r1"); + Assert.IsFalse (r5.Equals (r4, graphic), "r5-r4"); + Assert.IsFalse (r4.Equals (r5, graphic), "r4-r5"); + } + + [Test] + public void Translate_Int () + { + Region r1 = new Region (sp1); + Region r2 = new Region (sp2); + r2.Translate (-2, -2); + r1.Intersect (r2); + CompareSmallRegion (r1, self1, 7, 7); + } + + [Test] + public void Translate_Float () + { + Region r1 = new Region (sp1); + Region r2 = new Region (sp2); + r2.Translate (-2.0f, -2.0f); + r1.Intersect (r2); + CompareSmallRegion (r1, self1, 7, 7); + } } } -- cgit v1.2.3 From 63871230490c5540f904aae91e1d77461dc80a5e Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Sat, 25 Mar 2006 18:19:42 +0000 Subject: 2006-03-25 Marek Safar * class.cs (Constructor.Emit): Don't crash when struct ctor is InternalCall. (Constructor.ApplyAttributeBuilder): Transform MethodImplAttribute to be compatible with MS runtime. svn path=/trunk/mcs/; revision=58530 --- mcs/mcs/ChangeLog | 7 +++++++ mcs/mcs/class.cs | 9 +++++++-- mcs/tests/test-498.cs | 17 +++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 mcs/tests/test-498.cs diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index e17880b5a94..ecc283f5354 100644 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,3 +1,10 @@ +2006-03-25 Marek Safar + + * class.cs (Constructor.Emit): Don't crash when struct ctor is + InternalCall. + (Constructor.ApplyAttributeBuilder): Transform MethodImplAttribute to be + compatible with MS runtime. + 2006-03-23 Marek Safar * attribute.cs (Attribute.ResolveConstructor): Check for an invalid diff --git a/mcs/mcs/class.cs b/mcs/mcs/class.cs index e99b34f1688..2f5f8a950fe 100644 --- a/mcs/mcs/class.cs +++ b/mcs/mcs/class.cs @@ -4039,6 +4039,11 @@ namespace Mono.CSharp { return; } + if (a.Type == TypeManager.methodimpl_attr_type && + (a.GetMethodImplOptions () & MethodImplOptions.InternalCall) != 0) { + ConstructorBuilder.SetImplementationFlags (MethodImplAttributes.InternalCall | MethodImplAttributes.Runtime); + } + ConstructorBuilder.SetCustomAttribute (cb); } @@ -4156,13 +4161,13 @@ namespace Mono.CSharp { { EmitContext ec = CreateEmitContext (null, null); + if (block != null) { // If this is a non-static `struct' constructor and doesn't have any // initializer, it must initialize all of the struct's fields. if ((ParentContainer.Kind == Kind.Struct) && ((ModFlags & Modifiers.STATIC) == 0) && (Initializer == null)) - Block.AddThisVariable (Parent, Location); + block.AddThisVariable (Parent, Location); - if (block != null) { if (!block.ResolveMeta (ec, ParameterInfo)) block = null; } diff --git a/mcs/tests/test-498.cs b/mcs/tests/test-498.cs new file mode 100644 index 00000000000..64c67d7c37f --- /dev/null +++ b/mcs/tests/test-498.cs @@ -0,0 +1,17 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +struct C +{ + [MethodImplAttribute(MethodImplOptions.InternalCall)] + public extern C(float value); + + static int Main () + { + MethodImplAttributes iflags = typeof (C).GetConstructors()[0].GetMethodImplementationFlags (); + if ((iflags & MethodImplAttributes.InternalCall) == 0) + return 1; + + return 0; + } +} -- cgit v1.2.3 From 500300d556e05a3e36c4ed15ad2fa40b46eea22a Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Sat, 25 Mar 2006 18:21:26 +0000 Subject: Updated svn path=/trunk/mcs/; revision=58531 --- mcs/tests/known-issues-gmcs | 1 + 1 file changed, 1 insertion(+) diff --git a/mcs/tests/known-issues-gmcs b/mcs/tests/known-issues-gmcs index 895821cab14..ed64f0b7cbd 100644 --- a/mcs/tests/known-issues-gmcs +++ b/mcs/tests/known-issues-gmcs @@ -14,6 +14,7 @@ test-494.cs test-495.cs test-anon-11.cs test-anon-36.cs +test-498.cs gtest-230.cs test-partial-13.cs -- cgit v1.2.3 From c6f5396ddfd861ff84e53e8aa7eed72e4e0aa3fa Mon Sep 17 00:00:00 2001 From: Alexander Olk Date: Sat, 25 Mar 2006 20:14:25 +0000 Subject: * ThemeWin32Classic.cs: - Rewrote the totally broken CPDrawBorder3D method. That was one of the main problems for the terrific ThemeWin32Classic look - Updated and corrected Button drawing - Correct the dimensions of the SizeGrip to match ms ones - Removed a small drawing glitch in DrawComboBoxEditDecorations * XplatUIX11.cs: Draw borders with BorderStyle = Fixed3D with Border3DStyle.Sunken to match ms. 2006-03-25 Alexander Olk svn path=/trunk/mcs/; revision=58535 --- .../System.Windows.Forms/ChangeLog | 12 ++ .../System.Windows.Forms/ThemeWin32Classic.cs | 186 +++++++++------------ .../System.Windows.Forms/XplatUIX11.cs | 4 +- 3 files changed, 90 insertions(+), 112 deletions(-) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index 014df61d122..8d4ad43901a 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,15 @@ +2006-03-25 Alexander Olk + + * ThemeWin32Classic.cs: + - Rewrote the totally broken CPDrawBorder3D method. That was + one of the main problems for the terrific ThemeWin32Classic + look + - Updated and corrected Button drawing + - Correct the dimensions of the SizeGrip to match ms ones + - Removed a small drawing glitch in DrawComboBoxEditDecorations + * XplatUIX11.cs: Draw borders with BorderStyle = Fixed3D with + Border3DStyle.Sunken to match ms. + 2006-03-25 Alexander Olk * ThemeWin32Classic.cs: First small part of the "de-uglify diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs index a1ad2c29893..59d45080798 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs @@ -24,6 +24,7 @@ // Peter Bartok, pbartok@novell.com // John BouAntoun, jba-mono@optusnet.com.au // Marek Safar, marek.safar@seznam.cz +// Alexander Olk, alex.olk@googlemail.com // @@ -288,9 +289,12 @@ namespace System.Windows.Forms dc.DrawString(button.text, button.Font, ResPool.GetSolidBrush (button.ForeColor), text_rect, button.text_format); } else { if (button.FlatStyle == FlatStyle.Flat || button.FlatStyle == FlatStyle.Popup) { - dc.DrawString(button.text, button.Font, ResPool.GetSolidBrush (ControlPaint.DarkDark (this.ColorControl)), text_rect, button.text_format); + dc.DrawString(button.text, button.Font, ResPool.GetSolidBrush (ColorGrayText), text_rect, button.text_format); } else { - CPDrawStringDisabled(dc, button.text, button.Font, ColorControlText, text_rect, button.text_format); + Rectangle rect_white = new Rectangle (text_rect.X + 1, text_rect.Y + 1, text_rect.Width, text_rect.Height); + + dc.DrawString(button.text, button.Font, ResPool.GetSolidBrush (ColorControlLightLight), rect_white, button.text_format); + dc.DrawString(button.text, button.Font, ResPool.GetSolidBrush (ColorGrayText), text_rect, button.text_format); } } } @@ -335,7 +339,7 @@ namespace System.Windows.Forms } else { // popup has a ButtonColorText forecolor, not a button.ForeCOlor if (button.FlatStyle == FlatStyle.Popup) { - rect_fore_color = this.ColorControlText; + rect_fore_color = ColorGrayText; } // fill then draw outer rect @@ -363,7 +367,7 @@ namespace System.Windows.Forms bool draw_popup_checked = false; if (button.FlatStyle == FlatStyle.Popup) { - rect_fore_color = this.ColorControlText; + rect_fore_color = ColorGrayText; // see if we should draw a disabled checked popup button draw_popup_checked = ((checkbox != null && checkbox.Checked) || @@ -776,7 +780,7 @@ namespace System.Windows.Forms #region ComboBox // Drawing - + // TODO: get rid of that and use BorderStyle Fixed3D public override void DrawComboBoxEditDecorations (Graphics dc, ComboBox ctrl, Rectangle cl) { dc.DrawLine (ResPool.GetPen (ColorControlDark), cl.X, cl.Y, cl.X + cl.Width, cl.Y); //top @@ -785,8 +789,8 @@ namespace System.Windows.Forms dc.DrawLine (ResPool.GetPen (ColorControlLight), cl.X, cl.Y + cl.Height - 1, cl.X + cl.Width, cl.Y + cl.Height - 1); dc.DrawLine (ResPool.GetPen (ColorControlDark), cl.X, cl.Y, cl.X, cl.Y + cl.Height); //left dc.DrawLine (ResPool.GetPen (ColorControlDarkDark), cl.X + 1, cl.Y + 1, cl.X + 1, cl.Y + cl.Height - 2); - dc.DrawLine (ResPool.GetPen (ColorControl), cl.X + cl.Width - 2, cl.Y, cl.X + cl.Width - 2, cl.Y + cl.Height); //right - dc.DrawLine (ResPool.GetPen (ColorControlLight), cl.X + cl.Width - 1, cl.Y + 1 , cl.X + cl.Width - 1, cl.Y + cl.Height - 1); + dc.DrawLine (ResPool.GetPen (ColorControl), cl.X + cl.Width - 1, cl.Y, cl.X + cl.Width - 1, cl.Y + cl.Height); //right + dc.DrawLine (ResPool.GetPen (ColorControlLight), cl.X + cl.Width - 2, cl.Y + 1 , cl.X + cl.Width - 2, cl.Y + cl.Height - 1); } // Sizing @@ -4243,115 +4247,79 @@ namespace System.Windows.Forms CPDrawBorder3D(graphics, rectangle, style, sides, ColorControl); } - private void CPDrawBorder3D (Graphics graphics, Rectangle rectangle, Border3DStyle style, Border3DSide sides, Color control_color) { + private void CPDrawBorder3D (Graphics graphics, Rectangle rectangle, Border3DStyle style, Border3DSide sides, Color control_color) + { Pen penTopLeft; Pen penTopLeftInner; Pen penBottomRight; Pen penBottomRightInner; - Rectangle rect= new Rectangle(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height); - bool doInner = false; - - if ((style & Border3DStyle.Adjust)!=0) { - rect.Y-=2; - rect.X-=2; - rect.Width+=4; - rect.Height+=4; - } - - /* default to flat */ - penTopLeft=ResPool.GetPen(ControlPaint.Dark(control_color)); - penTopLeftInner=ResPool.GetPen(ControlPaint.Dark(control_color)); - penBottomRight=ResPool.GetPen(ControlPaint.Dark(control_color)); - penBottomRightInner=ResPool.GetPen(ControlPaint.Dark(control_color)); - - if ((style & Border3DStyle.RaisedOuter)!=0) { - penTopLeft=ResPool.GetPen(ControlPaint.LightLight(control_color)); - penBottomRight=ResPool.GetPen(ControlPaint.DarkDark(control_color)); - if ((style & (Border3DStyle.RaisedInner | Border3DStyle.SunkenInner))!=0) { - doInner=true; - } - } else if ((style & Border3DStyle.SunkenOuter)!=0) { - penTopLeft=ResPool.GetPen(ControlPaint.DarkDark(control_color)); - penBottomRight=ResPool.GetPen(ControlPaint.LightLight(control_color)); - if ((style & (Border3DStyle.RaisedInner | Border3DStyle.SunkenInner))!=0) { - doInner=true; - } + Rectangle rect= new Rectangle (rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height); + + if ((style & Border3DStyle.Adjust) != 0) { + rect.Y -= 2; + rect.X -= 2; + rect.Width += 4; + rect.Height += 4; } - - if ((style & Border3DStyle.RaisedInner)!=0) { - if (doInner) { - penTopLeftInner=ResPool.GetPen(control_color); - penBottomRightInner=ResPool.GetPen(ControlPaint.Dark(control_color)); - } else { - penTopLeft=ResPool.GetPen(ControlPaint.LightLight(control_color)); - penBottomRight=ResPool.GetPen(ControlPaint.DarkDark(control_color)); - } - } else if ((style & Border3DStyle.SunkenInner)!=0) { - if (doInner) { - penTopLeftInner=ResPool.GetPen(ControlPaint.Dark(control_color)); - penBottomRightInner=ResPool.GetPen(control_color); - } else { - penTopLeft=ResPool.GetPen(ControlPaint.DarkDark(control_color)); - penBottomRight=ResPool.GetPen(ControlPaint.LightLight(control_color)); - } + + penTopLeft = penTopLeftInner = penBottomRight = penBottomRightInner = ResPool.GetPen (control_color); + + if (style == Border3DStyle.Raised) { + penTopLeftInner = ResPool.GetPen (ControlPaint.LightLight (control_color)); + penBottomRight = ResPool.GetPen (ControlPaint.DarkDark (control_color)); + penBottomRightInner = ResPool.GetPen (ColorInactiveCaption); + } else if (style == Border3DStyle.Sunken) { + penTopLeft = ResPool.GetPen (ColorInactiveCaption); + penTopLeftInner = ResPool.GetPen (ControlPaint.DarkDark (control_color)); + penBottomRight = ResPool.GetPen (ControlPaint.LightLight (control_color)); + } else if (style == Border3DStyle.Etched) { + penTopLeft = ResPool.GetPen (ColorInactiveCaption); + penTopLeftInner = ResPool.GetPen (ControlPaint.LightLight (control_color)); + penBottomRight = ResPool.GetPen (ControlPaint.LightLight (control_color)); + penBottomRightInner = ResPool.GetPen (ColorInactiveCaption); + } else if (style == Border3DStyle.RaisedOuter) { + penBottomRight = ResPool.GetPen (ControlPaint.DarkDark (control_color)); + } else if (style == Border3DStyle.SunkenOuter) { + penTopLeft = ResPool.GetPen (ColorInactiveCaption); + penBottomRight = ResPool.GetPen (ControlPaint.LightLight (control_color)); + } else if (style == Border3DStyle.RaisedInner) { + penTopLeft = ResPool.GetPen (ControlPaint.LightLight (control_color)); + penBottomRight = ResPool.GetPen (ColorInactiveCaption); + } else if (style == Border3DStyle.SunkenInner) { + penTopLeft = ResPool.GetPen (ControlPaint.DarkDark (control_color)); + } else if (style == Border3DStyle.Flat) { + penTopLeft = ResPool.GetPen (ColorInactiveCaption); + penBottomRight = ResPool.GetPen (ColorInactiveCaption); + } else if (style == Border3DStyle.Bump) { + penTopLeftInner = ResPool.GetPen (ControlPaint.DarkDark (control_color)); + penBottomRight = ResPool.GetPen (ControlPaint.DarkDark (control_color)); } - - if ((sides & Border3DSide.Middle)!=0) { - graphics.FillRectangle(ResPool.GetSolidBrush(control_color), rect); + + if ((sides & Border3DSide.Middle) != 0) { + graphics.FillRectangle (ResPool.GetSolidBrush (control_color), rect); } - - if ((sides & Border3DSide.Left)!=0) { - graphics.DrawLine(penTopLeft, rect.Left, rect.Bottom-2, rect.Left, rect.Top); - if (doInner) { - graphics.DrawLine(penTopLeftInner, rect.Left+1, rect.Bottom-2, rect.Left+1, rect.Top); - } + + if ((sides & Border3DSide.Left) != 0) { + graphics.DrawLine (penTopLeft, rect.Left, rect.Bottom - 2, rect.Left, rect.Top); + graphics.DrawLine (penTopLeftInner, rect.Left + 1, rect.Bottom - 2, rect.Left + 1, rect.Top); } - - if ((sides & Border3DSide.Top)!=0) { - graphics.DrawLine(penTopLeft, rect.Left, rect.Top, rect.Right-2, rect.Top); - - if (doInner) { - if ((sides & Border3DSide.Left)!=0) { - graphics.DrawLine(penTopLeftInner, rect.Left+1, rect.Top+1, rect.Right-3, rect.Top+1); - } else { - graphics.DrawLine(penTopLeftInner, rect.Left, rect.Top+1, rect.Right-3, rect.Top+1); - } - } + + if ((sides & Border3DSide.Top) != 0) { + graphics.DrawLine (penTopLeft, rect.Left, rect.Top, rect.Right - 2, rect.Top); + graphics.DrawLine (penTopLeftInner, rect.Left + 1, rect.Top + 1, rect.Right - 3, rect.Top + 1); } - - if ((sides & Border3DSide.Right)!=0) { - graphics.DrawLine(penBottomRight, rect.Right-1, rect.Top, rect.Right-1, rect.Bottom-1); - - if (doInner) { - if ((sides & Border3DSide.Top)!=0) { - graphics.DrawLine(penBottomRightInner, rect.Right-2, rect.Top+1, rect.Right-2, rect.Bottom-2); - } else { - graphics.DrawLine(penBottomRightInner, rect.Right-2, rect.Top, rect.Right-2, rect.Bottom-2); - } - } + + if ((sides & Border3DSide.Right) != 0) { + graphics.DrawLine (penBottomRight, rect.Right - 1, rect.Top, rect.Right - 1, rect.Bottom - 1); + graphics.DrawLine (penBottomRightInner, rect.Right - 2, rect.Top + 1, rect.Right - 2, rect.Bottom - 2); } - - if ((sides & Border3DSide.Bottom)!=0) { - int left=rect.Left; - - if ((sides & Border3DSide.Left)!=0) { - left+=1; - } - - graphics.DrawLine(penBottomRight, rect.Left, rect.Bottom-1, rect.Right-1, rect.Bottom-1); - - if (doInner) { - if ((sides & Border3DSide.Right)!=0) { - graphics.DrawLine(penBottomRightInner, left, rect.Bottom-2, rect.Right-2, rect.Bottom-2); - } else { - graphics.DrawLine(penBottomRightInner, left, rect.Bottom-2, rect.Right-2, rect.Bottom-2); - } - } + + if ((sides & Border3DSide.Bottom) != 0) { + graphics.DrawLine (penBottomRight, rect.Left, rect.Bottom - 1, rect.Right - 1, rect.Bottom - 1); + graphics.DrawLine (penBottomRightInner, rect.Left + 1, rect.Bottom - 2, rect.Right - 2, rect.Bottom - 2); } - } - public override void CPDrawButton (Graphics graphics, Rectangle rectangle, ButtonState state) { DrawFrameControlStates dfcs=DrawFrameControlStates.ButtonPush; @@ -4938,7 +4906,7 @@ namespace System.Windows.Forms public override void CPDrawSizeGrip (Graphics dc, Color backColor, Rectangle bounds) { - Point pt = new Point (bounds.Right - 2, bounds.Bottom - 2); + Point pt = new Point (bounds.Right - 2, bounds.Bottom - 1); Pen pen = ResPool.GetPen (ColorControlDark); @@ -4956,6 +4924,8 @@ namespace System.Windows.Forms dc.DrawLine (pen, pt.X - 12, pt.Y, pt.X, pt.Y - 12); dc.DrawLine (pen, pt.X - 8, pt.Y, pt.X, pt.Y - 8); dc.DrawLine (pen, pt.X - 4, pt.Y, pt.X, pt.Y - 4); + + dc.DrawLine (ResPool.GetPen (ColorControl), pt.X - 12, pt.Y, pt.X, pt.Y); } @@ -5290,12 +5260,8 @@ namespace System.Windows.Forms graphics.DrawRectangle (ResPool.GetPen (ControlPaint.Dark (ColorControl)), trace_rectangle); } else if ((State & DrawFrameControlStates.Flat)!=0) { ControlPaint.DrawBorder(graphics, rectangle, ColorControlDark, ButtonBorderStyle.Solid); - } else if ((State & DrawFrameControlStates.Inactive)!=0) { - /* Same as normal, it would seem */ - CPDrawBorder3D(graphics, rectangle, Border3DStyle.Raised, Border3DSide.Left | Border3DSide.Top | Border3DSide.Right | Border3DSide.Bottom, ColorControl); - } else { - CPDrawBorder3D(graphics, rectangle, Border3DStyle.Raised, Border3DSide.Left | Border3DSide.Top | Border3DSide.Right | Border3DSide.Bottom, ColorControl); - } + } else + CPDrawBorder3D(graphics, rectangle, Border3DStyle.Raised, Border3DSide.Left | Border3DSide.Top | Border3DSide.Right | Border3DSide.Bottom, ColorControl); } else if ((State & DrawFrameControlStates.ButtonRadio)!=0) { Pen penFatDark = new Pen(ColorControlDark, 1); Pen penFatLight = new Pen(ColorControlLightLight, 1); diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs index 804500c688b..1746db0aca3 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs @@ -3117,7 +3117,7 @@ namespace System.Windows.Forms { Graphics g; g = Graphics.FromHwnd(hwnd.whole_window); - ControlPaint.DrawBorder3D(g, new Rectangle(0, 0, hwnd.Width, hwnd.Height)); + ControlPaint.DrawBorder3D(g, new Rectangle(0, 0, hwnd.Width, hwnd.Height), Border3DStyle.Sunken); g.Dispose(); break; } @@ -3461,7 +3461,7 @@ namespace System.Windows.Forms { Caret.Paused = true; HideCaret(); } - + if (client) { hwnd.client_dc = Graphics.FromHwnd (hwnd.client_window); hwnd.client_dc.SetClip(hwnd.invalid); -- cgit v1.2.3 From f73fdbcfdbc9c8b768d8c0e36247f2cc85d32402 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Sun, 26 Mar 2006 09:52:39 +0000 Subject: updated svn path=/trunk/mcs/; revision=58537 --- mcs/errors/known-issues-gmcs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcs/errors/known-issues-gmcs b/mcs/errors/known-issues-gmcs index 6453bf29466..2d9a180a079 100644 --- a/mcs/errors/known-issues-gmcs +++ b/mcs/errors/known-issues-gmcs @@ -60,7 +60,7 @@ cs0134.cs cs0633-2.cs cs0633-3.cs cs0633.cs -gcs0633-4.cs +gcs0633-4.cs NO ERROR gcs0208-2.cs NO ERROR gcs0208-3.cs NO ERROR -- cgit v1.2.3 From 616566f8f4ea61012ad535d9a080b4175e3dafde Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Sun, 26 Mar 2006 10:10:05 +0000 Subject: 2006-03-26 Marek Safar * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to GetAttributableValue. * constant.cs (Constant.GetAttributableValue): Does implicit conversion when required. * convert.cs (ImplicitConversionRequired): Error message moved to DoubleLiteral. * ecore.cs (Expression.GetAttributableValue): Add type parameter for automatic implicit conversion of an output value. (EnumConstant.GetAttributableValue): Don't reduce the enum constants. * expression.cs (ArrayCreation.GetAttributableValue): Add element type conversion. (TypeOf.GetAttributableValue): Add extra handling for object type. * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have special error message. svn path=/trunk/mcs/; revision=58538 --- mcs/errors/cs0664-3.cs | 15 +++++++++++++++ mcs/mcs/ChangeLog | 22 ++++++++++++++++++++++ mcs/mcs/attribute.cs | 22 ++++------------------ mcs/mcs/constant.cs | 10 ++++++++-- mcs/mcs/convert.cs | 21 +-------------------- mcs/mcs/ecore.cs | 12 +++++++++--- mcs/mcs/expression.cs | 18 +++++++++++------- mcs/mcs/literal.cs | 22 ++++++++++++++++++++++ mcs/tests/known-issues-gmcs | 1 + mcs/tests/test-39.cs | 24 ++++++++++++++++++++---- 10 files changed, 113 insertions(+), 54 deletions(-) create mode 100644 mcs/errors/cs0664-3.cs diff --git a/mcs/errors/cs0664-3.cs b/mcs/errors/cs0664-3.cs new file mode 100644 index 00000000000..3eb26cf8c86 --- /dev/null +++ b/mcs/errors/cs0664-3.cs @@ -0,0 +1,15 @@ +// cs0664-3.cs: Literal of type double cannot be implicitly converted to type `float'. Add suffix `f' to create a literal of this type +// Line: 13 + +using System; + +public sealed class BoundAttribute : System.Attribute +{ + public float D; +} + +class C +{ + [Bound (D = 300d)] + double d2; +} \ No newline at end of file diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index ecc283f5354..fa1b5c26770 100644 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,3 +1,25 @@ +2006-03-26 Marek Safar + + * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to + GetAttributableValue. + + * constant.cs (Constant.GetAttributableValue): Does implicit conversion + when required. + + * convert.cs (ImplicitConversionRequired): Error message moved to + DoubleLiteral. + + * ecore.cs (Expression.GetAttributableValue): Add type parameter for + automatic implicit conversion of an output value. + (EnumConstant.GetAttributableValue): Don't reduce the enum constants. + + * expression.cs (ArrayCreation.GetAttributableValue): Add element type + conversion. + (TypeOf.GetAttributableValue): Add extra handling for object type. + + * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have + special error message. + 2006-03-25 Marek Safar * class.cs (Constructor.Emit): Don't crash when struct ctor is diff --git a/mcs/mcs/attribute.cs b/mcs/mcs/attribute.cs index 5de2857fce5..adaab6d8bff 100644 --- a/mcs/mcs/attribute.cs +++ b/mcs/mcs/attribute.cs @@ -322,7 +322,7 @@ namespace Mono.CSharp { resolve_error = false; return cb; } - catch (Exception) { + catch (Exception e) { Error_AttributeArgumentNotValid (Location); return null; } @@ -384,15 +384,9 @@ namespace Mono.CSharp { for (int j = 0; j < pos_arg_count; ++j) { Argument a = (Argument) PosArguments [j]; - if (!a.Expr.GetAttributableValue (out pos_values [j])) + if (!a.Expr.GetAttributableValue (a.Type, out pos_values [j])) return null; - if (TypeManager.IsPrimitiveType (a.Type) && a.Type != pos_values [j].GetType ()) { - bool fail; - // This can happen only for constants in same range - pos_values [j] = TypeManager.ChangeType (pos_values [j], a.Type, out fail); - } - if (j < last_real_param) continue; @@ -519,12 +513,8 @@ namespace Mono.CSharp { return false; } - Expression e = Convert.ImplicitConversionRequired (ec, a.Expr, pi.PropertyType, a.Expr.Location); - if (e == null) - return false; - object value; - if (!e.GetAttributableValue (out value)) + if (!a.Expr.GetAttributableValue (pi.PropertyType, out value)) return false; PropertyBase pb = TypeManager.GetProperty (pi); @@ -550,12 +540,8 @@ namespace Mono.CSharp { return false; } - Expression e = Convert.ImplicitConversionRequired (ec, a.Expr, fi.FieldType, a.Expr.Location); - if (e == null) - return false; - object value; - if (!e.GetAttributableValue (out value)) + if (!a.Expr.GetAttributableValue (fi.FieldType, out value)) return false; FieldBase fb = TypeManager.GetField (fi); diff --git a/mcs/mcs/constant.cs b/mcs/mcs/constant.cs index 7b6d9d25e36..4405662dbd7 100644 --- a/mcs/mcs/constant.cs +++ b/mcs/mcs/constant.cs @@ -39,9 +39,15 @@ namespace Mono.CSharp { return this.GetType ().Name + " (" + AsString () + ")"; } - public override bool GetAttributableValue (out object value) + public override bool GetAttributableValue (Type valueType, out object value) { - value = GetTypedValue (); + Constant c = ToType (valueType, loc); + if (c == null) { + value = null; + return false; + } + + value = c.GetTypedValue (); return true; } diff --git a/mcs/mcs/convert.cs b/mcs/mcs/convert.cs index ac7abc7c59e..5e79c32e792 100644 --- a/mcs/mcs/convert.cs +++ b/mcs/mcs/convert.cs @@ -1219,33 +1219,14 @@ namespace Mono.CSharp { static public Expression ImplicitConversionRequired (EmitContext ec, Expression source, Type target_type, Location loc) { - Expression e; - - e = ImplicitConversion (ec, source, target_type, loc); + Expression e = ImplicitConversion (ec, source, target_type, loc); if (e != null) return e; - if (source is DoubleLiteral) { - if (target_type == TypeManager.float_type) { - Error_664 (loc, "float", "f"); - return null; - } - if (target_type == TypeManager.decimal_type) { - Error_664 (loc, "decimal", "m"); - return null; - } - } - source.Error_ValueCannotBeConverted (loc, target_type, false); return null; } - static void Error_664 (Location loc, string type, string suffix) { - Report.Error (664, loc, - "Literal of type double cannot be implicitly converted to type `{0}'. Add suffix `{1}' to create a literal of this type", - type, suffix); - } - /// /// Performs the explicit numeric conversions /// diff --git a/mcs/mcs/ecore.cs b/mcs/mcs/ecore.cs index bea2f75f5b7..8dc51309643 100644 --- a/mcs/mcs/ecore.cs +++ b/mcs/mcs/ecore.cs @@ -137,7 +137,7 @@ namespace Mono.CSharp { // Not nice but we have broken hierarchy public virtual void CheckMarshallByRefAccess (Type container) {} - public virtual bool GetAttributableValue (out object value) + public virtual bool GetAttributableValue (Type valueType, out object value) { Attribute.Error_AttributeArgumentNotValid (loc); value = null; @@ -1173,9 +1173,9 @@ namespace Mono.CSharp { child.Emit (ec); } - public override bool GetAttributableValue (out object value) + public override bool GetAttributableValue (Type valueType, out object value) { - return child.GetAttributableValue (out value); + return child.GetAttributableValue (valueType, out value); } } @@ -1364,6 +1364,12 @@ namespace Mono.CSharp { Child.Emit (ec); } + public override bool GetAttributableValue (Type valueType, out object value) + { + value = GetTypedValue (); + return true; + } + public override string GetSignatureForError() { return TypeManager.CSharpName (Type); diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs index afb6734945b..293c69ee627 100644 --- a/mcs/mcs/expression.cs +++ b/mcs/mcs/expression.cs @@ -1254,9 +1254,9 @@ namespace Mono.CSharp { return null; } - public override bool GetAttributableValue (out object value) + public override bool GetAttributableValue (Type valueType, out object value) { - return expr.GetAttributableValue (out value); + return expr.GetAttributableValue (valueType, out value); } } @@ -6540,11 +6540,11 @@ namespace Mono.CSharp { } } - public override bool GetAttributableValue (out object value) + public override bool GetAttributableValue (Type valueType, out object value) { if (!is_one_dimensional){ // Report.Error (-211, Location, "attribute can not encode multi-dimensional arrays"); - return base.GetAttributableValue (out value); + return base.GetAttributableValue (null, out value); } if (array_data == null) { @@ -6554,13 +6554,13 @@ namespace Mono.CSharp { return true; } // Report.Error (-212, Location, "array should be initialized when passing it to an attribute"); - return base.GetAttributableValue (out value); + return base.GetAttributableValue (null, out value); } object [] ret = new object [array_data.Count]; for (int i = 0; i < ret.Length; ++i) { - if (!((Expression)array_data [i]).GetAttributableValue (out ret [i])) { + if (!((Expression)array_data [i]).GetAttributableValue (array_element_type, out ret [i])) { value = null; return false; } @@ -6861,8 +6861,12 @@ namespace Mono.CSharp { ec.ig.Emit (OpCodes.Call, TypeManager.system_type_get_type_from_handle); } - public override bool GetAttributableValue (out object value) + public override bool GetAttributableValue (Type valueType, out object value) { + if (valueType == TypeManager.object_type) { + value = (object)typearg; + return true; + } value = typearg; return true; } diff --git a/mcs/mcs/literal.cs b/mcs/mcs/literal.cs index c7aae9204b0..13be2d99953 100644 --- a/mcs/mcs/literal.cs +++ b/mcs/mcs/literal.cs @@ -246,6 +246,28 @@ namespace Mono.CSharp { return this; } + + public override void Error_ValueCannotBeConverted (Location loc, Type target, bool expl) + { + if (target == TypeManager.float_type) { + Error_664 (loc, "float", "f"); + return; + } + + if (target == TypeManager.decimal_type) { + Error_664 (loc, "decimal", "m"); + return; + } + + base.Error_ValueCannotBeConverted (loc, target, expl); + } + + static void Error_664 (Location loc, string type, string suffix) + { + Report.Error (664, loc, + "Literal of type double cannot be implicitly converted to type `{0}'. Add suffix `{1}' to create a literal of this type", + type, suffix); + } } public class DecimalLiteral : DecimalConstant { diff --git a/mcs/tests/known-issues-gmcs b/mcs/tests/known-issues-gmcs index ed64f0b7cbd..be9db6bdba4 100644 --- a/mcs/tests/known-issues-gmcs +++ b/mcs/tests/known-issues-gmcs @@ -15,6 +15,7 @@ test-495.cs test-anon-11.cs test-anon-36.cs test-498.cs +test-39.cs gtest-230.cs test-partial-13.cs diff --git a/mcs/tests/test-39.cs b/mcs/tests/test-39.cs index 52f243c62f0..e1d6897c9eb 100644 --- a/mcs/tests/test-39.cs +++ b/mcs/tests/test-39.cs @@ -21,7 +21,22 @@ public class SimpleAttribute : Attribute { secret = value; } } - + + public long LongValue { + get { + return 0; + } + set { } + } + + public long[] ArrayValue { + get { + return new long[0]; + } + set { } + } + + public object D; } [Simple ("Interface test")] @@ -31,7 +46,10 @@ public interface IFoo { } [Simple ("Dummy", MyNamedArg = "Dude!")] -[Simple ("Vids", MyNamedArg = "Raj", AnotherArg = "Foo")] +[Simple ("Vids", MyNamedArg = "Raj", AnotherArg = "Foo")] +[Simple ("Trip", LongValue=0)] +[Simple ("Fourth", ArrayValue=new long[] { 0 })] +//[Simple ("Fifth", D=new double[] { -1 })] // runtime bug #77916 public class Blah { public static int Main () @@ -40,5 +58,3 @@ public class Blah { return 0; } } - - -- cgit v1.2.3 From dfebd48036e05262828938ebd4b0ee7fec1c8c33 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Sun, 26 Mar 2006 11:45:20 +0000 Subject: 2006-03-26 Marek Safar * rootcontext.cs (ResolveCore): Removed System.INullableValue. svn path=/trunk/mcs/; revision=58540 --- mcs/gmcs/ChangeLog | 4 ++++ mcs/gmcs/rootcontext.cs | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mcs/gmcs/ChangeLog b/mcs/gmcs/ChangeLog index 3fda0d62576..778838abfa1 100644 --- a/mcs/gmcs/ChangeLog +++ b/mcs/gmcs/ChangeLog @@ -1,3 +1,7 @@ +2006-03-26 Marek Safar + + * rootcontext.cs (ResolveCore): Removed System.INullableValue. + 2006-03-23 Martin Baulig * expression.cs (Is.DoResolve, As.DoResolve): Perform a dynamic diff --git a/mcs/gmcs/rootcontext.cs b/mcs/gmcs/rootcontext.cs index 832efc12bfe..c392e8b8101 100644 --- a/mcs/gmcs/rootcontext.cs +++ b/mcs/gmcs/rootcontext.cs @@ -323,8 +323,7 @@ namespace Mono.CSharp { // Generic types // "System.Collections.Generic.IEnumerator`1", - "System.Collections.Generic.IEnumerable`1", - "System.INullableValue" + "System.Collections.Generic.IEnumerable`1" }; foreach (string iname in interfaces_first_stage) -- cgit v1.2.3 From b430ddbd1db8bda54f7b382ed09148104245cdac Mon Sep 17 00:00:00 2001 From: Alexander Olk Date: Sun, 26 Mar 2006 12:12:22 +0000 Subject: * ControlPaint.cs: Corrected line widths in DrawBorder for ButtonBorderStyle Inset and Outset 2006-03-25 Alexander Olk svn path=/trunk/mcs/; revision=58541 --- .../Managed.Windows.Forms/System.Windows.Forms/ChangeLog | 5 +++++ .../System.Windows.Forms/ControlPaint.cs | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index 8d4ad43901a..7bb12e09d27 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,8 @@ +2006-03-25 Alexander Olk + + * ControlPaint.cs: Corrected line widths in DrawBorder for + ButtonBorderStyle Inset and Outset + 2006-03-25 Alexander Olk * ThemeWin32Classic.cs: diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ControlPaint.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ControlPaint.cs index 634c3b1d53f..77251c49607 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ControlPaint.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ControlPaint.cs @@ -262,7 +262,17 @@ namespace System.Windows.Forms { } public static void DrawBorder(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style) { - DrawBorder(graphics, bounds, color, 1, style, color, 1, style, color, 1, style, color, 1, style); + int line_width_top_left = 1; + int line_width_bottom_right = 1; + + if (style == ButtonBorderStyle.Inset) + line_width_top_left = 2; + if (style == ButtonBorderStyle.Outset) { + line_width_bottom_right = 2; + line_width_top_left = 2; + } + + DrawBorder(graphics, bounds, color, line_width_top_left, style, color, line_width_top_left, style, color, line_width_bottom_right, style, color, line_width_bottom_right, style); } public static void DrawBorder( Graphics graphics, Rectangle bounds, Color leftColor, int leftWidth, -- cgit v1.2.3 From 183a50b6f3d69bd7c4e1c9c10b178e906ceb97f9 Mon Sep 17 00:00:00 2001 From: Alexander Olk Date: Sun, 26 Mar 2006 13:28:38 +0000 Subject: * ThemeWin32Classic.cs: - GroupBox: Inserted a little gap between the text and the lines on the right side - Made the code in CPDrawBorder3D more readable - Corrected the drawing location of the up and down arrows in CPDrawScrollButton 2006-03-25 Alexander Olk svn path=/trunk/mcs/; revision=58542 --- .../System.Windows.Forms/ChangeLog | 9 +++ .../System.Windows.Forms/ThemeWin32Classic.cs | 68 ++++++++++++++++------ 2 files changed, 58 insertions(+), 19 deletions(-) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index 7bb12e09d27..d1ef9d397cf 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,12 @@ +2006-03-25 Alexander Olk + + * ThemeWin32Classic.cs: + - GroupBox: Inserted a little gap between the text and the lines + on the right side + - Made the code in CPDrawBorder3D more readable + - Corrected the drawing location of the up and down arrows in + CPDrawScrollButton + 2006-03-25 Alexander Olk * ControlPaint.cs: Corrected line widths in DrawBorder for diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs index 59d45080798..f0bda348a15 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs @@ -1267,7 +1267,7 @@ namespace System.Windows.Forms text_format.HotkeyPrefix = HotkeyPrefix.Show; size = dc.MeasureString (box.Text, box.Font); - width = (int) size.Width; + width = ((int) size.Width) + 7; if (width > box.Width - 16) width = box.Width - 16; @@ -4264,35 +4264,43 @@ namespace System.Windows.Forms penTopLeft = penTopLeftInner = penBottomRight = penBottomRightInner = ResPool.GetPen (control_color); - if (style == Border3DStyle.Raised) { + switch (style) { + case Border3DStyle.Raised: penTopLeftInner = ResPool.GetPen (ControlPaint.LightLight (control_color)); penBottomRight = ResPool.GetPen (ControlPaint.DarkDark (control_color)); penBottomRightInner = ResPool.GetPen (ColorInactiveCaption); - } else if (style == Border3DStyle.Sunken) { + break; + case Border3DStyle.Sunken: penTopLeft = ResPool.GetPen (ColorInactiveCaption); penTopLeftInner = ResPool.GetPen (ControlPaint.DarkDark (control_color)); penBottomRight = ResPool.GetPen (ControlPaint.LightLight (control_color)); - } else if (style == Border3DStyle.Etched) { - penTopLeft = ResPool.GetPen (ColorInactiveCaption); - penTopLeftInner = ResPool.GetPen (ControlPaint.LightLight (control_color)); - penBottomRight = ResPool.GetPen (ControlPaint.LightLight (control_color)); - penBottomRightInner = ResPool.GetPen (ColorInactiveCaption); - } else if (style == Border3DStyle.RaisedOuter) { + break; + case Border3DStyle.Etched: + penTopLeft = penBottomRightInner = ResPool.GetPen (ColorInactiveCaption); + penTopLeftInner = penBottomRight = ResPool.GetPen (ControlPaint.LightLight (control_color)); + break; + case Border3DStyle.RaisedOuter: penBottomRight = ResPool.GetPen (ControlPaint.DarkDark (control_color)); - } else if (style == Border3DStyle.SunkenOuter) { + break; + case Border3DStyle.SunkenOuter: penTopLeft = ResPool.GetPen (ColorInactiveCaption); penBottomRight = ResPool.GetPen (ControlPaint.LightLight (control_color)); - } else if (style == Border3DStyle.RaisedInner) { + break; + case Border3DStyle.RaisedInner: penTopLeft = ResPool.GetPen (ControlPaint.LightLight (control_color)); penBottomRight = ResPool.GetPen (ColorInactiveCaption); - } else if (style == Border3DStyle.SunkenInner) { + break; + case Border3DStyle.SunkenInner: penTopLeft = ResPool.GetPen (ControlPaint.DarkDark (control_color)); - } else if (style == Border3DStyle.Flat) { - penTopLeft = ResPool.GetPen (ColorInactiveCaption); - penBottomRight = ResPool.GetPen (ColorInactiveCaption); - } else if (style == Border3DStyle.Bump) { - penTopLeftInner = ResPool.GetPen (ControlPaint.DarkDark (control_color)); - penBottomRight = ResPool.GetPen (ControlPaint.DarkDark (control_color)); + break; + case Border3DStyle.Flat: + penTopLeft = penBottomRight = ResPool.GetPen (ColorInactiveCaption); + break; + case Border3DStyle.Bump: + penTopLeftInner = penBottomRight = ResPool.GetPen (ControlPaint.DarkDark (control_color)); + break; + default: + break; } if ((sides & Border3DSide.Middle) != 0) { @@ -4827,8 +4835,21 @@ namespace System.Windows.Forms public override void CPDrawScrollButton (Graphics dc, Rectangle area, ScrollButton type, ButtonState state) { DrawScrollButtonPrimitive (dc, area, state); + int arrow_y_pos_diff = 3; + + switch (type) { + case ScrollButton.Up: + arrow_y_pos_diff = 2; + break; + case ScrollButton.Down: + arrow_y_pos_diff = 4; + break; + default: + break; + } + // A lot of the following is adapted from the rewind project - Rectangle rect = new Rectangle (area.X - 3, area.Y - 3, + Rectangle rect = new Rectangle (area.X - 3, area.Y - arrow_y_pos_diff, area.Width + 6, area.Height + 6); int small_diam = rect.Width > rect.Height ? rect.Height : rect.Width; if (rect.Width < rect.Height) { @@ -4874,6 +4895,15 @@ namespace System.Windows.Forms arrow [1].Y = arrow [2].Y + tri; arrow [0].X = arrow [1].X = arrow [2].X + tri; break; + // Left and Right are not drawn correctly because of libgdiplus problems + // once that is solved change it to the code below to match ms +// case ScrollButton.Left: +// arrow [2].X = rect.Right - (687 * small_diam / 1000 + 1); +// arrow [2].Y = (rect.Top + 470 * small_diam / 1000 + 2) - 1; +// arrow [1].Y = arrow [2].Y + tri; +// arrow [0].Y = arrow [2].Y - tri + 1; +// arrow [0].X = arrow [1].X = arrow [2].X + tri; +// break; case ScrollButton.Right: arrow [2].X = rect.Left + 687 * small_diam / 1000 + 1; arrow [2].Y = rect.Top + 470 * small_diam / 1000 + 2; -- cgit v1.2.3 From 72c9026bac876b7e0ef78e93c9a2bcc8b48f342e Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Sun, 26 Mar 2006 13:43:58 +0000 Subject: *** merged revision 57555 from mcs svn path=/trunk/mcs/; revision=58544 --- mcs/errors/known-issues-gmcs | 1 - mcs/gmcs/ChangeLog | 18 +++++++++++++++ mcs/gmcs/attribute.cs | 39 +++++-------------------------- mcs/gmcs/class.cs | 28 ++++++++++------------ mcs/gmcs/decl.cs | 21 ----------------- mcs/gmcs/delegate.cs | 4 +--- mcs/gmcs/ecore.cs | 55 ++++++++++++++++++++++++++------------------ mcs/gmcs/enum.cs | 2 +- mcs/gmcs/expression.cs | 32 ++++++++++++++++++-------- mcs/gmcs/generic.cs | 15 +++++++++--- mcs/gmcs/parameter.cs | 2 +- mcs/gmcs/rootcontext.cs | 2 ++ mcs/gmcs/statement.cs | 8 +++---- mcs/gmcs/typemanager.cs | 8 ++----- 14 files changed, 114 insertions(+), 121 deletions(-) diff --git a/mcs/errors/known-issues-gmcs b/mcs/errors/known-issues-gmcs index 2d9a180a079..ec7b207c8e2 100644 --- a/mcs/errors/known-issues-gmcs +++ b/mcs/errors/known-issues-gmcs @@ -51,7 +51,6 @@ gcs0146.cs gcs0305-2.cs gcs0305.cs gcs0308.cs -cs1547-3.cs cs0553-2.cs cs1669-2.cs NO ERROR cs1677.cs diff --git a/mcs/gmcs/ChangeLog b/mcs/gmcs/ChangeLog index 778838abfa1..0481f20232c 100644 --- a/mcs/gmcs/ChangeLog +++ b/mcs/gmcs/ChangeLog @@ -1,3 +1,21 @@ +2006-03-03 Marek Safar + + * attribute.cs (ResolveAsTypeTerminal): Removed. + + * ecore.cs (Expression.ResolveAsTypeTerminal): Make virtual to allow + specialization for predefined types; 30% speed up. + Finally placed obsolete check to right place. + (Expression.ResolveType): Removed. + + * enum.cs, expression.cs, parameter.cs, statement.cs, typemanager.cs: + Updated after ResolveType was removed. + + * expression.cs (Cast.ctor): Check void cast. + (Binary.ResolveAsTypeTerminal): Is never type. + (Conditional.ResolveAsTypeTerminal): Is never type. + + * rootcontext.cs (ResolveCore): Set base type to simplify some code later. + 2006-03-26 Marek Safar * rootcontext.cs (ResolveCore): Removed System.INullableValue. diff --git a/mcs/gmcs/attribute.cs b/mcs/gmcs/attribute.cs index 7b352e52b98..8c7315b64e3 100644 --- a/mcs/gmcs/attribute.cs +++ b/mcs/gmcs/attribute.cs @@ -171,37 +171,22 @@ namespace Mono.CSharp { Error_AttributeEmitError ("it is attached to invalid parent"); } - protected virtual FullNamedExpression ResolveAsTypeTerminal (Expression expr, EmitContext ec, bool silent) + protected virtual TypeExpr ResolveAsTypeTerminal (Expression expr, IResolveContext ec, bool silent) { return expr.ResolveAsTypeTerminal (ec, silent); } - protected virtual FullNamedExpression ResolveAsTypeStep (Expression expr, EmitContext ec, bool silent) - { - return expr.ResolveAsTypeStep (ec, silent); - } - Type ResolvePossibleAttributeType (string name, bool silent, ref bool is_attr) { - // It will disapear when IResolveContext will take a place - DeclSpace container = owner.ResolveContext.DeclContainer; - if (owner is TypeParameter) - container = ((TypeParameter)owner).DeclSpace; - EmitContext ec = new EmitContext (owner.ResolveContext, container, container, - Location, null, null, container.ModFlags, false); - // + IResolveContext rc = owner.ResolveContext; - FullNamedExpression fn; + TypeExpr te; if (LeftExpr == null) { - fn = ResolveAsTypeTerminal (new SimpleName (name, Location), ec, silent); + te = ResolveAsTypeTerminal (new SimpleName (name, Location), rc, silent); } else { - fn = ResolveAsTypeStep (LeftExpr, ec, silent); - if (fn == null) - return null; - fn = new MemberAccess (fn, name, Location).ResolveAsTypeTerminal (ec, silent); + te = ResolveAsTypeTerminal (new MemberAccess (LeftExpr, name, Location), rc, silent); } - TypeExpr te = fn as TypeExpr; if (te == null) return null; @@ -1368,19 +1353,7 @@ namespace Mono.CSharp { RootContext.Tree.Types.NamespaceEntry = null; } - protected override FullNamedExpression ResolveAsTypeStep (Expression expr, EmitContext ec, bool silent) - { - try { - Enter (); - return base.ResolveAsTypeStep (expr, ec, silent); - } - finally { - Leave (); - } - } - - - protected override FullNamedExpression ResolveAsTypeTerminal (Expression expr, EmitContext ec, bool silent) + protected override TypeExpr ResolveAsTypeTerminal (Expression expr, IResolveContext ec, bool silent) { try { Enter (); diff --git a/mcs/gmcs/class.cs b/mcs/gmcs/class.cs index 7dea31c34b4..d53b0db38a1 100644 --- a/mcs/gmcs/class.cs +++ b/mcs/gmcs/class.cs @@ -1014,7 +1014,7 @@ namespace Mono.CSharp { int start = 0, i, j; if (Kind == Kind.Class){ - TypeExpr name = ResolveBaseTypeExpr ((Expression) Bases [0]); + TypeExpr name = ((Expression) Bases [0]).ResolveAsBaseTerminal (this, false); if (name == null){ return null; @@ -1031,7 +1031,7 @@ namespace Mono.CSharp { TypeExpr [] ifaces = new TypeExpr [count-start]; for (i = start, j = 0; i < count; i++, j++){ - TypeExpr resolved = ResolveBaseTypeExpr ((Expression) Bases [i]); + TypeExpr resolved = ((Expression) Bases [i]).ResolveAsTypeTerminal (this, false); if (resolved == null) { return null; } @@ -1236,10 +1236,6 @@ namespace Mono.CSharp { RootContext.RegisterOrder (this); if (base_type != null) { - base_type = base_type.ResolveAsTypeTerminal (this, false); - if (base_type == null) - return false; - if (IsGeneric && TypeManager.IsAttributeType (base_type.Type)) { Report.Error (698, base_type.Location, "A generic type cannot derive from `{0}' " + @@ -1249,7 +1245,11 @@ namespace Mono.CSharp { } TypeBuilder.SetParent (base_type.Type); - CheckObsoleteType (base_type); + + ObsoleteAttribute obsolete_attr = AttributeTester.GetObsoleteAttribute (base_type.Type); + if (obsolete_attr != null && !IsInObsoleteScope) { + AttributeTester.Report_ObsoleteMessage (obsolete_attr, base_type.GetSignatureForError (), Location); + } } if (!CheckRecursiveDefinition (this)) { @@ -1258,7 +1258,7 @@ namespace Mono.CSharp { // add interfaces that were not added at type creation if (iface_exprs != null) { - ifaces = TypeManager.ExpandInterfaces (this, iface_exprs); + ifaces = TypeManager.ExpandInterfaces (iface_exprs); if (ifaces == null) { return false; } @@ -1353,7 +1353,7 @@ namespace Mono.CSharp { public bool ResolveType () { if ((base_type != null) && - (base_type.ResolveType (this) == null)) { + (base_type.ResolveAsTypeTerminal (this, false) == null)) { error = true; return false; } @@ -1404,7 +1404,7 @@ namespace Mono.CSharp { return false; } - CurrentType = current_type.ResolveType (this); + CurrentType = current_type.Type; } return true; @@ -5121,7 +5121,7 @@ namespace Mono.CSharp { if (iface_texpr == null) return false; - InterfaceType = iface_texpr.ResolveType (this); + InterfaceType = iface_texpr.Type; if (!InterfaceType.IsInterface) { Report.Error (538, Location, "'{0}' in explicit interface declaration is not an interface", TypeManager.CSharpName (InterfaceType)); @@ -5142,8 +5142,6 @@ namespace Mono.CSharp { if (MemberType == null) return false; - CheckObsoleteType (Type); - if ((Parent.ModFlags & Modifiers.SEALED) != 0 && (ModFlags & (Modifiers.VIRTUAL|Modifiers.ABSTRACT)) != 0) { Report.Error (549, Location, "New virtual member `{0}' is declared in a sealed class `{1}'", @@ -5190,7 +5188,7 @@ namespace Mono.CSharp { if (texpr == null) return false; - InterfaceType = texpr.ResolveType (this); + InterfaceType = texpr.Type; if (!InterfaceType.IsInterface) { Report.Error (538, Location, "`{0}' in explicit interface declaration is not an interface", TypeManager.CSharpName (InterfaceType)); @@ -5427,8 +5425,6 @@ namespace Mono.CSharp { if (MemberType == null || Type == null) return false; - CheckObsoleteType (Type); - if (MemberType == TypeManager.void_type) { Report.Error (1547, Location, "Keyword 'void' cannot be used in this context"); return false; diff --git a/mcs/gmcs/decl.cs b/mcs/gmcs/decl.cs index 32ec23a8b7a..827143e9821 100644 --- a/mcs/gmcs/decl.cs +++ b/mcs/gmcs/decl.cs @@ -466,18 +466,6 @@ namespace Mono.CSharp { AttributeTester.Report_ObsoleteMessage (oa, GetSignatureForError (), loc); } - protected void CheckObsoleteType (Expression type) - { - ObsoleteAttribute obsolete_attr = AttributeTester.GetObsoleteAttribute (type.Type); - if (obsolete_attr == null) - return; - - if (IsInObsoleteScope) - return; - - AttributeTester.Report_ObsoleteMessage (obsolete_attr, TypeManager.CSharpName (type.Type), type.Location); - } - /// /// Analyze whether CLS-Compliant verification must be execute for this MemberCore. /// @@ -843,15 +831,6 @@ namespace Mono.CSharp { // Parent.GetSignatureForError return Name; } - - // - // Resolves the expression `e' for a type, and will recursively define - // types. This should only be used for resolving base types. - // - protected TypeExpr ResolveBaseTypeExpr (Expression e) - { - return e.ResolveAsTypeTerminal (this, false); - } public bool CheckAccessLevel (Type check_type) { diff --git a/mcs/gmcs/delegate.cs b/mcs/gmcs/delegate.cs index 77db0a961f4..c6a22440ddc 100644 --- a/mcs/gmcs/delegate.cs +++ b/mcs/gmcs/delegate.cs @@ -87,7 +87,7 @@ namespace Mono.CSharp { if (TypeManager.multicast_delegate_type == null && !RootContext.StdLib) { Namespace system = RootNamespace.Global.GetNamespace ("System", true); TypeExpr expr = system.Lookup (this, "MulticastDelegate", Location) as TypeExpr; - TypeManager.multicast_delegate_type = expr.ResolveType (this); + TypeManager.multicast_delegate_type = expr.Type; } if (TypeManager.multicast_delegate_type == null) @@ -216,8 +216,6 @@ namespace Mono.CSharp { if (ret_type == null) return false; - CheckObsoleteType (ReturnType); - if (!Parent.AsAccessible (ret_type, ModFlags)) { Report.Error (58, Location, "Inconsistent accessibility: return type `" + diff --git a/mcs/gmcs/ecore.cs b/mcs/gmcs/ecore.cs index 509d7634e37..0e3b9d8c0f6 100644 --- a/mcs/gmcs/ecore.cs +++ b/mcs/gmcs/ecore.cs @@ -234,6 +234,19 @@ namespace Mono.CSharp { // reference // public virtual TypeExpr ResolveAsTypeTerminal (IResolveContext ec, bool silent) + { + TypeExpr te = ResolveAsBaseTerminal (ec, silent); + if (te == null) + return null; + + ObsoleteAttribute obsolete_attr = AttributeTester.GetObsoleteAttribute (te.Type); + if (obsolete_attr != null && !ec.IsInObsoleteScope) { + AttributeTester.Report_ObsoleteMessage (obsolete_attr, GetSignatureForError (), Location); + } + return te; + } + + public TypeExpr ResolveAsBaseTerminal (IResolveContext ec, bool silent) { int errors = Report.Errors; @@ -2321,20 +2334,6 @@ namespace Mono.CSharp { protected abstract TypeExpr DoResolveAsTypeStep (IResolveContext ec); - public Type ResolveType (IResolveContext ec) - { - TypeExpr t = ResolveAsTypeTerminal (ec, false); - if (t == null) - return null; - - ObsoleteAttribute obsolete_attr = AttributeTester.GetObsoleteAttribute (t.Type); - if (obsolete_attr != null && !ec.IsInObsoleteScope) { - AttributeTester.Report_ObsoleteMessage (obsolete_attr, Name, Location); - } - - return t.Type; - } - public abstract string Name { get; } @@ -2375,6 +2374,11 @@ namespace Mono.CSharp { return this; } + public override TypeExpr ResolveAsTypeTerminal (IResolveContext ec, bool silent) + { + return this; + } + public override string Name { get { return Type.ToString (); } } @@ -2389,20 +2393,27 @@ namespace Mono.CSharp { /// by the parser to setup the core types. A TypeLookupExpression is always /// classified as a type. /// - public class TypeLookupExpression : TypeExpr { - string name; + public sealed class TypeLookupExpression : TypeExpr { + readonly string name; public TypeLookupExpression (string name) { this.name = name; + eclass = ExprClass.Type; + } + + public override TypeExpr ResolveAsTypeTerminal (IResolveContext ec, bool silent) + { + // It's null for corlib compilation only + if (type == null) + return DoResolveAsTypeStep (ec); + + return this; } static readonly char [] dot_array = { '.' }; protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec) { - if (type != null) - return this; - // If name is of the form `N.I', first lookup `N', then search a member `I' in it. string rest = null; string lookup_name = name; @@ -2454,7 +2465,7 @@ namespace Mono.CSharp { return null; } - type = ((TypeExpr) resolved).ResolveType (ec); + type = resolved.Type; return this; } @@ -2541,7 +2552,7 @@ namespace Mono.CSharp { if (texpr == null) return null; - Type type = texpr.ResolveType (ec); + Type type = texpr.Type; int num_args = TypeManager.GetNumberOfTypeArguments (type); if (args != null) { @@ -2563,7 +2574,7 @@ namespace Mono.CSharp { return null; } - return new TypeExpression (type, loc); + return texpr; } public override bool CheckAccessLevel (DeclSpace ds) diff --git a/mcs/gmcs/enum.cs b/mcs/gmcs/enum.cs index 0cf0cd6ea5f..54570d9d8c3 100644 --- a/mcs/gmcs/enum.cs +++ b/mcs/gmcs/enum.cs @@ -248,7 +248,7 @@ namespace Mono.CSharp { return null; } - TypeExpr ute = ResolveBaseTypeExpr (BaseType); + TypeExpr ute = BaseType.ResolveAsTypeTerminal (this, false); UnderlyingType = ute.Type; if (UnderlyingType != TypeManager.int32_type && diff --git a/mcs/gmcs/expression.cs b/mcs/gmcs/expression.cs index 2f842e4fe09..32dce23aa97 100644 --- a/mcs/gmcs/expression.cs +++ b/mcs/gmcs/expression.cs @@ -1055,8 +1055,6 @@ namespace Mono.CSharp { probe_type_expr = ProbeType.ResolveAsTypeTerminal (ec, false); if (probe_type_expr == null) return null; - if (probe_type_expr.ResolveType (ec) == null) - return null; expr = expr.Resolve (ec); if (expr == null) @@ -1327,6 +1325,10 @@ namespace Mono.CSharp { this.target_type = cast_type; this.expr = expr; this.loc = loc; + + if (target_type == TypeManager.system_void_expr) { + Report.Error (1547, loc, "Keyword `void' cannot be used in this context"); + } } public Expression TargetType { @@ -1368,7 +1370,7 @@ namespace Mono.CSharp { if (target == null) return null; - type = target.ResolveType (ec); + type = target.Type; if (type.IsAbstract && type.IsSealed) { Report.Error (716, loc, "Cannot convert to static type `{0}'", TypeManager.CSharpName (type)); @@ -2504,6 +2506,11 @@ namespace Mono.CSharp { return ResolveOperator (ec); } + public override TypeExpr ResolveAsTypeTerminal (IResolveContext ec, bool silent) + { + return null; + } + private void CheckUselessComparison (Constant c, Type type) { if (c == null || !IsTypeIntegral (type) @@ -3440,6 +3447,11 @@ namespace Mono.CSharp { return this; } + public override TypeExpr ResolveAsTypeTerminal (IResolveContext ec, bool silent) + { + return null; + } + public override void Emit (EmitContext ec) { ILGenerator ig = ec.ig; @@ -5899,7 +5911,7 @@ namespace Mono.CSharp { if (texpr == null) return null; - type = texpr.ResolveType (ec); + type = texpr.Type; if (Arguments == null) { Expression c = Constantify (type); @@ -6387,7 +6399,7 @@ namespace Mono.CSharp { if (array_type_expr == null) return false; - type = array_type_expr.ResolveType (ec); + type = array_type_expr.Type; underlying_type = TypeManager.GetElementType (type); dimensions = type.GetArrayRank (); @@ -7123,7 +7135,7 @@ namespace Mono.CSharp { if (texpr == null) return null; - typearg = texpr.ResolveType (ec); + typearg = texpr.Type; if (typearg == TypeManager.void_type) { Error (673, "System.Void cannot be used from C#. Use typeof (void) to get the void type object"); @@ -7198,7 +7210,7 @@ namespace Mono.CSharp { return null; } - type_queried = texpr.ResolveType (ec); + type_queried = texpr.Type; int size_of = GetTypeSize (type_queried); if (size_of > 0) { @@ -7498,7 +7510,7 @@ namespace Mono.CSharp { if (tnew_expr == null) return null; - Type expr_type = tnew_expr.ResolveType (rc); + Type expr_type = tnew_expr.Type; if (expr_type.IsPointer){ Error (23, "The `.' operator can not be applied to pointer operands (" + @@ -8806,7 +8818,7 @@ namespace Mono.CSharp { if (lexpr == null) return null; - Type ltype = lexpr.ResolveType (ec); + Type ltype = lexpr.Type; if ((ltype == TypeManager.void_type) && (dim != "*")) { Report.Error (1547, Location, "Keyword 'void' cannot be used in this context"); @@ -8988,7 +9000,7 @@ namespace Mono.CSharp { if (texpr == null) return null; - otype = texpr.ResolveType (ec); + otype = texpr.Type; if (!TypeManager.VerifyUnManaged (otype, loc)) return null; diff --git a/mcs/gmcs/generic.cs b/mcs/gmcs/generic.cs index 2ce534aa021..113388a0a14 100644 --- a/mcs/gmcs/generic.cs +++ b/mcs/gmcs/generic.cs @@ -390,13 +390,17 @@ namespace Mono.CSharp { return false; } - foreach (TypeExpr iface_constraint in iface_constraints) { - if (iface_constraint.ResolveType (ec) == null) + for (int i = 0; i < iface_constraints.Count; ++i) { + TypeExpr iface_constraint = (TypeExpr) iface_constraints [i]; + iface_constraint = iface_constraint.ResolveAsTypeTerminal (ec, false); + if (iface_constraint == null) return false; + iface_constraints [i] = iface_constraint; } if (class_constraint != null) { - if (class_constraint.ResolveType (ec) == null) + class_constraint = class_constraint.ResolveAsTypeTerminal (ec, false); + if (class_constraint == null) return false; } @@ -596,6 +600,11 @@ namespace Mono.CSharp { } } + // FIXME: This should be removed once we fix the handling of RootContext.Tree.Types + public override DeclSpace DeclContainer { + get { return DeclSpace; } + } + /// /// This is the first method which is called during the resolving /// process; we're called immediately after creating the type parameters diff --git a/mcs/gmcs/parameter.cs b/mcs/gmcs/parameter.cs index 93d7da083c5..940043e35d9 100644 --- a/mcs/gmcs/parameter.cs +++ b/mcs/gmcs/parameter.cs @@ -294,7 +294,7 @@ namespace Mono.CSharp { if (tparam != null) constraints = tparam.TypeParameter.Constraints; - parameter_type = texpr.ResolveType (ec); + parameter_type = texpr.Type; if (parameter_type.IsAbstract && parameter_type.IsSealed) { Report.Error (721, Location, "`{0}': static types cannot be used as parameters", GetSignatureForError ()); diff --git a/mcs/gmcs/rootcontext.cs b/mcs/gmcs/rootcontext.cs index c392e8b8101..f5ad0c98a62 100644 --- a/mcs/gmcs/rootcontext.cs +++ b/mcs/gmcs/rootcontext.cs @@ -298,7 +298,9 @@ namespace Mono.CSharp { TypeContainer root = Tree.Types; TypeManager.object_type = BootstrapCorlib_ResolveClass (root, "System.Object"); + TypeManager.system_object_expr.Type = TypeManager.object_type; TypeManager.value_type = BootstrapCorlib_ResolveClass (root, "System.ValueType"); + TypeManager.system_valuetype_expr.Type = TypeManager.value_type; TypeManager.attribute_type = BootstrapCorlib_ResolveClass (root, "System.Attribute"); TypeManager.indexer_name_type = BootstrapCorlib_ResolveClass (root, "System.Runtime.CompilerServices.IndexerNameAttribute"); diff --git a/mcs/gmcs/statement.cs b/mcs/gmcs/statement.cs index 27e4d61d75a..565d84bc3a6 100644 --- a/mcs/gmcs/statement.cs +++ b/mcs/gmcs/statement.cs @@ -1051,7 +1051,7 @@ namespace Mono.CSharp { if (texpr == null) return false; - VariableType = texpr.ResolveType (ec); + VariableType = texpr.Type; } if (VariableType == TypeManager.void_type) { @@ -3365,7 +3365,7 @@ namespace Mono.CSharp { if (texpr == null) return false; - expr_type = texpr.ResolveType (ec); + expr_type = texpr.Type; data = new Emitter [declarators.Count]; @@ -3590,7 +3590,7 @@ namespace Mono.CSharp { if (te == null) return false; - type = te.ResolveType (ec); + type = te.Type; if (type != TypeManager.exception_type && !type.IsSubclassOf (TypeManager.exception_type)){ Error (155, "The type caught or thrown must be derived from System.Exception"); @@ -3829,7 +3829,7 @@ namespace Mono.CSharp { if (texpr == null) return false; - expr_type = texpr.ResolveType (ec); + expr_type = texpr.Type; // // The type must be an IDisposable or an implicit conversion diff --git a/mcs/gmcs/typemanager.cs b/mcs/gmcs/typemanager.cs index 221989a2d03..b8f82781aad 100644 --- a/mcs/gmcs/typemanager.cs +++ b/mcs/gmcs/typemanager.cs @@ -2035,16 +2035,12 @@ public partial class TypeManager { /// This expands in context like: IA; IB : IA; IC : IA, IB; the interface "IC" to /// be IA, IB, IC. /// - public static Type[] ExpandInterfaces (IResolveContext ec, TypeExpr [] base_interfaces) + public static Type[] ExpandInterfaces (TypeExpr [] base_interfaces) { ArrayList new_ifaces = new ArrayList (); foreach (TypeExpr iface in base_interfaces){ - TypeExpr texpr = iface.ResolveAsTypeTerminal (ec, false); - if (texpr == null) - return null; - - Type itype = texpr.ResolveType (ec); + Type itype = iface.Type; if (new_ifaces.Contains (itype)) continue; -- cgit v1.2.3 From 7b6c70b9443a18b1a5207e3c795a2f4089c2a9ea Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Sun, 26 Mar 2006 14:18:32 +0000 Subject: 2006-03-26 Marek Safar A fix for #75813. * class.cs (Constructor.Define): Removed extra if for default ctors. A patch from Atsushi Enomoto. svn path=/trunk/mcs/; revision=58545 --- mcs/errors/cs0122-18.cs | 20 ++++++++++++++++++++ mcs/mcs/ChangeLog | 7 +++++++ mcs/mcs/class.cs | 2 -- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 mcs/errors/cs0122-18.cs diff --git a/mcs/errors/cs0122-18.cs b/mcs/errors/cs0122-18.cs new file mode 100644 index 00000000000..7c0f30f8583 --- /dev/null +++ b/mcs/errors/cs0122-18.cs @@ -0,0 +1,20 @@ +// cs0122-18.cs: `Test.TestClass.TestClass()' is inaccessible due to its protection level +// Line: 17 + +namespace Test +{ + public class TestClass + { + private TestClass() : base() + { + } + } + + class Class1 + { + static void Main(string[] args) + { + TestClass test = new TestClass(); + } + } +} \ No newline at end of file diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index fa1b5c26770..f440a4a5b69 100644 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,3 +1,10 @@ +2006-03-26 Marek Safar + + A fix for #75813. + + * class.cs (Constructor.Define): Removed extra if for default ctors. + A patch from Atsushi Enomoto. + 2006-03-26 Marek Safar * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to diff --git a/mcs/mcs/class.cs b/mcs/mcs/class.cs index 2f5f8a950fe..f65d2b8d6fd 100644 --- a/mcs/mcs/class.cs +++ b/mcs/mcs/class.cs @@ -4120,8 +4120,6 @@ namespace Mono.CSharp { ca |= MethodAttributes.Family; } else if ((ModFlags & Modifiers.INTERNAL) != 0) ca |= MethodAttributes.Assembly; - else if (IsDefault ()) - ca |= MethodAttributes.Public; else ca |= MethodAttributes.Private; } -- cgit v1.2.3 From bc456af28ae5abcf0ea6c4932cb4aaf2b7db1295 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Sun, 26 Mar 2006 16:07:02 +0000 Subject: Fixed tests. svn path=/trunk/mcs/; revision=58547 --- mcs/tests/test-286.cs | 2 +- mcs/tests/test-304.cs | 2 +- mcs/tests/test-305.cs | 2 +- mcs/tests/test-306.cs | 2 +- mcs/tests/test-307.cs | 4 ++-- mcs/tests/test-353.cs | 2 +- mcs/tests/test-361.cs | 2 +- mcs/tests/test-388.cs | 2 +- mcs/tests/test-389.cs | 2 +- mcs/tests/test-xml-035.cs | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mcs/tests/test-286.cs b/mcs/tests/test-286.cs index a11aacfa6fb..d7c0d033886 100644 --- a/mcs/tests/test-286.cs +++ b/mcs/tests/test-286.cs @@ -1,4 +1,4 @@ -// Compiler options: -r:System.Xml +// Compiler options: -r:System.Xml.dll abstract class MethodWrapper { diff --git a/mcs/tests/test-304.cs b/mcs/tests/test-304.cs index 320d135eb37..79a86fa217d 100644 --- a/mcs/tests/test-304.cs +++ b/mcs/tests/test-304.cs @@ -6,7 +6,7 @@ using C = A.D; class A { - class D { } + internal class D { } public class B { class C { } diff --git a/mcs/tests/test-305.cs b/mcs/tests/test-305.cs index 7fd7fc11d63..7f170f3aed3 100644 --- a/mcs/tests/test-305.cs +++ b/mcs/tests/test-305.cs @@ -8,7 +8,7 @@ using S = A.T; class A { [StructLayout (LayoutKind.Sequential)] - struct T { int x; } + public struct T { int x; } public class B { diff --git a/mcs/tests/test-306.cs b/mcs/tests/test-306.cs index 6dd09cdbd47..9d7627b239b 100644 --- a/mcs/tests/test-306.cs +++ b/mcs/tests/test-306.cs @@ -4,7 +4,7 @@ using C = A.D; class A { - class D : Exception { } + protected internal class D : Exception { } public class B { diff --git a/mcs/tests/test-307.cs b/mcs/tests/test-307.cs index 3f4d2f4ed34..8958075a4da 100644 --- a/mcs/tests/test-307.cs +++ b/mcs/tests/test-307.cs @@ -2,9 +2,9 @@ using System; using C = A.D; -class A +public class A { - class D : IDisposable + public class D : IDisposable { void IDisposable.Dispose () { throw new Exception ("'using' and 'new' didn't resolve C as A+B+C"); } } diff --git a/mcs/tests/test-353.cs b/mcs/tests/test-353.cs index 5aa753fdc2d..e7d59d99022 100644 --- a/mcs/tests/test-353.cs +++ b/mcs/tests/test-353.cs @@ -1,4 +1,4 @@ -// Compiler options: support-353.cs -out:test-353.exe +// Compiler options: support-353.cs using System; diff --git a/mcs/tests/test-361.cs b/mcs/tests/test-361.cs index c3b712e5c7d..473448dda8c 100644 --- a/mcs/tests/test-361.cs +++ b/mcs/tests/test-361.cs @@ -1,4 +1,4 @@ -// Compiler options: support-361.cs -out:test-361.exe +// Compiler options: support-361.cs [X] class Test { diff --git a/mcs/tests/test-388.cs b/mcs/tests/test-388.cs index 7110eb4ab34..4b48d6d4a95 100644 --- a/mcs/tests/test-388.cs +++ b/mcs/tests/test-388.cs @@ -1,6 +1,6 @@ // This is used to debug an ordering dependent bug. // -// Compiler options: support-388.cs -out:test-388.exe +// Compiler options: support-388.cs namespace Schemas { [System.Xml.Serialization.XmlType("base-field-type"), diff --git a/mcs/tests/test-389.cs b/mcs/tests/test-389.cs index 22a13cffa82..f96b0f54b94 100644 --- a/mcs/tests/test-389.cs +++ b/mcs/tests/test-389.cs @@ -1,6 +1,6 @@ // This is used to debug an ordering dependent bug. // -// Compiler options: support-389.cs -out:test-389.exe +// Compiler options: support-389.cs using System; using System.Collections; diff --git a/mcs/tests/test-xml-035.cs b/mcs/tests/test-xml-035.cs index f94458e7c72..ec321712c9a 100644 --- a/mcs/tests/test-xml-035.cs +++ b/mcs/tests/test-xml-035.cs @@ -1,4 +1,4 @@ -// Compiler options: -doc:xml-035.xml -warn:4 -warnaserror -r:System.Data +// Compiler options: -doc:xml-035.xml -warn:4 -warnaserror -r:System.Data.dll using System; using System.Data; using System.Xml; -- cgit v1.2.3 From af6ce2a3cf9e3a87787c5fd80576a243d463b588 Mon Sep 17 00:00:00 2001 From: Konstantin Triger Date: Sun, 26 Mar 2006 17:03:20 +0000 Subject: check for SQLServer uniquesidentifier type for VARCHAR svn path=/trunk/mcs/; revision=58549 --- .../AbstractDataReader.cs | 31 +++++++--------------- .../System.Data.ProviderBase.jvm/ChangeLog | 4 +++ 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs index e3f709f5b53..ac4f8b8b4a1 100644 --- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs +++ b/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs @@ -757,6 +757,7 @@ namespace System.Data.ProviderBase return new BooleanReaderCacheContainer(); case DbConvert.JavaSqlTypes.BLOB : return new BlobReaderCacheContainer(); + case DbConvert.JavaSqlTypes.VARCHAR: case DbConvert.JavaSqlTypes.CHAR : if (String.CompareOrdinal("uniqueidentifier", ResultsMetaData.getColumnTypeName(columnIndex)) == 0) { return new GuidReaderCacheContainer(); @@ -798,7 +799,6 @@ namespace System.Data.ProviderBase case DbConvert.JavaSqlTypes.INTEGER : return new Int32ReaderCacheContainer(); case DbConvert.JavaSqlTypes.LONGVARCHAR : - case DbConvert.JavaSqlTypes.VARCHAR : return new StringReaderCacheContainer(); case DbConvert.JavaSqlTypes.NULL : return new NullReaderCacheContainer(); @@ -894,13 +894,20 @@ namespace System.Data.ProviderBase schemaRow [(int)SCHEMA_TABLE.IsLong] = true; break; } + case DbConvert.JavaSqlTypes.VARCHAR: case DbConvert.JavaSqlTypes.CHAR: { // FIXME : specific for Microsoft SQl Server driver - if (metaData.getColumnTypeName(columnIndex).Equals("uniqueidentifier")) { + if (String.CompareOrdinal(metaData.getColumnTypeName(columnIndex), "uniqueidentifier") == 0) { schemaRow [(int)SCHEMA_TABLE.ProviderType] = DbType.Guid; schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfGuid; schemaRow [(int)SCHEMA_TABLE.IsLong] = false; } + else + if (String.CompareOrdinal(metaData.getColumnTypeName(columnIndex), "sql_variant") == 0) { + schemaRow [(int)SCHEMA_TABLE.ProviderType] = DbType.Object; + schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfObject; + schemaRow [(int)SCHEMA_TABLE.IsLong] = false; + } else { schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType); schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfString; @@ -1025,26 +1032,6 @@ namespace System.Data.ProviderBase schemaRow [(int)SCHEMA_TABLE.IsLong] = true; break; } - case DbConvert.JavaSqlTypes.VARCHAR: { - // FIXME : specific for Microsoft SQl Server driver - if (metaData.getColumnTypeName(columnIndex).Equals("sql_variant")) { - schemaRow [(int)SCHEMA_TABLE.ProviderType] = DbType.Object; - schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfObject; - schemaRow [(int)SCHEMA_TABLE.IsLong] = false; - } - else { - schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType); - schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfString;// (char[]); - schemaRow [(int)SCHEMA_TABLE.IsLong] = false;//true; - } - break; - } - // else if(columnType == -8 && metaData.getColumnTypeName(columnIndex).Equals("ROWID")) { - // // FIXME : specific for Oracle JDBC driver : OracleTypes.ROWID - // schemaRow [(int)SCHEMA_TABLE.ProviderType] = DbType.String; - // schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfString; - // schemaRow [(int)SCHEMA_TABLE.IsLong] = false; - // } default: { schemaRow [(int)SCHEMA_TABLE.ProviderType] = DbType.Object; schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfObject; diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/ChangeLog b/mcs/class/System.Data/System.Data.ProviderBase.jvm/ChangeLog index 14ee0809cfa..3826cf94bb6 100644 --- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/ChangeLog +++ b/mcs/class/System.Data/System.Data.ProviderBase.jvm/ChangeLog @@ -1,3 +1,7 @@ +2006-03-26 Konstantin Triger + + * AbstractDataReader.cs: check for SQLServer uniqueidentifier type for VARCHAR. + 2006-03-21 Boris Kirzner * AbstractDBConnection.cs: resolve abguity. -- cgit v1.2.3 From d389ce87d29ae705d5795fe71c915ad15d16dd69 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Sun, 26 Mar 2006 18:51:32 +0000 Subject: Removed unused variable from previous commit. svn path=/trunk/mcs/; revision=58551 --- mcs/mcs/attribute.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcs/mcs/attribute.cs b/mcs/mcs/attribute.cs index adaab6d8bff..260b09bc983 100644 --- a/mcs/mcs/attribute.cs +++ b/mcs/mcs/attribute.cs @@ -322,7 +322,7 @@ namespace Mono.CSharp { resolve_error = false; return cb; } - catch (Exception e) { + catch (Exception) { Error_AttributeArgumentNotValid (Location); return null; } -- cgit v1.2.3 From 5151584d85270098c287d956a52b4da0fe0b4920 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Sun, 26 Mar 2006 20:16:34 +0000 Subject: 2006-03-26 Marek Safar * cs-tokenizer.cs (adjust_real): Uses float.Parse for float literals. svn path=/trunk/mcs/; revision=58553 --- mcs/errors/cs0594-4.cs | 8 ++++++++ mcs/mcs/ChangeLog | 4 ++++ mcs/mcs/cs-tokenizer.cs | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 mcs/errors/cs0594-4.cs diff --git a/mcs/errors/cs0594-4.cs b/mcs/errors/cs0594-4.cs new file mode 100644 index 00000000000..aae24d3e119 --- /dev/null +++ b/mcs/errors/cs0594-4.cs @@ -0,0 +1,8 @@ +// cs0594-4.cs: Floating-point constant is outside the range of type `float' +// Line: 6 + +class X { + public static void Main() { + float b = 11111111111111111111111111111111111122222222222222222f; + } +} diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index 08e470455a7..81feeb1cb31 100644 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,3 +1,7 @@ +2006-03-26 Marek Safar + + * cs-tokenizer.cs (adjust_real): Uses float.Parse for float literals. + 2006-03-26 Marek Safar * constant.cs (Constant.Reduce): Replaced EmitContext with single bool diff --git a/mcs/mcs/cs-tokenizer.cs b/mcs/mcs/cs-tokenizer.cs index cef84e04732..b3266214711 100644 --- a/mcs/mcs/cs-tokenizer.cs +++ b/mcs/mcs/cs-tokenizer.cs @@ -858,7 +858,7 @@ namespace Mono.CSharp break; case Token.LITERAL_FLOAT: try { - val = (float) System.Double.Parse (s, styles, csharp_format_info); + val = float.Parse (s, styles, csharp_format_info); } catch (OverflowException) { val = 0.0f; Report.Error (594, Location, error_details, "float"); -- cgit v1.2.3 From b6dab2b88c181a29672eba5830dd5bf917eca10b Mon Sep 17 00:00:00 2001 From: Atsushi Eno Date: Sun, 26 Mar 2006 23:36:31 +0000 Subject: 2006-03-27 Atsushi Enomoto Patch by Alexandre Alapetite (http://alexandre.alapetite.net/cv/) * RelaxngPattern.cs : RelaxngInclude.Read() could be NRE when there is an error in XmlTextReader .ctor(). * RelaxngValidatingReader.cs : If the input XmlReader is already positioned on the first node to validate, skip Read() here. svn path=/trunk/mcs/; revision=58557 --- .../Commons.Xml.Relaxng/Commons.Xml.Relaxng/ChangeLog | 8 ++++++++ .../Commons.Xml.Relaxng/RelaxngPattern.cs | 3 ++- .../Commons.Xml.Relaxng/RelaxngValidatingReader.cs | 16 +++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/ChangeLog b/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/ChangeLog index 66012174b12..a8be7499f5b 100644 --- a/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/ChangeLog +++ b/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/ChangeLog @@ -1,3 +1,11 @@ +2006-03-27 Atsushi Enomoto + + Patch by Alexandre Alapetite (http://alexandre.alapetite.net/cv/) + * RelaxngPattern.cs : RelaxngInclude.Read() could be NRE when + there is an error in XmlTextReader .ctor(). + * RelaxngValidatingReader.cs : If the input XmlReader is already + positioned on the first node to validate, skip Read() here. + 2006-02-02 Atsushi Enomoto * RelaxngValidatingReader.cs : removed extra tables. diff --git a/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/RelaxngPattern.cs b/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/RelaxngPattern.cs index c2f904c0f57..d5c0b804574 100644 --- a/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/RelaxngPattern.cs +++ b/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/RelaxngPattern.cs @@ -326,7 +326,8 @@ namespace Commons.Xml.Relaxng r.MoveToContent (); g = r.ReadPattern () as RelaxngGrammar; } finally { - xtr.Close (); + if (xtr != null) + xtr.Close (); } if (g == null) throw new RelaxngException (this, "Included syntax must start with \"grammar\" element."); diff --git a/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/RelaxngValidatingReader.cs b/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/RelaxngValidatingReader.cs index d639a8c1094..a69b22e3b82 100644 --- a/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/RelaxngValidatingReader.cs +++ b/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/RelaxngValidatingReader.cs @@ -3,6 +3,7 @@ // // Author: // Atsushi Enomoto +// Alexandre Alapetite // // 2003 Atsushi Enomoto. "No rights reserved." // @@ -74,6 +75,7 @@ namespace Commons.Xml.Relaxng string cachedValue; int startElementDepth = -1; bool inContent; + bool firstRead = true; internal string CurrentStateXml { get { return RdpUtil.DebugRdpPattern (vState, new Hashtable ()); } @@ -363,7 +365,19 @@ namespace Commons.Xml.Relaxng { PrepareState (); - bool ret = reader.Read (); + // If the input XmlReader is already positioned on + // the first node to validate, skip Read() here + // (idea by Alex). + bool ret; + if (firstRead) { + firstRead = false; + if (reader.ReadState == ReadState.Initial) + ret = reader.Read (); + else + ret = !((reader.ReadState == ReadState.Closed) || (reader.ReadState == ReadState.EndOfFile)); + } + else + ret = reader.Read (); // Process pending text node validation if required. if (cachedValue != null) -- cgit v1.2.3 From 917ca3239152ba0ab2a3211a57848aa5a2613457 Mon Sep 17 00:00:00 2001 From: Atsushi Eno Date: Mon, 27 Mar 2006 02:36:21 +0000 Subject: 2006-03-27 Atsushi Enomoto * TimeSpanTest.cs : updated tests to not fail under run-test-ondotnet on 2.0 profile. Thus marked them as NotWorking (since they are regarded as working). svn path=/trunk/mcs/; revision=58561 --- mcs/class/corlib/Test/System/ChangeLog | 6 ++ mcs/class/corlib/Test/System/TimeSpanTest.cs | 82 +++++++++++++++++++++++++++- 2 files changed, 86 insertions(+), 2 deletions(-) diff --git a/mcs/class/corlib/Test/System/ChangeLog b/mcs/class/corlib/Test/System/ChangeLog index fbad9492029..a83d9dd1951 100644 --- a/mcs/class/corlib/Test/System/ChangeLog +++ b/mcs/class/corlib/Test/System/ChangeLog @@ -1,3 +1,9 @@ +2006-03-27 Atsushi Enomoto + + * TimeSpanTest.cs : updated tests to not fail under run-test-ondotnet + on 2.0 profile. Thus marked them as NotWorking (since they are + regarded as working). + 2006-03-16 Atsushi Enomoto * DoubleTest.cs : added ParseEmptyString(). diff --git a/mcs/class/corlib/Test/System/TimeSpanTest.cs b/mcs/class/corlib/Test/System/TimeSpanTest.cs index 66651c35020..52b2452e72d 100644 --- a/mcs/class/corlib/Test/System/TimeSpanTest.cs +++ b/mcs/class/corlib/Test/System/TimeSpanTest.cs @@ -54,6 +54,10 @@ public class TimeSpanTest : Assertion { } [Test] +#if NET_2_0 + [ExpectedException (typeof (ArgumentOutOfRangeException))] + [Category ("NotWorking")] +#endif public void TemporaryOverflow () { // calculating part of this results in overflow (days) @@ -69,6 +73,10 @@ public class TimeSpanTest : Assertion { } [Test] +#if NET_2_0 + [ExpectedException (typeof (ArgumentOutOfRangeException))] + [Category ("NotWorking")] +#endif public void NoOverflowInHoursMinsSecondsMS () { TimeSpan ts = new TimeSpan (0, Int32.MaxValue, Int32.MaxValue, Int32.MaxValue, Int32.MaxValue); @@ -113,6 +121,10 @@ public class TimeSpanTest : Assertion { } [Test] +#if NET_2_0 + [ExpectedException (typeof (ArgumentOutOfRangeException))] + [Category ("NotWorking")] +#endif public void MaxHours () { // LAMESPEC: the highest hours are "special" @@ -134,6 +146,10 @@ public class TimeSpanTest : Assertion { } [Test] +#if NET_2_0 + [ExpectedException (typeof (ArgumentOutOfRangeException))] + [Category ("NotWorking")] +#endif public void MaxHours_BreakPoint () { TimeSpan ts = new TimeSpan (0, Int32.MaxValue - 596523, 0, 0, 0); @@ -164,8 +180,20 @@ public class TimeSpanTest : Assertion { } [Test] +#if NET_2_0 + [Category ("NotWorking")] +#endif public void MinHours () { +#if NET_2_0 + TimeSpan ts = new TimeSpan (0, -256204778, 0, 0, 0); + AssertEquals ("Days", -10675199, ts.Days); + AssertEquals ("Hours", -2, ts.Hours); + AssertEquals ("Minutes", 0, ts.Minutes); + AssertEquals ("Seconds", 0, ts.Seconds); + AssertEquals ("Milliseconds", 0, ts.Milliseconds); + AssertEquals ("Ticks", -9223372008000000000, ts.Ticks); +#else // LAMESPEC: the lowest hours are "special" TimeSpan ts = new TimeSpan (0, Int32.MinValue, 0, 0, 0); AssertEquals ("Min-Days", 0, ts.Days); @@ -182,9 +210,14 @@ public class TimeSpanTest : Assertion { AssertEquals ("Seconds", 0, ts.Seconds); AssertEquals ("Milliseconds", 0, ts.Milliseconds); AssertEquals ("Ticks", 21474828000000000, ts.Ticks); +#endif } [Test] +#if NET_2_0 + [ExpectedException (typeof (ArgumentOutOfRangeException))] + [Category ("NotWorking")] +#endif public void MinHours_BreakPoint () { TimeSpan ts = new TimeSpan (0, -2146887124, 0, 0, 0); @@ -215,10 +248,23 @@ public class TimeSpanTest : Assertion { } [Test] +#if NET_2_0 + [Category ("NotWorking")] +#endif public void MaxMinutes () { + TimeSpan ts; +#if NET_2_0 + ts = new TimeSpan (0, 0, 256204778, 0, 0); + AssertEquals ("Max-Days", 177919, ts.Days); + AssertEquals ("Max-Hours", 23, ts.Hours); + AssertEquals ("Max-Minutes", 38, ts.Minutes); + AssertEquals ("Max-Seconds", 0, ts.Seconds); + AssertEquals ("Max-Milliseconds", 0, ts.Milliseconds); + AssertEquals ("Max-Ticks", 153722866800000000, ts.Ticks); +#else // LAMESPEC: the highest minutes are "special" - TimeSpan ts = new TimeSpan (0, 0, Int32.MaxValue, 0, 0); + ts = new TimeSpan (0, 0, Int32.MaxValue, 0, 0); AssertEquals ("Max-Days", 0, ts.Days); AssertEquals ("Max-Hours", 0, ts.Hours); AssertEquals ("Max-Minutes", -1, ts.Minutes); @@ -233,9 +279,14 @@ public class TimeSpanTest : Assertion { AssertEquals ("Seconds", 0, ts.Seconds); AssertEquals ("Milliseconds", 0, ts.Milliseconds); AssertEquals ("Ticks", -21474836400000000, ts.Ticks); +#endif } [Test] +#if NET_2_0 + [ExpectedException (typeof (ArgumentOutOfRangeException))] + [Category ("NotWorking")] +#endif public void MaxMinutes_BreakPoint () { TimeSpan ts = new TimeSpan (0, Int32.MaxValue - 35791394, 0, 0, 0); @@ -266,10 +317,23 @@ public class TimeSpanTest : Assertion { } [Test] +#if NET_2_0 + [Category ("NotWorking")] +#endif public void MinMinutes () { + TimeSpan ts; +#if NET_2_0 + ts = new TimeSpan (0, 0, Int32.MinValue, 0, 0); + AssertEquals ("Days", -1491308, ts.Days); + AssertEquals ("Hours", -2, ts.Hours); + AssertEquals ("Minutes", -8, ts.Minutes); + AssertEquals ("Seconds", 0, ts.Seconds); + AssertEquals ("Milliseconds", 0, ts.Milliseconds); + AssertEquals ("Ticks", -1288490188800000000, ts.Ticks); +#else // LAMESPEC: the highest minutes are "special" - TimeSpan ts = new TimeSpan (0, 0, Int32.MinValue, 0, 0); + ts = new TimeSpan (0, 0, Int32.MinValue, 0, 0); AssertEquals ("Min-Days", 0, ts.Days); AssertEquals ("Min-Hours", 0, ts.Hours); AssertEquals ("Min-Minutes", 0, ts.Minutes); @@ -284,11 +348,24 @@ public class TimeSpanTest : Assertion { AssertEquals ("Seconds", 0, ts.Seconds); AssertEquals ("Milliseconds", 0, ts.Milliseconds); AssertEquals ("Ticks", 21474836400000000, ts.Ticks); +#endif } [Test] +#if NET_2_0 + [Category ("NotWorking")] +#endif public void MinMinutes_BreakPoint () { +#if NET_2_0 + TimeSpan ts = new TimeSpan (0, 0, -2111692253, 0, 0); + AssertEquals ("Days", -1466452, ts.Days); + AssertEquals ("Hours", -22, ts.Hours); + AssertEquals ("Minutes", -53, ts.Minutes); + AssertEquals ("Seconds", -0, ts.Seconds); + AssertEquals ("Milliseconds", 0, ts.Milliseconds); + AssertEquals ("Ticks", -1267015351800000000, ts.Ticks); +#else TimeSpan ts = new TimeSpan (0, 0, -2111692253, 0, 0); AssertEquals ("Days", -24855, ts.Days); AssertEquals ("Hours", -3, ts.Hours); @@ -296,6 +373,7 @@ public class TimeSpanTest : Assertion { AssertEquals ("Seconds", -16, ts.Seconds); AssertEquals ("Milliseconds", 0, ts.Milliseconds); AssertEquals ("Ticks", -21474835960000000, ts.Ticks); +#endif } [Test] -- cgit v1.2.3 From bff09f52dc5b3a0cb0b5ace47cb71b305b39b4fd Mon Sep 17 00:00:00 2001 From: Paolo Molaro Date: Mon, 27 Mar 2006 09:21:38 +0000 Subject: Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro * reflection.c, class-internals.h, domain.c: fixed handling of types used as values for objects in custom attributes (bug #77915): svn path=/trunk/mono/; revision=58562 --- mono/metadata/ChangeLog | 6 ++++++ mono/metadata/class-internals.h | 1 + mono/metadata/domain.c | 4 ++++ mono/metadata/reflection.c | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog index f831ed0d8e4..d97f39031c3 100644 --- a/mono/metadata/ChangeLog +++ b/mono/metadata/ChangeLog @@ -1,3 +1,9 @@ + +Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro + + * reflection.c, class-internals.h, domain.c: fixed handling of types + used as values for objects in custom attributes (bug #77915): + 2006-03-24 Martin Baulig * class.c (mono_class_setup_fields): Added support for generic diff --git a/mono/metadata/class-internals.h b/mono/metadata/class-internals.h index a8a8c49b689..d29f1abbdb5 100644 --- a/mono/metadata/class-internals.h +++ b/mono/metadata/class-internals.h @@ -653,6 +653,7 @@ typedef struct { MonoClass *typehandle_class; MonoClass *fieldhandle_class; MonoClass *methodhandle_class; + MonoClass *systemtype_class; MonoClass *monotype_class; MonoClass *exception_class; MonoClass *threadabortexception_class; diff --git a/mono/metadata/domain.c b/mono/metadata/domain.c index 92102eee58b..9509b84279a 100644 --- a/mono/metadata/domain.c +++ b/mono/metadata/domain.c @@ -676,6 +676,10 @@ mono_init_internal (const char *filename, const char *exe_filename, const char * mono_defaults.corlib, "System", "RuntimeFieldHandle"); g_assert (mono_defaults.fieldhandle_class != 0); + mono_defaults.systemtype_class = mono_class_from_name ( + mono_defaults.corlib, "System", "Type"); + g_assert (mono_defaults.systemtype_class != 0); + mono_defaults.monotype_class = mono_class_from_name ( mono_defaults.corlib, "System", "MonoType"); g_assert (mono_defaults.monotype_class != 0); diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c index 83e51d6cb6d..ee72fd5217d 100644 --- a/mono/metadata/reflection.c +++ b/mono/metadata/reflection.c @@ -7775,7 +7775,7 @@ handle_type: klass = mono_object_class (arg); - if (mono_object_isinst (arg, mono_defaults.monotype_class)) { + if (mono_object_isinst (arg, mono_defaults.systemtype_class)) { *p++ = 0x50; goto handle_type; } else if (klass->enumtype) { -- cgit v1.2.3 From 12dd9195cf34c1e14fd7249b9a6f1e91be8b9eeb Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Mon, 27 Mar 2006 10:50:04 +0000 Subject: Restore -out:test-foo.exe when we use support files svn path=/trunk/mcs/; revision=58564 --- mcs/tests/test-353.cs | 2 +- mcs/tests/test-361.cs | 2 +- mcs/tests/test-388.cs | 2 +- mcs/tests/test-389.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mcs/tests/test-353.cs b/mcs/tests/test-353.cs index e7d59d99022..5aa753fdc2d 100644 --- a/mcs/tests/test-353.cs +++ b/mcs/tests/test-353.cs @@ -1,4 +1,4 @@ -// Compiler options: support-353.cs +// Compiler options: support-353.cs -out:test-353.exe using System; diff --git a/mcs/tests/test-361.cs b/mcs/tests/test-361.cs index 473448dda8c..c3b712e5c7d 100644 --- a/mcs/tests/test-361.cs +++ b/mcs/tests/test-361.cs @@ -1,4 +1,4 @@ -// Compiler options: support-361.cs +// Compiler options: support-361.cs -out:test-361.exe [X] class Test { diff --git a/mcs/tests/test-388.cs b/mcs/tests/test-388.cs index 4b48d6d4a95..7110eb4ab34 100644 --- a/mcs/tests/test-388.cs +++ b/mcs/tests/test-388.cs @@ -1,6 +1,6 @@ // This is used to debug an ordering dependent bug. // -// Compiler options: support-388.cs +// Compiler options: support-388.cs -out:test-388.exe namespace Schemas { [System.Xml.Serialization.XmlType("base-field-type"), diff --git a/mcs/tests/test-389.cs b/mcs/tests/test-389.cs index f96b0f54b94..22a13cffa82 100644 --- a/mcs/tests/test-389.cs +++ b/mcs/tests/test-389.cs @@ -1,6 +1,6 @@ // This is used to debug an ordering dependent bug. // -// Compiler options: support-389.cs +// Compiler options: support-389.cs -out:test-389.exe using System; using System.Collections; -- cgit v1.2.3 From 35d107d334057b3d221ce63eca772f9b54b42fbf Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Mon, 27 Mar 2006 11:14:46 +0000 Subject: update svn path=/trunk/mcs/; revision=58565 --- mcs/errors/known-issues-gmcs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mcs/errors/known-issues-gmcs b/mcs/errors/known-issues-gmcs index ec7b207c8e2..1317433fb56 100644 --- a/mcs/errors/known-issues-gmcs +++ b/mcs/errors/known-issues-gmcs @@ -63,3 +63,13 @@ gcs0633-4.cs NO ERROR gcs0208-2.cs NO ERROR gcs0208-3.cs NO ERROR + +cs0031-2.cs +cs0031-3.cs +cs0031-4.cs +cs0031-5.cs +cs0031-6.cs +cs0031.cs +cs0122-18.cs NO ERROR +cs0594-4.cs NO ERROR + -- cgit v1.2.3 From 78be3a58b0d6947f3e619689e2da47f71a025a6d Mon Sep 17 00:00:00 2001 From: Dick Porter Date: Mon, 27 Mar 2006 11:37:39 +0000 Subject: 2006-03-27 Dick Porter * shared.c (_wapi_shm_file_open): Break out of a loop if the shared file is smaller than expected. (We loop a few times in case another process is in the middle of creating the file.) svn path=/trunk/mono/; revision=58566 --- mono/io-layer/ChangeLog | 6 ++++++ mono/io-layer/shared.c | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/mono/io-layer/ChangeLog b/mono/io-layer/ChangeLog index 3a8de9d05de..0932736a458 100644 --- a/mono/io-layer/ChangeLog +++ b/mono/io-layer/ChangeLog @@ -1,3 +1,9 @@ +2006-03-27 Dick Porter + + * shared.c (_wapi_shm_file_open): Break out of a loop if the + shared file is smaller than expected. (We loop a few times in + case another process is in the middle of creating the file.) + 2006-03-22 Dick Porter * handles.c: diff --git a/mono/io-layer/shared.c b/mono/io-layer/shared.c index 3e92c3436e0..be2a1eeb24b 100644 --- a/mono/io-layer/shared.c +++ b/mono/io-layer/shared.c @@ -104,10 +104,18 @@ static int _wapi_shm_file_open (const guchar *filename, guint32 wanted_size) { int fd; struct stat statbuf; - int ret; + int ret, tries = 0; gboolean created = FALSE; try_again: + if (tries++ > 10) { + /* Just give up */ + return (-1); + } else if (tries > 5) { + /* Break out of a loop */ + unlink (filename); + } + /* No O_CREAT yet, because we need to initialise the file if * we have to create it. */ @@ -195,6 +203,7 @@ try_again: return(-1); } else { /* We didn't create it, so just try opening it again */ + _wapi_handle_spin (100); goto try_again; } } -- cgit v1.2.3 From f637b052bea5f8b97e64604f40ae9f6e0a2da76a Mon Sep 17 00:00:00 2001 From: Boris Kirzner Date: Mon, 27 Mar 2006 11:39:36 +0000 Subject: Fix Soap Serialization .NET compatibility svn path=/trunk/mcs/; revision=58569 --- .../System.Data/System.Data.SqlTypes.jvm/ChangeLog | 4 ++ .../SqlNullValueException.cs | 40 ++++++++---------- .../System.Data.SqlTypes.jvm/SqlTypeException.cs | 48 +++++++++++++--------- 3 files changed, 49 insertions(+), 43 deletions(-) diff --git a/mcs/class/System.Data/System.Data.SqlTypes.jvm/ChangeLog b/mcs/class/System.Data/System.Data.SqlTypes.jvm/ChangeLog index ece74860d34..8f199c5b112 100644 --- a/mcs/class/System.Data/System.Data.SqlTypes.jvm/ChangeLog +++ b/mcs/class/System.Data/System.Data.SqlTypes.jvm/ChangeLog @@ -1,3 +1,7 @@ +2006-03-27 Boris Kirzner + * SqlNullValueException.cs, SqlTypeException.cs: + fix Soap Serialization .NET compatibility + 2005-10-26 Boris Kirzner * SqlBinary.cs : Avoid ArrayTypeMismatch exception by diff --git a/mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlNullValueException.cs b/mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlNullValueException.cs index b52e5067433..760349f7f94 100644 --- a/mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlNullValueException.cs +++ b/mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlNullValueException.cs @@ -27,41 +27,35 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.Serialization; namespace System.Data.SqlTypes { - - /** - * The exception that is thrown for errors in an arithmetic, casting, or conversion operation - * - * @author Pavel Sandler - * @version 1.0, 01/01/03 - */ - - /* - * CURRENT LIMITATIONS - * 1. Constructor(SerializationInfo info, StreamingContext context) is not supported - * 2. Method "void GetObjectData(...,...)" is not supported from ISerializable - */ - [Serializable] public class SqlNullValueException : System.Data.SqlTypes.SqlTypeException { - /** - * Initializes a new instance of the SqlNullValueException class. - */ public SqlNullValueException() : base("Data is Null. This method or property cannot be called on Null values.") { } - /** - * Initializes a new instance of the SqlNullValueException class - * with a specified error message. - * - * @param message The message that describes the error. - */ public SqlNullValueException(String message): base(message) { + _message = message; + } + + public SqlNullValueException (SerializationInfo info, StreamingContext context) + : this () { + _message = (string) info.GetString ("SqlNullValueExceptionMessage"); + } + + public SqlNullValueException(String message, Exception innerException): base(message, innerException) + { + _message = message; + } + + public override void GetObjectData (SerializationInfo si, StreamingContext context) + { + si.AddValue ("SqlNullValueExceptionMessage", Message); } } } \ No newline at end of file diff --git a/mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlTypeException.cs b/mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlTypeException.cs index ce40b50f996..a4f859c446d 100644 --- a/mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlTypeException.cs +++ b/mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlTypeException.cs @@ -29,33 +29,41 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System; +using System.Runtime.Serialization; + namespace System.Data.SqlTypes { - - - /** - * The base exception class for the System.Data.SqlTypes . - */ - - /* - * CURRENT LIMITATIONS - * 1. Constructor(SerializationInfo info, StreamingContext context) is not supported - * 2. Method "void GetObjectData(...,...)" is not supported from ISerializable - */ - - using System; - [Serializable] public class SqlTypeException : SystemException { - /** - * Initializes a new instance of the SqlTypeException class - * with a specified error message. - * - * @param message The message that describes the error. - */ + protected string _message; + + public SqlTypeException() : this("System error.") + { + } + public SqlTypeException(String message) : base(message) { + _message = message; + } + + public SqlTypeException (SerializationInfo info, StreamingContext context) { + _message = (string) info.GetString ("SqlTypeExceptionMessage"); + } + + public SqlTypeException(String message, Exception innerException) : base(message, innerException) + { + _message = message; + } + + public override string Message { + get { return _message; } + } + + public override void GetObjectData (SerializationInfo si, StreamingContext context) + { + si.AddValue ("SqlTypeExceptionMessage", Message); } } } \ No newline at end of file -- cgit v1.2.3 From 25343fe7f068834153b970f64e5565e920faeb93 Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Mon, 27 Mar 2006 11:40:03 +0000 Subject: *** merged revision 57580 from mcs svn path=/trunk/mcs/; revision=58570 --- mcs/gmcs/ChangeLog | 15 ++++++ mcs/gmcs/class.cs | 25 ++++------ mcs/gmcs/delegate.cs | 114 +++++++++++++++----------------------------- mcs/gmcs/parameter.cs | 39 +++++++++++++-- mcs/tests/known-issues-gmcs | 1 - 5 files changed, 97 insertions(+), 97 deletions(-) diff --git a/mcs/gmcs/ChangeLog b/mcs/gmcs/ChangeLog index 0481f20232c..e8d136fe3a8 100644 --- a/mcs/gmcs/ChangeLog +++ b/mcs/gmcs/ChangeLog @@ -1,3 +1,18 @@ +2006-03-04 Marek Safar + + A fix for #77353. + + * class.cs (SetMethod.DefineParameters): Uses new parameters type ctor. + (Event.Define): ditto + (SetIndexerMethod.DefineParameters): Uses Parameters.MergeGenerated. + + * delegate.cs (Delegate.Define): Uses Parameters.MergeGenerated. + Removed redundant code and set NewSlot for Invoke method too. + + * parameter.cs (Parameters.ctor): Add custom, type ctor. + (Parameters.MergeGenerated): New method. Use this method when you merge + compiler generated argument with user arguments. + 2006-03-03 Marek Safar * attribute.cs (ResolveAsTypeTerminal): Removed. diff --git a/mcs/gmcs/class.cs b/mcs/gmcs/class.cs index d53b0db38a1..72400fa75cc 100644 --- a/mcs/gmcs/class.cs +++ b/mcs/gmcs/class.cs @@ -6065,10 +6065,9 @@ namespace Mono.CSharp { protected virtual void DefineParameters () { - Parameter [] parms = new Parameter [1]; - parms [0] = new Parameter (method.MemberType, "value", Parameter.Modifier.NONE, null, Location); - parameters = new Parameters (parms); - parameters.Resolve (null); + parameters = new Parameters ( + new Parameter[] { new Parameter (method.MemberType, "value", Parameter.Modifier.NONE, null, Location) }, + new Type[] { method.MemberType }); } public override MethodBuilder Define (TypeContainer container) @@ -6990,10 +6989,9 @@ namespace Mono.CSharp { return false; } - Parameter [] parms = new Parameter [1]; - parms [0] = new Parameter (MemberType, "value", Parameter.Modifier.NONE, null, Location); - parameters = new Parameters (parms); - parameters.Resolve (null); + parameters = new Parameters ( + new Parameter[] { new Parameter (MemberType, "value", Parameter.Modifier.NONE, null, Location) }, + new Type[] { MemberType } ); if (!CheckBase ()) return false; @@ -7105,15 +7103,8 @@ namespace Mono.CSharp { protected override void DefineParameters () { - Parameter [] fixed_parms = method.Parameters.FixedParameters; - Parameter [] tmp = new Parameter [fixed_parms.Length + 1]; - - fixed_parms.CopyTo (tmp, 0); - tmp [fixed_parms.Length] = new Parameter ( - method.MemberType, "value", Parameter.Modifier.NONE, null, method.Location); - - parameters = new Parameters (tmp); - parameters.Resolve (null); + parameters = Parameters.MergeGenerated (method.Parameters, + new Parameter (method.MemberType, "value", Parameter.Modifier.NONE, null, method.Location)); } } diff --git a/mcs/gmcs/delegate.cs b/mcs/gmcs/delegate.cs index c6a22440ddc..37f641dfa52 100644 --- a/mcs/gmcs/delegate.cs +++ b/mcs/gmcs/delegate.cs @@ -145,9 +145,6 @@ namespace Mono.CSharp { public override bool Define () { - MethodAttributes mattr; - int i; - if (IsGeneric) { foreach (TypeParameter type_param in TypeParameters) type_param.DefineType (this); @@ -159,10 +156,10 @@ namespace Mono.CSharp { const_arg_types [0] = TypeManager.object_type; const_arg_types [1] = TypeManager.intptr_type; - mattr = MethodAttributes.RTSpecialName | MethodAttributes.SpecialName | + const MethodAttributes ctor_mattr = MethodAttributes.RTSpecialName | MethodAttributes.SpecialName | MethodAttributes.HideBySig | MethodAttributes.Public; - ConstructorBuilder = TypeBuilder.DefineConstructor (mattr, + ConstructorBuilder = TypeBuilder.DefineConstructor (ctor_mattr, CallingConventions.Standard, const_arg_types); @@ -211,11 +208,9 @@ namespace Mono.CSharp { ReturnType = ReturnType.ResolveAsTypeTerminal (this, false); if (ReturnType == null) return false; - - ret_type = ReturnType.Type; - if (ret_type == null) - return false; + ret_type = ReturnType.Type; + if (!Parent.AsAccessible (ret_type, ModFlags)) { Report.Error (58, Location, "Inconsistent accessibility: return type `" + @@ -236,22 +231,13 @@ namespace Mono.CSharp { CallingConventions cc = Parameters.CallingConvention; - mattr = MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.Virtual; + const MethodAttributes mattr = MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.Virtual | MethodAttributes.NewSlot; InvokeBuilder = TypeBuilder.DefineMethod ("Invoke", mattr, cc, ret_type, Parameters.Types); - - // - // Define parameters, and count out/ref parameters - // - int out_params = 0; - foreach (Parameter p in Parameters.FixedParameters) { - if ((p.ModFlags & Parameter.Modifier.ISBYREF) != 0) - out_params++; - } InvokeBuilder.SetImplementationFlags (MethodImplAttributes.Runtime); @@ -260,86 +246,64 @@ namespace Mono.CSharp { // // BeginInvoke // - int params_num = Parameters.Count; - Type [] async_param_types = new Type [params_num + 2]; - - Parameters.Types.CopyTo (async_param_types, 0); - - async_param_types [params_num] = TypeManager.asynccallback_type; - async_param_types [params_num + 1] = TypeManager.object_type; - - mattr = MethodAttributes.Public | MethodAttributes.HideBySig | - MethodAttributes.Virtual | MethodAttributes.NewSlot; + + Parameters async_parameters = Parameters.MergeGenerated (Parameters, + new Parameter (TypeManager.asynccallback_type, "callback", Parameter.Modifier.NONE, null, Location), + new Parameter (TypeManager.object_type, "object", Parameter.Modifier.NONE, null, Location)); BeginInvokeBuilder = TypeBuilder.DefineMethod ("BeginInvoke", - mattr, - cc, - TypeManager.iasyncresult_type, - async_param_types); + mattr, cc, TypeManager.iasyncresult_type, async_parameters.Types); - i = Parameters.Count; - Parameters.ApplyAttributes (BeginInvokeBuilder); - BeginInvokeBuilder.DefineParameter (i + 1, ParameterAttributes.None, "callback"); - BeginInvokeBuilder.DefineParameter (i + 2, ParameterAttributes.None, "object"); - BeginInvokeBuilder.SetImplementationFlags (MethodImplAttributes.Runtime); - - Parameter [] async_params = new Parameter [params_num + 2]; - Parameters.FixedParameters.CopyTo (async_params, 0); - - async_params [params_num] = new Parameter ( - TypeManager.asynccallback_type, "callback", - Parameter.Modifier.NONE, null, Location); - async_params [params_num + 1] = new Parameter ( - TypeManager.object_type, "object", - Parameter.Modifier.NONE, null, Location); - - Parameters async_parameters = new Parameters (async_params); - async_parameters.Resolve (this); async_parameters.ApplyAttributes (BeginInvokeBuilder); - TypeManager.RegisterMethod (BeginInvokeBuilder, async_parameters); // // EndInvoke is a bit more interesting, all the parameters labeled as // out or ref have to be duplicated here. // - - Type [] end_param_types = new Type [out_params + 1]; - Parameter [] end_params = new Parameter [out_params + 1]; - int param = 0; - if (out_params > 0){ - int top = Parameters.FixedParameters.Length; - for (i = 0; i < top; i++){ + + // + // Define parameters, and count out/ref parameters + // + Parameters end_parameters; + int out_params = 0; + + foreach (Parameter p in Parameters.FixedParameters) { + if ((p.ModFlags & Parameter.Modifier.ISBYREF) != 0) + ++out_params; + } + + if (out_params > 0) { + Type [] end_param_types = new Type [out_params]; + Parameter [] end_params = new Parameter [out_params ]; + + int param = 0; + for (int i = 0; i < Parameters.FixedParameters.Length; ++i) { Parameter p = Parameters.FixedParameters [i]; if ((p.ModFlags & Parameter.Modifier.ISBYREF) == 0) continue; - end_param_types [param] = Parameters.Types [i]; + end_param_types [param] = p.ExternalType(); end_params [param] = p; - param++; + ++param; } + end_parameters = new Parameters (end_params, end_param_types); + } + else { + end_parameters = Parameters.EmptyReadOnlyParameters; } - end_param_types [out_params] = TypeManager.iasyncresult_type; - end_params [out_params] = new Parameter (TypeManager.system_iasyncresult_expr, "result", Parameter.Modifier.NONE, null, Location); + end_parameters = Parameters.MergeGenerated (end_parameters, + new Parameter (TypeManager.iasyncresult_type, "result", Parameter.Modifier.NONE, null, Location)); + // // Create method, define parameters, register parameters with type system // - EndInvokeBuilder = TypeBuilder.DefineMethod ("EndInvoke", mattr, cc, ret_type, end_param_types); + EndInvokeBuilder = TypeBuilder.DefineMethod ("EndInvoke", mattr, cc, ret_type, end_parameters.Types); EndInvokeBuilder.SetImplementationFlags (MethodImplAttributes.Runtime); - // - // EndInvoke: Label the parameters - // - EndInvokeBuilder.DefineParameter (out_params + 1, ParameterAttributes.None, "result"); - for (i = 0; i < end_params.Length-1; i++){ - EndInvokeBuilder.DefineParameter (i + 1, end_params [i].Attributes, end_params [i].Name); - } - - Parameters end_parameters = new Parameters (end_params); - end_parameters.Resolve (this); - + end_parameters.ApplyAttributes (EndInvokeBuilder); TypeManager.RegisterMethod (EndInvokeBuilder, end_parameters); return true; diff --git a/mcs/gmcs/parameter.cs b/mcs/gmcs/parameter.cs index 940043e35d9..6ceea684750 100644 --- a/mcs/gmcs/parameter.cs +++ b/mcs/gmcs/parameter.cs @@ -207,7 +207,7 @@ namespace Mono.CSharp { public Expression TypeName; public readonly Modifier ModFlags; - public readonly string Name; + public string Name; GenericConstraints constraints; protected Type parameter_type; public readonly Location Location; @@ -457,8 +457,15 @@ namespace Mono.CSharp { FixedParameters = new Parameter[0]; types = new Type [0]; } + + public Parameters (Parameter[] parameters, Type[] types) + { + FixedParameters = parameters; + this.types = types; + count = types.Length; + } - public Parameters (Parameter [] parameters) + public Parameters (Parameter[] parameters) { if (parameters == null) throw new ArgumentException ("Use EmptyReadOnlyPatameters"); @@ -473,6 +480,31 @@ namespace Mono.CSharp { HasArglist = has_arglist; } + /// + /// Use this method when you merge compiler generated argument with user arguments + /// + public static Parameters MergeGenerated (Parameters userParams, params Parameter[] compilerParams) + { + Parameter[] all_params = new Parameter [userParams.count + compilerParams.Length]; + Type[] all_types = new Type[all_params.Length]; + userParams.FixedParameters.CopyTo(all_params, 0); + userParams.Types.CopyTo (all_types, 0); + + int last_filled = userParams.Count; + foreach (Parameter p in compilerParams) { + for (int i = 0; i < last_filled; ++i) { + while (p.Name == all_params [i].Name) { + p.Name = '_' + p.Name; + } + } + all_params [last_filled] = p; + all_types [last_filled] = p.ParameterType; + ++last_filled; + } + + return new Parameters (all_params, all_types); + } + public bool Empty { get { return count == 0; @@ -541,9 +573,8 @@ namespace Mono.CSharp { types = new Type [count]; - if (ec != null && !VerifyArgs ()){ + if (!VerifyArgs ()) return false; - } bool ok = true; Parameter p; diff --git a/mcs/tests/known-issues-gmcs b/mcs/tests/known-issues-gmcs index be9db6bdba4..8cbe1885418 100644 --- a/mcs/tests/known-issues-gmcs +++ b/mcs/tests/known-issues-gmcs @@ -10,7 +10,6 @@ test-anon-27.cs test-xml-027.cs test-465.cs IGNORE # need to fix the path separator to work both on Unix and Windows test-476.cs -test-494.cs test-495.cs test-anon-11.cs test-anon-36.cs -- cgit v1.2.3 From b3a396141e8625f1af56f22bc4af3d5c7c5337e9 Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Mon, 27 Mar 2006 12:22:08 +0000 Subject: *** merged revisions from mcs: 57750, 58144 svn path=/trunk/mcs/; revision=58571 --- mcs/gmcs/ChangeLog | 23 +++++++++++++++++++++++ mcs/gmcs/anonymous.cs | 2 +- mcs/gmcs/convert.cs | 20 +++----------------- mcs/gmcs/delegate.cs | 37 +++++++++++++++---------------------- mcs/gmcs/ecore.cs | 8 ++++---- 5 files changed, 46 insertions(+), 44 deletions(-) diff --git a/mcs/gmcs/ChangeLog b/mcs/gmcs/ChangeLog index e8d136fe3a8..e1144ddb200 100644 --- a/mcs/gmcs/ChangeLog +++ b/mcs/gmcs/ChangeLog @@ -1,3 +1,26 @@ +2006-03-18 Marek Safar + + A fix for #77822. + + * expression.cs (VerifyArgumentsCompat): Reverted to double error + reporting, it's more tricky than I thought. + +2006-03-09 Marek Safar + + * anonymous.cs (AnonymousMethod.Compatible): Don't crash when parameters + were not resolved + + * delegate.cs (Delegate.GetInvokeMethod): Use emitcontext free MemberLookup. + (DelegateCreation.ImplicitStandardConversionExists): New method for just + conversion test. + + *ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's + not needed. + + * assign.cs, constant.cs, convert.cs, delegate.cs, expression.cs: + Updated after another emitcontext usage was clean up. It should help us to + synchronize with gmcs easier. + 2006-03-04 Marek Safar A fix for #77353. diff --git a/mcs/gmcs/anonymous.cs b/mcs/gmcs/anonymous.cs index 024aafa614c..cd76cde7431 100644 --- a/mcs/gmcs/anonymous.cs +++ b/mcs/gmcs/anonymous.cs @@ -551,7 +551,7 @@ namespace Mono.CSharp { if ((am.method.ModFlags & Modifiers.STATIC) == 0) delegate_instance_expression = new AnonymousInstance (am); - Expression ml = Expression.MemberLookup (ec, type, ".ctor", loc); + Expression ml = Expression.MemberLookup (ec.ContainerType, type, ".ctor", loc); constructor_method = ((MethodGroupExpr) ml).Methods [0]; delegate_method = am.GetMethodBuilder (); base.Emit (ec); diff --git a/mcs/gmcs/convert.cs b/mcs/gmcs/convert.cs index c9bdbf90a5c..8748c69a96f 100644 --- a/mcs/gmcs/convert.cs +++ b/mcs/gmcs/convert.cs @@ -19,16 +19,7 @@ namespace Mono.CSharp { // A container class for all the conversion operations // public class Convert { - // - // This is used to prettify the code: a null argument is allowed - // for ImplicitStandardConversion as long as it is known that - // no anonymous method will play a role. - // - // FIXME: renamed from `const' to `static' to allow bootstraping from older - // versions of the compiler that could not cope with this construct. - // - public static EmitContext ConstantEC = null; - + static Expression TypeParameter_to_Null (Type target_type, Location loc) { if (!TypeParameter_to_Null (target_type)) { @@ -620,12 +611,7 @@ namespace Mono.CSharp { if (ImplicitStandardConversionExists (expr, target_type)) return true; - Expression dummy = ImplicitUserConversion (ec, expr, target_type, Location.Null); - - if (dummy != null) - return true; - - return false; + return ImplicitUserConversion (ec, expr, target_type, Location.Null) != null; } public static bool ImplicitUserConversionExists (EmitContext ec, Type source, Type target) @@ -1270,7 +1256,7 @@ namespace Mono.CSharp { MethodGroupExpr mg = expr as MethodGroupExpr; if (mg != null) return ImplicitDelegateCreation.Create ( - ec, mg, target_type, false, loc); + ec, mg, target_type, loc); } } diff --git a/mcs/gmcs/delegate.cs b/mcs/gmcs/delegate.cs index 37f641dfa52..b44f3f090b5 100644 --- a/mcs/gmcs/delegate.cs +++ b/mcs/gmcs/delegate.cs @@ -448,7 +448,7 @@ namespace Mono.CSharp { arg_count = args.Count; Expression ml = Expression.MemberLookup ( - ec, delegate_type, "Invoke", loc); + ec.ContainerType, delegate_type, "Invoke", loc); MethodGroupExpr me = ml as MethodGroupExpr; if (me == null) { @@ -488,7 +488,7 @@ namespace Mono.CSharp { public static bool VerifyDelegate (EmitContext ec, Type delegate_type, Type probe_type, Location loc) { Expression ml = Expression.MemberLookup ( - ec, delegate_type, "Invoke", loc); + ec.ContainerType, delegate_type, "Invoke", loc); if (!(ml is MethodGroupExpr)) { Report.Error (-100, loc, "Internal error: could not find Invoke method!"); @@ -499,7 +499,7 @@ namespace Mono.CSharp { ParameterData pd = TypeManager.GetParameterData (mb); Expression probe_ml = Expression.MemberLookup ( - ec, delegate_type, "Invoke", loc); + ec.ContainerType, delegate_type, "Invoke", loc); if (!(probe_ml is MethodGroupExpr)) { Report.Error (-100, loc, "Internal error: could not find Invoke method!"); @@ -617,7 +617,7 @@ namespace Mono.CSharp { protected MethodGroupExpr method_group; protected Expression delegate_instance_expression; - public DelegateCreation () {} + protected DelegateCreation () {} public static void Error_NoMatchingMethodForDelegate (EmitContext ec, MethodGroupExpr mg, Type type, Location loc) { @@ -668,7 +668,7 @@ namespace Mono.CSharp { protected bool ResolveConstructorMethod (EmitContext ec) { Expression ml = Expression.MemberLookup ( - ec, type, ".ctor", loc); + ec.ContainerType, type, ".ctor", loc); if (!(ml is MethodGroupExpr)) { Report.Error (-100, loc, "Internal error: Could not find delegate constructor!"); @@ -689,19 +689,12 @@ namespace Mono.CSharp { return null; } - protected Expression ResolveMethodGroupExpr (EmitContext ec, MethodGroupExpr mg, - bool check_only) + protected Expression ResolveMethodGroupExpr (EmitContext ec, MethodGroupExpr mg) { - foreach (MethodInfo mi in mg.Methods){ - delegate_method = Delegate.VerifyMethod (ec.ContainerType, type, mg, mi, loc); - - if (delegate_method != null) - break; - } - + delegate_method = ImplicitStandardConversionExists (mg, type); + if (delegate_method == null) { - if (!check_only) - Error_NoMatchingMethodForDelegate (ec, mg, type, loc); + Error_NoMatchingMethodForDelegate (ec, mg, type, loc); return null; } @@ -776,13 +769,13 @@ namespace Mono.CSharp { } static public Expression Create (EmitContext ec, MethodGroupExpr mge, - Type target_type, bool check_only, Location loc) + Type target_type, Location loc) { ImplicitDelegateCreation d = new ImplicitDelegateCreation (target_type, loc); - if (d.ResolveConstructorMethod (ec)) - return d.ResolveMethodGroupExpr (ec, mge, check_only); - else + if (!d.ResolveConstructorMethod (ec)) return null; + + return d.ResolveMethodGroupExpr (ec, mge); } } @@ -825,7 +818,7 @@ namespace Mono.CSharp { MethodGroupExpr mg = e as MethodGroupExpr; if (mg != null) - return ResolveMethodGroupExpr (ec, mg, false); + return ResolveMethodGroupExpr (ec, mg); Type e_type = e.Type; @@ -914,7 +907,7 @@ namespace Mono.CSharp { if (!Delegate.VerifyApplicability (ec, del_type, Arguments, loc)) return null; - Expression lookup = Expression.MemberLookup (ec, del_type, "Invoke", loc); + Expression lookup = Expression.MemberLookup (ec.ContainerType, del_type, "Invoke", loc); if (!(lookup is MethodGroupExpr)) { Report.Error (-100, loc, "Internal error: could not find Invoke method!"); return null; diff --git a/mcs/gmcs/ecore.cs b/mcs/gmcs/ecore.cs index 0e3b9d8c0f6..6fe57f14db2 100644 --- a/mcs/gmcs/ecore.cs +++ b/mcs/gmcs/ecore.cs @@ -676,10 +676,10 @@ namespace Mono.CSharp { BindingFlags.Static | BindingFlags.Instance; - public static Expression MemberLookup (EmitContext ec, Type queried_type, + public static Expression MemberLookup (Type container_type, Type queried_type, string name, Location loc) { - return MemberLookup (ec.ContainerType, null, queried_type, name, + return MemberLookup (container_type, null, queried_type, name, AllMemberTypes, AllBindingFlags, loc); } @@ -2133,7 +2133,7 @@ namespace Mono.CSharp { if (lookup_ds.TypeBuilder == null) break; - e = MemberLookup (ec, lookup_ds.TypeBuilder, Name, loc); + e = MemberLookup (ec.ContainerType, lookup_ds.TypeBuilder, Name, loc); if (e != null) break; @@ -2146,7 +2146,7 @@ namespace Mono.CSharp { } while (lookup_ds != null); if (e == null && ec.ContainerType != null) - e = MemberLookup (ec, ec.ContainerType, Name, loc); + e = MemberLookup (ec.ContainerType, ec.ContainerType, Name, loc); if (e == null) { if (almost_matched == null && almostMatchedMembers.Count > 0) { -- cgit v1.2.3 From c0c7cc7dd2efdfcdcbdb4ae94ad042e83cfbc548 Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Mon, 27 Mar 2006 12:22:44 +0000 Subject: fix changelog svn path=/trunk/mcs/; revision=58572 --- mcs/gmcs/ChangeLog | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mcs/gmcs/ChangeLog b/mcs/gmcs/ChangeLog index e1144ddb200..47481cecb25 100644 --- a/mcs/gmcs/ChangeLog +++ b/mcs/gmcs/ChangeLog @@ -14,13 +14,9 @@ (DelegateCreation.ImplicitStandardConversionExists): New method for just conversion test. - *ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's + * ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's not needed. - * assign.cs, constant.cs, convert.cs, delegate.cs, expression.cs: - Updated after another emitcontext usage was clean up. It should help us to - synchronize with gmcs easier. - 2006-03-04 Marek Safar A fix for #77353. -- cgit v1.2.3 From 71b116433ca78a55c304bbc137c6bcdcab39cda1 Mon Sep 17 00:00:00 2001 From: Boris Kirzner Date: Mon, 27 Mar 2006 12:25:37 +0000 Subject: Fix possible NullReferenceException svn path=/trunk/mcs/; revision=58574 --- mcs/class/System.Data/Mono.Data.SqlExpressions/Aggregation.cs | 5 +++++ mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog | 3 +++ 2 files changed, 8 insertions(+) diff --git a/mcs/class/System.Data/Mono.Data.SqlExpressions/Aggregation.cs b/mcs/class/System.Data/Mono.Data.SqlExpressions/Aggregation.cs index 2f7e35f2693..5f27a849f2e 100644 --- a/mcs/class/System.Data/Mono.Data.SqlExpressions/Aggregation.cs +++ b/mcs/class/System.Data/Mono.Data.SqlExpressions/Aggregation.cs @@ -75,6 +75,7 @@ namespace Mono.Data.SqlExpressions { if (!other.column.Equals (column)) return false; + if (other.rows != null && rows != null) { if (other.rows.Length != rows.Length) return false; @@ -82,6 +83,10 @@ namespace Mono.Data.SqlExpressions { if (other.rows [i] != rows [i]) return false; + } + else if (!(other.rows == null && rows == null)) + return false; + return true; } diff --git a/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog b/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog index f5a7e31b601..b36259ca11d 100644 --- a/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog +++ b/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog @@ -1,3 +1,6 @@ +2006-03-27 Boris Kirzner + * Aggregation.cs: fix possible NullReferenceException. + 2006-02-03 Senganal T * ColumnReference.cs : -- cgit v1.2.3 From 9c2c8abc15abc81943cd252200f2c97d0d9ae787 Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Mon, 27 Mar 2006 12:43:12 +0000 Subject: *** merged revisions from mcs: 57916, 58040, 58050, 58115 svn path=/trunk/mcs/; revision=58577 --- mcs/errors/known-issues-gmcs | 2 -- mcs/gmcs/ChangeLog | 20 ++++++++++++++++++++ mcs/gmcs/class.cs | 19 +++++-------------- mcs/gmcs/typemanager.cs | 2 +- mcs/tests/known-issues-gmcs | 1 - 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/mcs/errors/known-issues-gmcs b/mcs/errors/known-issues-gmcs index 1317433fb56..a55c88eca1f 100644 --- a/mcs/errors/known-issues-gmcs +++ b/mcs/errors/known-issues-gmcs @@ -24,7 +24,6 @@ cs0560.cs cs0567.cs cs0612-2.cs NO ERROR cs0619-42.cs -cs0625-3.cs NO ERROR cs0631-2.cs cs0647-3.cs cs1035.cs @@ -51,7 +50,6 @@ gcs0146.cs gcs0305-2.cs gcs0305.cs gcs0308.cs -cs0553-2.cs cs1669-2.cs NO ERROR cs1677.cs cs0134-2.cs NO ERROR diff --git a/mcs/gmcs/ChangeLog b/mcs/gmcs/ChangeLog index 47481cecb25..eb4bae32754 100644 --- a/mcs/gmcs/ChangeLog +++ b/mcs/gmcs/ChangeLog @@ -1,3 +1,23 @@ +2006-03-17 Marek Safar + + * typemanager.cs.cs (GetInterfaces): Don't recreate 0-sized arrays. + +2006-03-15 Marek Safar + + * class.cs (FieldMember.Emit): ParentContainer is real parent for partial + classes. + +2006-03-15 Marek Safar + + * class.cs (Operator.Define): An error for base conversion was not + reported correctly. + +2006-03-13 Marek Safar + + A fix for #77593, #77574. + + * class.cs (MethodCore.CheckBase): Another if for operator. + 2006-03-18 Marek Safar A fix for #77822. diff --git a/mcs/gmcs/class.cs b/mcs/gmcs/class.cs index 72400fa75cc..f6790007327 100644 --- a/mcs/gmcs/class.cs +++ b/mcs/gmcs/class.cs @@ -3157,7 +3157,8 @@ namespace Mono.CSharp { } Type base_ret_type = null; - base_method = FindOutBaseMethod (ref base_ret_type); + if (IsOperator == null) + base_method = FindOutBaseMethod (ref base_ret_type); // method is override if (base_method != null) { @@ -5453,7 +5454,7 @@ namespace Mono.CSharp { OptAttributes.Emit (); } - if (Parent.HasExplicitLayout && ((status & Status.HAS_OFFSET) == 0) && (ModFlags & Modifiers.STATIC) == 0) { + if (((status & Status.HAS_OFFSET) == 0) && (ModFlags & Modifiers.STATIC) == 0 && ParentContainer.HasExplicitLayout) { Report.Error (625, Location, "`{0}': Instance field types marked with StructLayout(LayoutKind.Explicit) must have a FieldOffset attribute.", GetSignatureForError ()); } @@ -7428,15 +7429,6 @@ namespace Mono.CSharp { "enclosing type"); return false; } - - if (first_arg_type == TypeManager.object_type || - return_type == TypeManager.object_type){ - Report.Error ( - -8, Location, - "User-defined conversion cannot convert to or from " + - "object type"); - return false; - } if (first_arg_type.IsInterface || return_type.IsInterface){ Report.Error (552, Location, "User-defined conversion `{0}' cannot convert to or from an interface type", @@ -7444,9 +7436,8 @@ namespace Mono.CSharp { return false; } - if (first_arg_type.IsSubclassOf (return_type) - || return_type.IsSubclassOf (first_arg_type)){ - if (declaring_type.IsSubclassOf (return_type)) { + if (first_arg_type.IsSubclassOf (return_type) || return_type.IsSubclassOf (first_arg_type)) { + if (declaring_type.IsSubclassOf (return_type) || declaring_type.IsSubclassOf (first_arg_type)) { Report.Error (553, Location, "User-defined conversion `{0}' cannot convert to or from base class", GetSignatureForError ()); return false; diff --git a/mcs/gmcs/typemanager.cs b/mcs/gmcs/typemanager.cs index b8f82781aad..145c589ee17 100644 --- a/mcs/gmcs/typemanager.cs +++ b/mcs/gmcs/typemanager.cs @@ -2134,7 +2134,7 @@ public partial class TypeManager { return result; } else if (t is GenericTypeParameterBuilder){ Type[] type_ifaces = (Type []) builder_to_ifaces [t]; - if (type_ifaces == null) + if (type_ifaces == null || type_ifaces.Length == 0) type_ifaces = Type.EmptyTypes; iface_cache [t] = type_ifaces; diff --git a/mcs/tests/known-issues-gmcs b/mcs/tests/known-issues-gmcs index 8cbe1885418..cb85da6a065 100644 --- a/mcs/tests/known-issues-gmcs +++ b/mcs/tests/known-issues-gmcs @@ -10,7 +10,6 @@ test-anon-27.cs test-xml-027.cs test-465.cs IGNORE # need to fix the path separator to work both on Unix and Windows test-476.cs -test-495.cs test-anon-11.cs test-anon-36.cs test-498.cs -- cgit v1.2.3 From 6d92fba9a1a9c108f14efec38e878e6fb967fef4 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Mon, 27 Mar 2006 14:09:27 +0000 Subject: 2006-03-27 Carlos Alberto Cortez * SerialPort.cs: Inherit from Component, and use protected Events property to save the event handlers. Also add internal methods to trigger the events and remove pragmas. svn path=/trunk/mcs/; revision=58580 --- mcs/class/System/System.IO.Ports/ChangeLog | 6 +++ mcs/class/System/System.IO.Ports/SerialPort.cs | 52 +++++++++++++++++++++++--- 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/mcs/class/System/System.IO.Ports/ChangeLog b/mcs/class/System/System.IO.Ports/ChangeLog index 5f56d673888..589b57cf1d7 100644 --- a/mcs/class/System/System.IO.Ports/ChangeLog +++ b/mcs/class/System/System.IO.Ports/ChangeLog @@ -1,3 +1,9 @@ +2006-03-27 Carlos Alberto Cortez + + * SerialPort.cs: Inherit from Component, and use protected + Events property to save the event handlers. Also add internal + methods to trigger the events and remove pragmas. + 2006-03-15 Miguel de Icaza * SerialPort.cs: We will do detection of systems differently as we diff --git a/mcs/class/System/System.IO.Ports/SerialPort.cs b/mcs/class/System/System.IO.Ports/SerialPort.cs index 1e0bdefcc4e..fcf197a74ec 100644 --- a/mcs/class/System/System.IO.Ports/SerialPort.cs +++ b/mcs/class/System/System.IO.Ports/SerialPort.cs @@ -3,12 +3,13 @@ #if NET_2_0 using System; +using System.ComponentModel; using System.Text; using System.Runtime.InteropServices; namespace System.IO.Ports { - public class SerialPort /* : Component */ + public class SerialPort : Component { public const int InfiniteTimeout = -1; const int DefaultReadBufferSize = 4096; @@ -36,6 +37,9 @@ namespace System.IO.Ports int writeBufferLength; byte [] readBuffer; //byte [] writeBuffer; + object error_received = new object (); + object data_received = new object (); + object pin_changed = new object (); static string default_port_name = "ttyS0"; @@ -555,12 +559,48 @@ namespace System.IO.Ports throw new InvalidOperationException ("Specified port is not open."); } + internal void OnErrorReceived (SerialErrorReceivedEventArgs args) + { + SerialErrorReceivedEventHandler handler = + (SerialErrorReceivedEventHandler) Events [error_received]; + + if (handler != null) + handler (this, args); + } + + internal void OnDataReceived (SerialDataReceivedEventArgs args) + { + SerialDataReceivedEventHandler handler = + (SerialDataReceivedEventHandler) Events [data_received]; + + if (handler != null) + handler (this, args); + } + + internal void OnDataReceived (SerialPinChangedEventArgs args) + { + SerialPinChangedEventHandler handler = + (SerialPinChangedEventHandler) Events [pin_changed]; + + if (handler != null) + handler (this, args); + } + // events -#pragma warning disable 67 - public event SerialErrorReceivedEventHandler ErrorReceived; - public event SerialPinChangedEventHandler PinChanged; - public event SerialDataReceivedEventHandler DataReceived; -#pragma warning restore + public event SerialErrorReceivedEventHandler ErrorReceived { + add { Events.AddHandler (error_received, value); } + remove { Events.RemoveHandler (error_received, value); } + } + + public event SerialPinChangedEventHandler PinChanged { + add { Events.AddHandler (pin_changed, value); } + remove { Events.RemoveHandler (pin_changed, value); } + } + + public event SerialDataReceivedEventHandler DataReceived { + add { Events.AddHandler (data_received, value); } + remove { Events.RemoveHandler (data_received, value); } + } } public delegate void SerialDataReceivedEventHandler (object sender, SerialDataReceivedEventArgs e); -- cgit v1.2.3 From a7058776fade8a3e1fd56e2fb7c439e326aa8e6e Mon Sep 17 00:00:00 2001 From: Konstantin Triger Date: Mon, 27 Mar 2006 15:35:21 +0000 Subject: refactoring svn path=/trunk/mcs/; revision=58585 --- .../KeyMapperBase.cs | 90 +++++++++++----------- 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/mcs/class/System.Data/Mainsoft.Data.Configuration.jvm/KeyMapperBase.cs b/mcs/class/System.Data/Mainsoft.Data.Configuration.jvm/KeyMapperBase.cs index f4fff365862..5f3f55f71fb 100755 --- a/mcs/class/System.Data/Mainsoft.Data.Configuration.jvm/KeyMapperBase.cs +++ b/mcs/class/System.Data/Mainsoft.Data.Configuration.jvm/KeyMapperBase.cs @@ -58,39 +58,6 @@ namespace Mainsoft.Data.Configuration #endregion // Constructors - #region Properties - - public object this [object key] - { - get { - - if (!(key is String)) - throw new ArgumentException("key is not string"); - - string skey = (string)key; - - skey = GetConnectionStringKey(skey); - if (skey == null) - return null; - - return _dictionary[skey]; - } - - set { - if (!(key is String)) - throw new ArgumentException("key is not string"); - - string skey = (string)key; - - skey = GetConnectionStringKey(skey); - if (skey == null) - skey = (string)key; - - _dictionary[skey] = value; - } - } - #endregion // Properties - #region Methods public string GetConnectionStringKey (string key) @@ -221,49 +188,78 @@ namespace Mainsoft.Data.Configuration #region IDictionary Members - public bool IsFixedSize + public virtual bool IsFixedSize { get { return _dictionary.IsFixedSize; } } - public bool IsReadOnly + public virtual bool IsReadOnly { get { return _dictionary.IsReadOnly; } } - public ICollection Keys + public virtual ICollection Keys { get { return _dictionary.Keys; } } - public ICollection Values + public virtual object this [object key] { + get { + + if (!(key is String)) + throw new ArgumentException("key is not string"); + + string skey = (string)key; + + skey = GetConnectionStringKey(skey); + if (skey == null) + return null; + + return _dictionary[skey]; + } + + set { + if (!(key is String)) + throw new ArgumentException("key is not string"); + + string skey = (string)key; + + skey = GetConnectionStringKey(skey); + if (skey == null) + skey = (string)key; + + _dictionary[skey] = value; + } + } + + public virtual ICollection Values { get { return _dictionary.Values; } } - public void Add (object key, object value) + public virtual void Add (object key, object value) { _dictionary.Add ((string)key, (string)value); } - public void Clear () + public virtual void Clear () { _dictionary.Clear (); } - public bool Contains (object key) + public virtual bool Contains (object key) { return _dictionary.Contains (key); } - public IDictionaryEnumerator GetEnumerator () + public virtual IDictionaryEnumerator GetEnumerator () { return _dictionary.GetEnumerator (); } - public void Remove (object key) + public virtual void Remove (object key) { _dictionary.Remove ((string)key); } @@ -274,29 +270,29 @@ namespace Mainsoft.Data.Configuration IEnumerator IEnumerable.GetEnumerator () { - return _dictionary.GetEnumerator (); + return this.GetEnumerator(); } #endregion // IEnumerable Members #region ICollection Members - public bool IsSynchronized + public virtual bool IsSynchronized { get { return ((ICollection)_dictionary).IsSynchronized; } } - public int Count + public virtual int Count { get { return _dictionary.Count; } } - public void CopyTo (Array array, int index) + public virtual void CopyTo (Array array, int index) { _dictionary.CopyTo (array, index); } - public object SyncRoot + public virtual object SyncRoot { get {return ((ICollection)_dictionary).SyncRoot; } } -- cgit v1.2.3 From 8010aefa6883c912ac9d214d57dbc48576bd3b17 Mon Sep 17 00:00:00 2001 From: Vladimir Krasnov Date: Mon, 27 Mar 2006 15:46:45 +0000 Subject: * test_catalog.xml: fixed not working tests * almost_config.xml: fixed almost for not a bug * reference/HyperLinkColumn_DataTextField.aspx.xml, reference/HyperLinkColumn_DataNavigateUrlField.aspx.xml: removed reference results of removed tests * reference/WebControl_CopyBaseAttributes_W.aspx.xml: same * WebControl_CopyBaseAttributes_W.aspx.cs: removed tests that causes differences but decided to be not a bug * HyperLinkColumn_DataNavigateUrlField.aspx: removed tests that causes differences but decided to be not a bug * HyperLinkColumn_DataNavigateUrlField.aspx.cs: same * HyperLinkColumn_DataTextField.aspx: same * HyperLinkColumn_DataTextField.aspx.cs: same svn path=/trunk/mcs/; revision=58586 --- .../HyperLinkColumn/ChangeLog | 7 ++++ .../HyperLinkColumn_DataNavigateUrlField.aspx | 10 ----- .../HyperLinkColumn_DataNavigateUrlField.aspx.cs | 43 ---------------------- .../HyperLinkColumn_DataTextField.aspx | 3 -- .../HyperLinkColumn_DataTextField.aspx.cs | 24 ------------ .../System_Web_UI_WebControls/WebControl/ChangeLog | 4 ++ .../WebControl_CopyBaseAttributes_W.aspx.cs | 24 +++++++++--- .../Test/mainsoft/MainsoftWebTest/ChangeLog | 9 +++++ .../mainsoft/MainsoftWebTest/almost_config.xml | 5 ++- ...n_HyperLinkColumn_DataNavigateUrlField.aspx.xml | 28 -------------- ...nkColumn_HyperLinkColumn_DataTextField.aspx.xml | 15 -------- ...ontrol_WebControl_CopyBaseAttributes_W.aspx.xml | 10 ++--- .../Test/mainsoft/MainsoftWebTest/test_catalog.xml | 2 +- 13 files changed, 48 insertions(+), 136 deletions(-) create mode 100644 mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/ChangeLog create mode 100644 mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/WebControl/ChangeLog diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/ChangeLog b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/ChangeLog new file mode 100644 index 00000000000..7103b39e5ab --- /dev/null +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/ChangeLog @@ -0,0 +1,7 @@ +2006-03-27 Vladimir Krasnov + + * HyperLinkColumn_DataNavigateUrlField.aspx: removed tests that + causes differences but decided to be not a bug + * HyperLinkColumn_DataNavigateUrlField.aspx.cs: same + * HyperLinkColumn_DataTextField.aspx: same + * HyperLinkColumn_DataTextField.aspx.cs: same diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataNavigateUrlField.aspx b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataNavigateUrlField.aspx index 81a6b0a4ed7..bc47a5059b2 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataNavigateUrlField.aspx +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataNavigateUrlField.aspx @@ -26,9 +26,6 @@ - - - @@ -38,13 +35,6 @@ - - - - - - - diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataNavigateUrlField.aspx.cs b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataNavigateUrlField.aspx.cs index ded6518178f..52cc8c67ca1 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataNavigateUrlField.aspx.cs +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataNavigateUrlField.aspx.cs @@ -107,31 +107,6 @@ namespace GHTTests.System_Web_dll.System_Web_UI_WebControls GHTSubTestUnexpectedExceptionCaught(ex); } - GHTActiveSubTest = Ghtsubtest2; - try - { - DataGrid2.DataSource = GHTTests.GHDataSources.DSDataTable(0, 1, "http://"); - System.Web.UI.WebControls.HyperLinkColumn c_id = new System.Web.UI.WebControls.HyperLinkColumn(); - - c_id.DataNavigateUrlField = "NotExist"; - c_id.Text = "123"; - - DataGrid2.Columns.Add(c_id); - - DataGrid2.DataBind();; - - GHTSubTestAddResult(c_id.DataNavigateUrlField); - GHTSubTestExpectedExceptionNotCaught("HttpException"); - } - catch (HttpException eex) - { - GHTSubTestExpectedExceptionCaught(eex); - } - catch (Exception ex) - { - GHTSubTestUnexpectedExceptionCaught(ex); - } - GHTActiveSubTest = Ghtsubtest3; try { @@ -147,24 +122,6 @@ namespace GHTTests.System_Web_dll.System_Web_UI_WebControls GHTSubTestUnexpectedExceptionCaught(ex); } - GHTActiveSubTest = Ghtsubtest4; - try - { - DataGrid4.DataSource = GHTTests.GHDataSources.DSDataTable(0, 1, "http://"); - DataGrid4.DataBind();; - - GHTSubTestAddResult(( (System.Web.UI.WebControls.HyperLinkColumn)DataGrid4.Columns[0]).DataNavigateUrlField); - GHTSubTestExpectedExceptionNotCaught("HttpException"); - } - catch (HttpException eex) - { - GHTSubTestExpectedExceptionCaught(eex); - } - catch (Exception ex) - { - GHTSubTestUnexpectedExceptionCaught(ex); - } - GHTTestEnd(); } } diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataTextField.aspx b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataTextField.aspx index 5ef36dc701a..d75f0db38aa 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataTextField.aspx +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataTextField.aspx @@ -26,9 +26,6 @@ - - - diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataTextField.aspx.cs b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataTextField.aspx.cs index 8c87fa87a2a..55b898d2b5d 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataTextField.aspx.cs +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/HyperLinkColumn/HyperLinkColumn_DataTextField.aspx.cs @@ -106,30 +106,6 @@ namespace GHTTests.System_Web_dll.System_Web_UI_WebControls GHTSubTestUnexpectedExceptionCaught(ex); } - GHTActiveSubTest = Ghtsubtest2; - try - { - DataGrid2.DataSource = GHTTests.GHDataSources.DSDataTable(0, 1, "http://"); - System.Web.UI.WebControls.HyperLinkColumn c_id = new System.Web.UI.WebControls.HyperLinkColumn(); - - c_id.DataNavigateUrlField = "http://www.google.com"; - c_id.DataTextField = "NotExist"; - - DataGrid2.Columns.Add(c_id); - DataGrid2.DataBind();; - - GHTSubTestAddResult(c_id.DataTextField); - GHTSubTestExpectedExceptionNotCaught("HttpException"); - } - catch (HttpException eex) - { - GHTSubTestExpectedExceptionCaught(eex); - } - catch (Exception ex) - { - GHTSubTestUnexpectedExceptionCaught(ex); - } - GHTActiveSubTest = Ghtsubtest3; try { diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/WebControl/ChangeLog b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/WebControl/ChangeLog new file mode 100644 index 00000000000..b5cc7f9ea59 --- /dev/null +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/WebControl/ChangeLog @@ -0,0 +1,4 @@ +2006-03-27 Vladimir Krasnov + + * WebControl_CopyBaseAttributes_W.aspx.cs: removed tests that + causes differences but decided to be not a bug diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/WebControl/WebControl_CopyBaseAttributes_W.aspx.cs b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/WebControl/WebControl_CopyBaseAttributes_W.aspx.cs index 7b51bd4bf93..7257c2b2b53 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/WebControl/WebControl_CopyBaseAttributes_W.aspx.cs +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/WebControl/WebControl_CopyBaseAttributes_W.aspx.cs @@ -95,9 +95,15 @@ namespace GHTTests.System_Web_dll.System_Web_UI_WebControls this.GHTSubTestEnd(); try { - this.GHTSubTestBegin(ctrlType, "Enabled:"); - this.TestedControl.CopyBaseAttributes(this.btnEnabled); - this.Compare(this.TestedControl.Enabled, this.btnEnabled.Enabled); + if ((TestedControl is System.Web.UI.WebControls.Image) || + (TestedControl is System.Web.UI.WebControls.ImageButton)) { + this.GHTSubTestBegin(ctrlType, "Enabled:"); + this.GHTSubTestAddResult("Not supported for this control"); + } else { + this.GHTSubTestBegin(ctrlType, "Enabled:"); + this.TestedControl.CopyBaseAttributes(this.btnEnabled); + this.Compare(this.TestedControl.Enabled, this.btnEnabled.Enabled); + } } catch (Exception exception7) { @@ -109,9 +115,15 @@ namespace GHTTests.System_Web_dll.System_Web_UI_WebControls this.GHTSubTestEnd(); try { - this.GHTSubTestBegin(ctrlType, "ToolTip:"); - this.TestedControl.CopyBaseAttributes(this.btnToolTip); - this.Compare(this.TestedControl.ToolTip, this.btnToolTip.ToolTip); + if ((TestedControl is System.Web.UI.WebControls.ListBox) || + (TestedControl is System.Web.UI.WebControls.DropDownList)) { + this.GHTSubTestBegin(ctrlType, "ToolTip:"); + this.GHTSubTestAddResult("Not supported for this control"); + } else { + this.GHTSubTestBegin(ctrlType, "ToolTip:"); + this.TestedControl.CopyBaseAttributes(this.btnToolTip); + this.Compare(this.TestedControl.ToolTip, this.btnToolTip.ToolTip); + } } catch (Exception exception8) { diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/ChangeLog b/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/ChangeLog index 2b7d5f0cd5b..6bd56405a7d 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/ChangeLog +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/ChangeLog @@ -1,3 +1,12 @@ +2006-03-27 Vladimir Krasnov + + * test_catalog.xml: fixed not working tests + * almost_config.xml: fixed almost for not a bug + * reference/HyperLinkColumn_DataTextField.aspx.xml, + reference/HyperLinkColumn_DataNavigateUrlField.aspx.xml: removed refs + of removed tests + * reference/WebControl_CopyBaseAttributes_W.aspx.xml: same + 2006-02-23 Vladimir Krasnov * test_catalog.xml: fixed not working tests diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/almost_config.xml b/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/almost_config.xml index 51470aaae60..75e1282da5c 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/almost_config.xml +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/almost_config.xml @@ -8,7 +8,7 @@ - +