logo       

Nice/src/bossa/syntax customConstructor.nice,1.5,1.6 loop.nice,1.8,1.9 mono: msg#00068

Subject: Nice/src/bossa/syntax customConstructor.nice,1.5,1.6 loop.nice,1.8,1.9 monotype.nice,1.5,1.6 niceMethod.nice,1.1,1.2 tools.nice,1.82,1.83 TypeParameters.java,1.18,NONE
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1446/F:/nice/src/bossa/syntax

Modified Files:
        customConstructor.nice loop.nice monotype.nice niceMethod.nice 
        tools.nice 
Removed Files:
        TypeParameters.java 
Log Message:
Converted TypeParameters.

Index: customConstructor.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/customConstructor.nice,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** customConstructor.nice      20 Dec 2004 16:05:18 -0000      1.5
--- customConstructor.nice      20 Dec 2004 17:16:48 -0000      1.6
***************
*** 168,172 ****
  
    let res = createMonotypeConstructor
!       (classe, new TypeParameters(params), classe.location());
    res.nullness = Monotype.sure;
    return res;
--- 168,172 ----
  
    let res = createMonotypeConstructor
!       (classe, new TypeParameters(content: params), classe.location());
    res.nullness = Monotype.sure;
    return res;

Index: monotype.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/monotype.nice,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** monotype.nice       18 Dec 2004 22:04:59 -0000      1.5
--- monotype.nice       20 Dec 2004 17:16:48 -0000      1.6
***************
*** 40,44 ****
        }
  
!     mlsub.typing.Monotype[] resolvedParams = parameters.resolve(typeMap);
  
      try{
--- 40,44 ----
        }
  
!     mlsub.typing.Monotype[?] resolvedParams = 
parameters.resolve(notNull(typeMap));
  
      try{
***************
*** 47,51 ****
      catch(mlsub.typing.BadSizeEx e){
        // See if this is a class with default type parameters
!       let res = getTypeWithTC(notNull(lowlevelTC), resolvedParams);
        if (res == null)
          throw User.error(this, (tc!=null ? "Class "+tc : 
notNull(lowlevelTC).toString()) +
--- 47,51 ----
      catch(mlsub.typing.BadSizeEx e){
        // See if this is a class with default type parameters
!       let res = getTypeWithTC(notNull(lowlevelTC), cast(resolvedParams));
        if (res == null)
          throw User.error(this, (tc!=null ? "Class "+tc : 
notNull(lowlevelTC).toString()) +
***************
*** 60,64 ****
      Monotype res = createMonotypeConstructor
        (notNull(tc),
!        new TypeParameters(Monotype.substitute(map, 
notNull(parameters.content))),
         loc);
      res.nullness = this.nullness;
--- 60,64 ----
      Monotype res = createMonotypeConstructor
        (notNull(tc),
!        new TypeParameters(content: Monotype.substitute(map, 
notNull(parameters.content))),
         loc);
      res.nullness = this.nullness;
***************
*** 87,91 ****
  {
    return new MonotypeConstructor(tc: tc, 
!       parameters: parameters || new TypeParameters([]), loc: loc);
  }
  
--- 87,91 ----
  {
    return new MonotypeConstructor(tc: tc, 
!       parameters: parameters || new TypeParameters(content: []), loc: loc);
  }
  
***************
*** 94,99 ****
--- 94,120 ----
  {
    return new MonotypeConstructor(lowlevelTC: tc, parameters: parameters, loc: 
loc);
+ }
+ 
+ /**
+    Type parameters.
+    Holds a colloction of Monotype.
+ 
+ */
+ public class TypeParameters
+ {
+   public Monotype[] content;
+ 
+   mlsub.typing.Monotype[?] resolve(TypeMap ts)
+   {
+     return Monotype.resolve(ts, content);
+   }
+ 
+   toString() = Util.map("<",", ",">", content);
  }  
  
+ public TypeParameters createTypeParameters(List<Monotype> tps)
+ {
+   return new TypeParameters(content: Monotype.toArray(tps));
+ }
  /**
     Functional type.
***************
*** 173,177 ****
      assert tc instanceof MonotypeConstructor;
      let res = createMonotypeConstructor(notNull(tc.lowlevelTC), 
!        new TypeParameters(Monotype.substitute(map, parameters)), 
         loc);
      res.nullness = this.nullness;
--- 194,198 ----
      assert tc instanceof MonotypeConstructor;
      let res = createMonotypeConstructor(notNull(tc.lowlevelTC), 
!        new TypeParameters(content: Monotype.substitute(map, parameters)), 
         loc);
      res.nullness = this.nullness;

Index: loop.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/loop.nice,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** loop.nice   18 Dec 2004 19:41:01 -0000      1.8
--- loop.nice   20 Dec 2004 17:16:48 -0000      1.9
***************
*** 136,140 ****
        tparams.add(vartype);   
        itertype = createMonotypeConstructor(new TypeIdent(name: new 
LocatedString("Iterator", loc)),
!       new TypeParameters(tparams), loc);
        notNull(itertype).nullness = Monotype.sure;
      }
--- 136,140 ----
        tparams.add(vartype);   
        itertype = createMonotypeConstructor(new TypeIdent(name: new 
LocatedString("Iterator", loc)),
!       createTypeParameters(tparams), loc);
        notNull(itertype).nullness = Monotype.sure;
      }

Index: tools.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** tools.nice  20 Dec 2004 16:05:18 -0000      1.82
--- tools.nice  20 Dec 2004 17:16:48 -0000      1.83
***************
*** 209,214 ****
  ?gnu.bytecode.ClassType staticClass(Arguments) = native 
gnu.bytecode.ClassType Arguments.staticClass();
  ?gnu.bytecode.ClassType staticClass(Expression) = native 
gnu.bytecode.ClassType Expression.staticClass();
- TypeParameters TypeParameters(List<Monotype>) = native new 
bossa.syntax.TypeParameters(List);
- TypeParameters TypeParameters(Monotype[]) = native new 
bossa.syntax.TypeParameters(Monotype[]);
  ?String explainNoMatch(Arguments, List<VarSymbol>) = native String 
Arguments.explainNoMatch(List);
  Map<VarSymbol,mlsub.typing.Polytype> types(Arguments) = native 
Arguments.types;
--- 209,212 ----

--- TypeParameters.java DELETED ---

Index: niceMethod.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceMethod.nice,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** niceMethod.nice     19 Dec 2004 19:58:28 -0000      1.1
--- niceMethod.nice     20 Dec 2004 17:16:48 -0000      1.2
***************
*** 296,300 ****
            map.put(getAlikeID(), 
                createMonotypeConstructor(alikeTC,
!                       new TypeParameters(new ArrayList()), 
notNull(name.location())));
            returnType = returnType.substitute(map);
            params.substitute(map);
--- 296,300 ----
            map.put(getAlikeID(), 
                createMonotypeConstructor(alikeTC,
!                       createTypeParameters(new ArrayList()), 
notNull(name.location())));
            returnType = returnType.substitute(map);
            params.substitute(map);



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe