[svn] r6366: nemerle/trunk: macros/Internals.n ncc/generation/DecisionTreeCompiler.n ncc/hierarchy/CustomA...

nazgul svnadmin at nemerle.org
Sun Jun 4 09:37:36 CEST 2006


Log:
Some cosmetic changes in obtaining ManagerClass

Author: nazgul
Date: Sun Jun  4 09:37:33 2006
New Revision: 6366

Modified:
   nemerle/trunk/macros/Internals.n
   nemerle/trunk/ncc/generation/DecisionTreeCompiler.n
   nemerle/trunk/ncc/hierarchy/CustomAttribute.n
   nemerle/trunk/ncc/parsing/AST.n
   nemerle/trunk/ncc/typing/TypedTree.n
   nemerle/trunk/ncc/typing/Typer.n

Modified: nemerle/trunk/macros/Internals.n
==============================================================================
--- nemerle/trunk/macros/Internals.n	(original)
+++ nemerle/trunk/macros/Internals.n	Sun Jun  4 09:37:33 2006
@@ -47,7 +47,7 @@
       | <[ _ ]> =>
        match (ConstantFolder.FoldConstants (f.ParsedName.GetEnv (t.GlobalEnv), val)) {
          | PT.PExpr.Literal (lit) =>
-           def mtype = lit.GetInternalType ();
+           def mtype = lit.GetInternalType (t.Manager.InternalType);
            f.ty = PrettyPrint.MTypeToParseTree (mtype);
 
          | <[ $_ : $ty ]> | <[ $_ :> $ty ]> =>

Modified: nemerle/trunk/ncc/generation/DecisionTreeCompiler.n
==============================================================================
--- nemerle/trunk/ncc/generation/DecisionTreeCompiler.n	(original)
+++ nemerle/trunk/ncc/generation/DecisionTreeCompiler.n	Sun Jun  4 09:37:33 2006
@@ -396,7 +396,7 @@
           (compare_to,
            Cast (TExpr.Literal (literal), compare_to.Type))
         else 
-          (Cast (compare_to, literal.GetInternalType ()),
+          (Cast (compare_to, literal.GetInternalType (compare_to.Type.Manager.InternalType)),
            TExpr.Literal (literal));
       TExpr.Call (InternalType.Boolean, method, [Parm (compare_to), Parm (lit)], false)
     }

Modified: nemerle/trunk/ncc/hierarchy/CustomAttribute.n
==============================================================================
--- nemerle/trunk/ncc/hierarchy/CustomAttribute.n	(original)
+++ nemerle/trunk/ncc/hierarchy/CustomAttribute.n	Sun Jun  4 09:37:33 2006
@@ -60,7 +60,7 @@
           Message.FatalError (expr.Location, "An attribute argument cannot be number of type decimal");
         
         | PT.PExpr.Literal (lit) =>
-          (lit.AsObject (), lit.GetInternalType ())
+          (lit.AsObject (), lit.GetInternalType (InternalType))
 
         | <[ typeof ($t) ]> when ti != null =>
           match (ti.BindType (t)) {

Modified: nemerle/trunk/ncc/parsing/AST.n
==============================================================================
--- nemerle/trunk/ncc/parsing/AST.n	(original)
+++ nemerle/trunk/ncc/parsing/AST.n	Sun Jun  4 09:37:33 2006
@@ -359,13 +359,12 @@
     public SystemType : System.Type
     {
       get {
-        GetInternalType ().SystemType
+        GetInternalType (ManagerClass.Instance.InternalType).SystemType
       }
     }
 
-    public GetInternalType () : MType
+    public GetInternalType (InternalType : InternalTypeClass) : MType
     {
-      def InternalType = ManagerClass.Instance.InternalType;
       match (this) {
         | Literal.Void => InternalType.Void
         | Literal.Null => InternalType.Object

Modified: nemerle/trunk/ncc/typing/TypedTree.n
==============================================================================
--- nemerle/trunk/ncc/typing/TypedTree.n	(original)
+++ nemerle/trunk/ncc/typing/TypedTree.n	Sun Jun  4 09:37:33 2006
@@ -156,12 +156,12 @@
 
             def ok =
               if (ty == null) {
-                ty = lit.GetInternalType ();
+                ty = lit.GetInternalType (par.Manager.InternalType);
                 true
               } else if (ty.IsFixed)
                 Typer.LiteralConversionPossible (lit, ty.FixedValue)
               else
-                ty.Provide (lit.GetInternalType ());
+                ty.Provide (lit.GetInternalType (par.Manager.InternalType));
             when (!ok)
               Message.Error (e.loc, 
                              $ "invalid type for default value of "
@@ -641,7 +641,7 @@
             | Error =>
               ty = Solver.FreshTyVar ()
             | TExpr.Literal (l) =>
-              ty = l.GetInternalType ()
+              ty = l.GetInternalType (InternalType)
             | Assign =>
               ty = InternalType.Void
             | HasType =>

Modified: nemerle/trunk/ncc/typing/Typer.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer.n	(original)
+++ nemerle/trunk/ncc/typing/Typer.n	Sun Jun  4 09:37:33 2006
@@ -820,7 +820,7 @@
 
     static internal LiteralConversionPossible (lit : Literal, target : MType) : bool
     {
-      def InternalType = ManagerClass.Instance.InternalType;
+      def InternalType = target.Manager.InternalType;
       match (lit) {
         | Literal.Integer (res, is_negative, _) =>
           if (target.Equals (InternalType.UInt64))
@@ -860,7 +860,7 @@
           ! (target is MType.TyVarRef)
 
         | _ =>
-          target.TryUnify (lit.GetInternalType ())
+          target.TryUnify (lit.GetInternalType (InternalType))
       }
     }
 



More information about the svn mailing list