Nice/src/bossa/syntax customConstructor.nice,1.24,1.25 scope.nice,1.8,1.9 tools.nice,1.108,1.109

Arjan Boeijink <[email protected]> Sat, 26 Mar 2005 00:48:11 +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-serv27487/F:/nice/src/bossa/syntax

Modified Files:
	customConstructor.nice scope.nice tools.nice 
Log Message:
Maybe null return types for typescope lookups.

Index: tools.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v
retrieving revision 1.108
retrieving revision 1.109
diff -C2 -d -r1.108 -r1.109
*** tools.nice	25 Mar 2005 16:40:00 -0000	1.108
--- tools.nice	26 Mar 2005 00:48:09 -0000	1.109
***************
*** 189,192 ****
--- 189,196 ----
  List<VarSymbol> lookup(VarScope, LocatedString) = native List VarScope.lookup(LocatedString);
  List<VarSymbol> globalLookup(VarScope, LocatedString) = native List VarScope.globalLookup(LocatedString);
+ ?mlsub.typing.TypeConstructor globalLookup(TypeScope, String, ?Location) = native mlsub.typing.TypeConstructor TypeScope.globalLookup(String, Location);
+ ?mlsub.typing.TypeSymbol lookup(TypeScope, String, ?Location) = native mlsub.typing.TypeSymbol TypeScope.lookup(String, Location);
+ ?mlsub.typing.TypeSymbol lookup(TypeScope, String) = native mlsub.typing.TypeSymbol TypeScope.lookup(String);
+ ?mlsub.typing.TypeSymbol lookup(TypeScope, LocatedString) = native mlsub.typing.TypeSymbol TypeScope.lookup(LocatedString);
  Map<gnu.bytecode.Type,mlsub.typing.TypeConstructor> javaTypeConstructors(bossa.modules.Compilation ) = native bossa.modules.Compilation.javaTypeConstructors;
  Scope<VarSymbol> javaScope(bossa.modules.Compilation) = native bossa.modules.Compilation.javaScope;

Index: customConstructor.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/customConstructor.nice,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** customConstructor.nice	6 Mar 2005 01:34:26 -0000	1.24
--- customConstructor.nice	26 Mar 2005 00:48:09 -0000	1.25
***************
*** 43,47 ****
      super;
  
!     let tc = Node.getGlobalTypeScope().globalLookup(className);
      addConstructor(tc, this);
      classe = getNiceClass(tc);
--- 43,47 ----
      super;
  
!     let tc = notNull(Node.getGlobalTypeScope().globalLookup(className));
      addConstructor(tc, this);
      classe = getNiceClass(tc);

Index: scope.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/scope.nice,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** scope.nice	25 Mar 2005 16:40:00 -0000	1.8
--- scope.nice	26 Mar 2005 00:48:09 -0000	1.9
***************
*** 78,82 ****
    }
  
!   public mlsub.typing.TypeConstructor globalLookup(LocatedString name)
    {
      return this.globalLookup(name.toString(), name.location());
--- 78,82 ----
    }
  
!   public ?mlsub.typing.TypeConstructor globalLookup(LocatedString name)
    {
      return this.globalLookup(name.toString(), name.location());
***************
*** 85,94 ****
    globalLookup(name, loc)
    {
!     mlsub.typing.TypeSymbol res = this.lookup(name, loc);
  
      if (res instanceof mlsub.typing.TypeConstructor)
        return res;
  
!     return cast(null);
    }
  
--- 85,97 ----
    globalLookup(name, loc)
    {
!     let res = this.lookup(name, loc);
  
      if (res instanceof mlsub.typing.TypeConstructor)
        return res;
  
!     if (res != null)
!       Internal.warning("Non type-constructor found in global type scope");
! 
!     return null;
    }
  



-------------------------------------------------------
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