[svn] r6330: nemerle/trunk/ncc: STATELESS-TODO typing/TypedTree.n

malekith svnadmin at nemerle.org
Wed May 24 20:17:25 CEST 2006


Log:
Get rid of true/false_literal.

Author: malekith
Date: Wed May 24 20:17:25 2006
New Revision: 6330

Modified:
   nemerle/trunk/ncc/STATELESS-TODO
   nemerle/trunk/ncc/typing/TypedTree.n

Modified: nemerle/trunk/ncc/STATELESS-TODO
==============================================================================
--- nemerle/trunk/ncc/STATELESS-TODO	(original)
+++ nemerle/trunk/ncc/STATELESS-TODO	Wed May 24 20:17:25 2006
@@ -1,5 +1,4 @@
 Modules:
-- InternalType/SystemType
 - MacroClasses.implicit_ctx_name
 - Stats
 - Util.current_id
@@ -19,7 +18,6 @@
 - LexerFile.store_comments
 - StaticTyVar.current_id
 - TyVar...
-- TypedTree.true/false_literal
 - Typer.DelayedTyping.current_id
 - Typer.OverloadSelection.better_type_cache
 - Typer.*_macro

Modified: nemerle/trunk/ncc/typing/TypedTree.n
==============================================================================
--- nemerle/trunk/ncc/typing/TypedTree.n	(original)
+++ nemerle/trunk/ncc/typing/TypedTree.n	Wed May 24 20:17:25 2006
@@ -997,30 +997,11 @@
     }
 
 
-    static mutable true_literal : TExpr;
-    static mutable false_literal : TExpr;
-    
     public static BoolLiteral (val : bool) : TExpr
     {
-      when (true_literal == null) {
         def InternalType = ManagerClass.Instance.InternalType;
-        false_literal = 
-          TExpr.Literal (InternalType.Boolean,
-                         Nemerle.Compiler.Literal.Bool (false));
-        true_literal = 
           TExpr.Literal (InternalType.Boolean,
-                         Nemerle.Compiler.Literal.Bool (true));
-      }
-
-      if (val) true_literal else false_literal
-    }
-
-    static this ()
-    {
-      ManagerClass.Instance.OnInit += fun () {
-        true_literal = null;
-        false_literal = null;
-      }
+                     Nemerle.Compiler.Literal.Bool (val));
     }
 
     public static TrueLiteral : TExpr { get { BoolLiteral (true) } }



More information about the svn mailing list