Nice/src/bossa/syntax methodDeclaration.nice,1.7,1.8 formalParameters.nice,1.10,1.11

Daniel Bonniot <[email protected]> Wed, 30 Mar 2005 11:43:04 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24070/src/bossa/syntax

Modified Files:
	methodDeclaration.nice formalParameters.nice 
Log Message:
Use fully qualified type names for parameters in compiled package interfaces
to avoid wasting time searching the qualified name when loading the package.


Index: methodDeclaration.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/methodDeclaration.nice,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** methodDeclaration.nice	28 Mar 2005 11:35:15 -0000	1.7
--- methodDeclaration.nice	30 Mar 2005 11:43:02 -0000	1.8
***************
*** 195,199 ****
      if(this.getType() == null)
        return "method " + this.getName();
!     
      return
        (syntacticConstraint != null ? notNull(syntacticConstraint)
--- 195,201 ----
      if(this.getType() == null)
        return "method " + this.getName();
! 
!     let domain = notNull(this.getType()).domain();
! 
      return
        (syntacticConstraint != null ? notNull(syntacticConstraint)
***************
*** 205,209 ****
        // parameters can be null if type was set lowlevel (native code, ...)
        + (parameters != null ?
! 	 notNull(parameters).toString() : Util.map("",", ","", notNull(this.getType()).domain()))
        + ")"
        ;
--- 207,211 ----
        // parameters can be null if type was set lowlevel (native code, ...)
        + (parameters != null ?
! 	 notNull(parameters).toString(domain) : Util.map("",", ","", domain))
        + ")"
        ;

Index: formalParameters.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/formalParameters.nice,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** formalParameters.nice	25 Mar 2005 16:40:00 -0000	1.10
--- formalParameters.nice	30 Mar 2005 11:43:02 -0000	1.11
***************
*** 185,188 ****
--- 185,194 ----
    toString() = Util.map("", ", ", "", parameters);
  
+   String toString(mlsub.typing.Monotype[] types)
+   {
+     int i = 0;
+     return parameters.map(Parameter p => p.toString(types[i++])).join(",");
+   }
+ 
    public List<Parameter> asList() = new ArrayList(parameters);
  
***************
*** 293,296 ****
--- 299,304 ----
    toString() = type.toString();
  
+   String toString(mlsub.typing.Monotype type) = type.toString();
+ 
    ?LocatedString getName() = null;
  
***************
*** 361,365 ****
    match(id) = name.toString().equals(id);
  
!   toString() = type + " " + name;
  }
  
--- 369,374 ----
    match(id) = name.toString().equals(id);
  
!   toString() = super + " " + name;
!   toString(type) = super + " " + name;
  }
  
***************
*** 424,428 ****
    {
      defaultValue = defaultValue.noOverloading();
!     return type + " " + name + " = " + defaultValue;
    }
  }
--- 433,443 ----
    {
      defaultValue = defaultValue.noOverloading();
!     return super + " = " + defaultValue;
!   }
! 
!   toString(type)
!   {
!     defaultValue = defaultValue.noOverloading();
!     return super + " = " + defaultValue;
    }
  }



-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click