2008-08-26 Miguel de Icaza <miguel@novell.com>
+ * Makefile: Drop BOOTSTRAP_COMPILER as that was masking the
+ limitations in Console, instead the 2.0 bootstrap libraries now
+ include the Console bits.
+
+ Also, remove the use of Nullables from getline.cs
+
+ ------------
+
Interactive support for the C# compiler. Use gmcs --shell to
enter a read-eval-print loop shell.
ifeq (net_2_0, $(PROFILE))
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/net_2_0_bootstrap/gmcs.exe $(DEBUG_FLAGS) -define:BOOTSTRAP_COMPILER
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/net_2_0_bootstrap/gmcs.exe $(DEBUG_FLAGS)
clean-local: clean-net_2_0_bootstrap
clean-net_2_0_bootstrap:
#endif
// Only compile this code in the 2.0 profile, but not in the Moonlight one
-#if (IN_MCS_BUILD && NET_2_0 && !SMCS_SOURCE && !BOOTSTRAP_COMPILER) || !IN_MCS_BUILD
+#if (IN_MCS_BUILD && NET_2_0 && !SMCS_SOURCE) || !IN_MCS_BUILD
using System;
using System.Text;
using System.IO;
delegate void KeyHandler ();
struct Handler {
- public ConsoleKeyInfo? CKI;
- public char? c;
+ public ConsoleKeyInfo CKI;
public KeyHandler KeyHandler;
public Handler (ConsoleKey key, KeyHandler h)
{
CKI = new ConsoleKeyInfo ((char) 0, key, false, false, false);
KeyHandler = h;
- c = null;
}
public Handler (char c, KeyHandler h)
{
KeyHandler = h;
- this.c = c;
- CKI = null;
+ // Use the "Zoom" as a flag that we only have a character.
+ CKI = new ConsoleKeyInfo ((char) c, ConsoleKey.Zoom, false, false, false);
}
public Handler (ConsoleKeyInfo cki, KeyHandler h)
{
CKI = cki;
KeyHandler = h;
- c = null;
}
public static Handler Control (char c, KeyHandler h)
bool handled = false;
foreach (Handler handler in handlers){
- if (handler.CKI.HasValue){
- ConsoleKeyInfo t = handler.CKI.Value;
-
- if (t.Key == cki.Key && t.Modifiers == cki.Modifiers){
- handled = true;
- handler.KeyHandler ();
- last_handler = handler.KeyHandler;
- break;
- }
- } else if (handler.c == cki.KeyChar){
+ ConsoleKeyInfo t = handler.CKI;
+
+ if (t.Key == cki.Key && t.Modifiers == cki.Modifiers){
+ handled = true;
+ handler.KeyHandler ();
+ last_handler = handler.KeyHandler;
+ break;
+ } else if (t.KeyChar == cki.KeyChar){
handled = true;
handler.KeyHandler ();
last_handler = handler.KeyHandler;
static int count;
static string current_debug_name;
-#if NET_2_0 && !SMCS_SOURCE && !BOOTSTRAP_COMPILER
+#if NET_2_0 && !SMCS_SOURCE
static Mono.Terminal.LineEditor editor;
static void SetupEditor ()
expr = Evaluate (expr);
}
-
- return 0;
}
return base.Equals (obj);
}
+ public override int GetHashCode ()
+ {
+ return name.GetHashCode ();
+ }
+
override public Expression DoResolveLValue (EmitContext ec, Expression right_side)
{
Expression ret = base.DoResolveLValue (ec, right_side);