[svn] r6361: nemerle/trunk/tools/nemerlish: eval.n interp.n

nazgul svnadmin at nemerle.org
Thu Jun 1 21:13:32 CEST 2006


Log:
Make nemerlish reset after references change

Author: nazgul
Date: Thu Jun  1 21:13:30 2006
New Revision: 6361

Modified:
   nemerle/trunk/tools/nemerlish/eval.n
   nemerle/trunk/tools/nemerlish/interp.n

Modified: nemerle/trunk/tools/nemerlish/eval.n
==============================================================================
--- nemerle/trunk/tools/nemerlish/eval.n	(original)
+++ nemerle/trunk/tools/nemerlish/eval.n	Thu Jun  1 21:13:30 2006
@@ -43,7 +43,8 @@
     // [value]
     public static mutable vals : list [object] = [];
 
-    private mutable firstRun : bool = true;
+    public static mutable firstRun : bool = true;
+    private persistentMode : bool;
     
     public this (path : string) {
       this (true, path);
@@ -51,6 +52,7 @@
     
     public this (persistent_mode : bool, path : string = null) {
       base (CompilationOptions ());
+      this.persistentMode = persistent_mode;
       this.InitOutput (System.Console.Out);         
 
       when (path != null) {
@@ -58,7 +60,6 @@
         // the assemblies in nemish.exe directory can be loaded.
         Options.LibraryPaths ::= path;
       }
-      Options.PersistentLibraries = persistent_mode;
       Options.CompileToMemory = true;
       Options.IgnoreConfusion = true;
       Options.ProgressBar = false;
@@ -104,6 +105,7 @@
 
 //    Options.DumpTypedTree = true;
 //    Options.AdditionalDebug = true;
+      Options.PersistentLibraries = this.persistentMode && !firstRun;
       
       // Link ourselves.
       Options.ReferencedLibraries = System.Uri(this.GetType().Assembly.CodeBase).LocalPath :: 

Modified: nemerle/trunk/tools/nemerlish/interp.n
==============================================================================
--- nemerle/trunk/tools/nemerlish/interp.n	(original)
+++ nemerle/trunk/tools/nemerlish/interp.n	Thu Jun  1 21:13:30 2006
@@ -38,6 +38,7 @@
         Tl (Evaluator.refr).ToString (", ")
       }
       set { 
+        Evaluator.firstRun = true; // reset all stuff
         Evaluator.refr = interpassembly :: 
                          Split (Replace (value, @"\s", ""), [',']);
       }



More information about the svn mailing list