[Nice-commit] Nice/src/bossa/syntax alternative.nice,1.11,1.12 block.nice,1.5,1.6 compilation.nice,1
Brought to you by:
bonniot
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15663/F:/nice/src/bossa/syntax Modified Files: alternative.nice block.nice compilation.nice constant.nice constructor.nice defaultconstructor.nice dispatchTest.nice enum.nice exceptions.nice formalParameters.nice globalvar.nice importedconstructor.nice inline.nice javaclass.nice javaFieldAccess.nice javaMethod.nice methodbody.nice monotype.nice niceclass.nice niceMethod.nice pattern.nice return.nice scope.nice super.nice symbol.nice tools.nice tuple.nice typecheck.nice typeConstructors.nice typedef.nice typeIdent.nice Log Message: Nullness cleanup. Index: typeIdent.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typeIdent.nice,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** typeIdent.nice 16 Jan 2005 00:28:21 -0000 1.6 --- typeIdent.nice 25 Mar 2005 16:40:00 -0000 1.7 *************** *** 37,41 **** public mlsub.typing.TypeSymbol resolveToTypeSymbol(TypeMap scope) { ! let res = notNull(scope).lookup(name); if (res == null) throw unknownIdent(name); --- 37,41 ---- public mlsub.typing.TypeSymbol resolveToTypeSymbol(TypeMap scope) { ! let res = scope.lookup(name); if (res == null) throw unknownIdent(name); Index: block.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/block.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** block.nice 22 Feb 2005 10:27:09 -0000 1.5 --- block.nice 25 Mar 2005 16:40:00 -0000 1.6 *************** *** 104,108 **** } ! return this.addLocals(locals.iterator(), notNull(gnu.expr.QuoteExp.voidExp)); } --- 104,108 ---- } ! return this.addLocals(locals.iterator(), gnu.expr.QuoteExp.voidExp); } Index: scope.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/scope.nice,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** scope.nice 12 Mar 2005 02:41:47 -0000 1.7 --- scope.nice 25 Mar 2005 16:40:00 -0000 1.8 *************** *** 90,96 **** return res; - if (res != null) - Internal.warning("Non type-constructor found in global type scope"); - return cast(null); } --- 90,93 ---- Index: return.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/return.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** return.nice 7 Mar 2005 17:10:51 -0000 1.5 --- return.nice 25 Mar 2005 16:40:00 -0000 1.6 *************** *** 49,53 **** generateCode() { ! return notNull(nice.tools.code.Gen.returnVoid()); } --- 49,53 ---- generateCode() { ! return nice.tools.code.Gen.returnVoid(); } Index: tuple.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tuple.nice,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tuple.nice 16 Jan 2005 00:28:21 -0000 1.6 --- tuple.nice 25 Mar 2005 16:40:00 -0000 1.7 *************** *** 150,154 **** { letExp = new gnu.expr.LetExp([array]); ! let tupleDecl = notNull(letExp).addDeclaration("tupleRef", arrayType); //FIXME: CanRead should be set automatically. --- 150,154 ---- { letExp = new gnu.expr.LetExp([array]); ! let tupleDecl = letExp.addDeclaration("tupleRef", arrayType); //FIXME: CanRead should be set automatically. Index: compilation.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/compilation.nice,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** compilation.nice 14 Jan 2005 22:47:11 -0000 1.6 --- compilation.nice 25 Mar 2005 16:40:00 -0000 1.7 *************** *** 19,24 **** */ ! let gnu.bytecode.Method newError = notNull(gnu.bytecode.ClassType. ! make("java.lang.Error")).getDeclaredMethod("<init>", [cast(gnu.bytecode.Type.string_type)]); --- 19,24 ---- */ ! let gnu.bytecode.Method newError = gnu.bytecode.ClassType. ! make("java.lang.Error").getDeclaredMethod("<init>", [cast(gnu.bytecode.Type.string_type)]); Index: niceclass.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceclass.nice,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** niceclass.nice 13 Mar 2005 05:53:46 -0000 1.27 --- niceclass.nice 25 Mar 2005 16:40:00 -0000 1.28 *************** *** 455,459 **** let sym = asTypeSymbol(typeParameters[i]); scope.addMapping(ourSym.toString(), sym); ! notNull(map).put(ourSym, sym); } catch(TypeScope.DuplicateName e) {} } --- 455,459 ---- let sym = asTypeSymbol(typeParameters[i]); scope.addMapping(ourSym.toString(), sym); ! map.put(ourSym, sym); } catch(TypeScope.DuplicateName e) {} } Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** typecheck.nice 8 Mar 2005 19:33:19 -0000 1.129 --- typecheck.nice 25 Mar 2005 16:40:00 -0000 1.130 *************** *** 295,301 **** { ?List<MonoSymbol> notNullIfFalse0 = ! second_(nullnessInfo(notNull(test.arguments.getExp(0)))); ?List<MonoSymbol> notNullIfFalse1 = ! second_(nullnessInfo(notNull(test.arguments.getExp(1)))); // If this test is false, it is because both subtests are. --- 295,301 ---- { ?List<MonoSymbol> notNullIfFalse0 = ! second_(nullnessInfo(test.arguments.getExp(0))); ?List<MonoSymbol> notNullIfFalse1 = ! second_(nullnessInfo(test.arguments.getExp(1))); // If this test is false, it is because both subtests are. *************** *** 306,312 **** { ?List<MonoSymbol> notNullIfTrue0 = ! first_(nullnessInfo(notNull(test.arguments.getExp(0)))); ?List<MonoSymbol> notNullIfTrue1 = ! first_(nullnessInfo(notNull(test.arguments.getExp(1)))); // If this test is true, it is because both subtests are. --- 306,312 ---- { ?List<MonoSymbol> notNullIfTrue0 = ! first_(nullnessInfo(test.arguments.getExp(0))); ?List<MonoSymbol> notNullIfTrue1 = ! first_(nullnessInfo(test.arguments.getExp(1))); // If this test is true, it is because both subtests are. *************** *** 323,334 **** int varPosition; ! if (isNull(notNull(test.arguments.getExp(0)))) varPosition = 1; ! else if (isNull(notNull(test.arguments.getExp(1)))) varPosition = 0; else // Give up. return (null, null); ! ?MonoSymbol variable = localVariable(notNull(test.arguments.getExp(varPosition))); if (variable == null) return (null, null); --- 323,334 ---- int varPosition; ! if (isNull(test.arguments.getExp(0))) varPosition = 1; ! else if (isNull(test.arguments.getExp(1))) varPosition = 0; else // Give up. return (null, null); ! ?MonoSymbol variable = localVariable(test.arguments.getExp(varPosition)); if (variable == null) return (null, null); *************** *** 379,385 **** { ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfFalse0 = ! second_(instanceofInfo(notNull(test.arguments.getExp(0)))); ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfFalse1 = ! second_(instanceofInfo(notNull(test.arguments.getExp(1)))); return (null, combine(instanceofIfFalse0, instanceofIfFalse1)); --- 379,385 ---- { ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfFalse0 = ! second_(instanceofInfo(test.arguments.getExp(0))); ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfFalse1 = ! second_(instanceofInfo(test.arguments.getExp(1))); return (null, combine(instanceofIfFalse0, instanceofIfFalse1)); *************** *** 389,395 **** { ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfTrue0 = ! first_(instanceofInfo(notNull(test.arguments.getExp(0)))); ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfTrue1 = ! first_(instanceofInfo(notNull(test.arguments.getExp(1)))); return (combine(instanceofIfTrue0, instanceofIfTrue1), null); --- 389,395 ---- { ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfTrue0 = ! first_(instanceofInfo(test.arguments.getExp(0))); ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfTrue1 = ! first_(instanceofInfo(test.arguments.getExp(1))); return (combine(instanceofIfTrue0, instanceofIfTrue1), null); *************** *** 400,404 **** (?List<(MonoSymbol, mlsub.typing.Monotype)> ifTrue, ?List<(MonoSymbol, mlsub.typing.Monotype)> ifFalse) = ! instanceofInfo(notNull(test.arguments.getExp(0))); return (ifFalse, ifTrue); } --- 400,404 ---- (?List<(MonoSymbol, mlsub.typing.Monotype)> ifTrue, ?List<(MonoSymbol, mlsub.typing.Monotype)> ifFalse) = ! instanceofInfo(test.arguments.getExp(0)); return (ifFalse, ifTrue); } *************** *** 916,920 **** ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfTrue = ! first_(instanceofInfo(notNull(whileExp))); if (instanceofIfTrue != null) --- 916,920 ---- ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfTrue = ! first_(instanceofInfo(whileExp)); if (instanceofIfTrue != null) *************** *** 963,969 **** } catch(WrongReturnType e){ ! if (notNullError(notNull(e.typingException), r, String.valueOf(r.value))) wrongReturnType(r, r.returnType().toString(), ! valueOf(e.expectedReturnType), notNull(e.typingException)); } catch(IncompatibleReturnType e){ --- 963,969 ---- } catch(WrongReturnType e){ ! if (notNullError(e.typingException, r, String.valueOf(r.value))) wrongReturnType(r, r.returnType().toString(), ! valueOf(e.expectedReturnType), e.typingException); } catch(IncompatibleReturnType e){ *************** *** 986,990 **** catch(WrongReturnType e){ wrongReturnType(r, r.returnType().toString(), ! valueOf(e.expectedReturnType), notNull(e.typingException)); } catch(IncompatibleReturnType e){ --- 986,990 ---- catch(WrongReturnType e){ wrongReturnType(r, r.returnType().toString(), ! valueOf(e.expectedReturnType), e.typingException); } catch(IncompatibleReturnType e){ *************** *** 1062,1067 **** to keep track of the lowlevel exception. */ ! let tc1 = notNull(ex.getM1()).head(); ! let tc2 = notNull(ex.getM2()).head(); if (tc1 == tc2) return false; --- 1062,1067 ---- to keep track of the lowlevel exception. */ ! let tc1 = ex.getM1().head(); ! let tc2 = ex.getM2().head(); if (tc1 == tc2) return false; Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** tools.nice 11 Mar 2005 17:35:52 -0000 1.107 --- tools.nice 25 Mar 2005 16:40:00 -0000 1.108 *************** *** 51,58 **** mlsub.typing.Monotype makeSure(mlsub.typing.Monotype m) = ! notNull(sureMonotype(nice.tools.typing.Types.rawType(m))); mlsub.typing.Monotype makeUnsure(mlsub.typing.Monotype m) = ! notNull(maybeMonotype(nice.tools.typing.Types.rawType(m))); mlsub.typing.Monotype sureMonotype(?mlsub.typing.Monotype type) = --- 51,58 ---- mlsub.typing.Monotype makeSure(mlsub.typing.Monotype m) = ! sureMonotype(nice.tools.typing.Types.rawType(m)); mlsub.typing.Monotype makeUnsure(mlsub.typing.Monotype m) = ! maybeMonotype(nice.tools.typing.Types.rawType(m)); mlsub.typing.Monotype sureMonotype(?mlsub.typing.Monotype type) = Index: niceMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceMethod.nice,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** niceMethod.nice 8 Mar 2005 16:03:28 -0000 1.24 --- niceMethod.nice 25 Mar 2005 16:40:00 -0000 1.25 *************** *** 283,287 **** { itf = cast(container); ! tc = notNull(itf).associatedTC(); } --- 283,287 ---- { itf = cast(container); ! tc = itf.associatedTC(); } Index: pattern.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/pattern.nice,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** pattern.nice 25 Mar 2005 13:46:59 -0000 1.22 --- pattern.nice 25 Mar 2005 16:40:00 -0000 1.23 *************** *** 248,252 **** { if (ti.toString().equals("Object")) ! return new NotNullPattern(name: name, tc: nice.tools.typing.PrimitiveType.sureTC, loc: notNull(name.location)); return new TypePattern(name: name, typeConstructor: ti, loc: name.location(), exactlyAt: false); --- 248,252 ---- { if (ti.toString().equals("Object")) ! return new NotNullPattern(name: name, tc: nice.tools.typing.PrimitiveType.sureTC, loc: name.location); return new TypePattern(name: name, typeConstructor: ti, loc: name.location(), exactlyAt: false); Index: javaFieldAccess.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/javaFieldAccess.nice,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** javaFieldAccess.nice 6 Mar 2005 01:34:26 -0000 1.7 --- javaFieldAccess.nice 25 Mar 2005 16:40:00 -0000 1.8 *************** *** 75,81 **** { c = type; ! assert c != null; // Typechecker limitation ! // remembers the fully qualified name ! className.content = c.getName(); for (?gnu.bytecode.Field f = c.getFields(); f != null; f = f.getNext()) --- 75,80 ---- { c = type; ! // remembers the fully qualified name ! className.content = c.getName(); for (?gnu.bytecode.Field f = c.getFields(); f != null; f = f.getNext()) Index: alternative.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/alternative.nice,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** alternative.nice 6 Mar 2005 01:34:26 -0000 1.11 --- alternative.nice 25 Mar 2005 16:39:59 -0000 1.12 *************** *** 127,135 **** // XXX change to LinkedList l = new ArrayList(); ! alternativesMap.put(fullName,notNull(l)); } // Dispatch.sort(final List alternatives) assumes that new alternatives // are added at the end ! notNull(l).add(this); } --- 127,135 ---- // XXX change to LinkedList l = new ArrayList(); ! alternativesMap.put(fullName, l); } // Dispatch.sort(final List alternatives) assumes that new alternatives // are added at the end ! l.add(this); } *************** *** 151,157 **** { newPatterns = cast(new Pattern[patterns.length]); ! System.arraycopy(patterns, 0, notNull(newPatterns), 0, i); } ! notNull(newPatterns)[i] = createPattern (patterns[i].getName(), nice.tools.typing.Types.concreteConstructor(notNull(parameters)[i]), --- 151,157 ---- { newPatterns = cast(new Pattern[patterns.length]); ! System.arraycopy(patterns, 0, newPatterns, 0, i); } ! newPatterns[i] = createPattern (patterns[i].getName(), nice.tools.typing.Types.concreteConstructor(notNull(parameters)[i]), Index: formalParameters.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/formalParameters.nice,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** formalParameters.nice 13 Mar 2005 03:24:05 -0000 1.9 --- formalParameters.nice 25 Mar 2005 16:40:00 -0000 1.10 *************** *** 204,208 **** if (res == null) res = cast(new java.util.Stack[this.size()]); ! notNull(res)[i] = notNull(notNull(param.symbol).copies); } } --- 204,208 ---- if (res == null) res = cast(new java.util.Stack[this.size()]); ! res[i] = notNull(notNull(param.symbol).copies); } } Index: exceptions.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/exceptions.nice,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** exceptions.nice 16 Jan 2005 00:28:21 -0000 1.11 --- exceptions.nice 25 Mar 2005 16:40:00 -0000 1.12 *************** *** 41,45 **** StringBuffer msg = new StringBuffer(100); msg.append("Incorrect type in assignment to ").append(target); ! msg.append("\nFound : ").append(notNull(value.getType()).toString()); msg.append("\nExpected: ").append(targetType); return new bossa.util.UserError(responsible, msg.toString()); --- 41,45 ---- StringBuffer msg = new StringBuffer(100); msg.append("Incorrect type in assignment to ").append(target); ! msg.append("\nFound : ").append(value.getType().toString()); msg.append("\nExpected: ").append(targetType); return new bossa.util.UserError(responsible, msg.toString()); Index: constructor.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/constructor.nice,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** constructor.nice 16 Jan 2005 21:51:15 -0000 1.9 --- constructor.nice 25 Mar 2005 16:40:00 -0000 1.10 *************** *** 56,60 **** //No such field ! List<String> nonmatching = notNull(arguments).noMatchByName(notNull(parameters)); if (!nonmatching.isEmpty()) { --- 56,60 ---- //No such field ! List<String> nonmatching = arguments.noMatchByName(parameters); if (!nonmatching.isEmpty()) { *************** *** 67,74 **** //an explanation of the syntax is necessary res = new StringBuffer(); ! List<Parameter> missing = notNull(arguments).missingArgs(notNull(parameters)); List<Parameter> fieldsToList; ! if (notNull(arguments).size() == 0) { res.append("Fields of class ").append(name) --- 67,74 ---- //an explanation of the syntax is necessary res = new StringBuffer(); ! List<Parameter> missing = arguments.missingArgs(notNull(parameters)); List<Parameter> fieldsToList; ! if (arguments.size() == 0) { res.append("Fields of class ").append(name) Index: methodbody.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/methodbody.nice,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** methodbody.nice 13 Mar 2005 03:08:13 -0000 1.15 --- methodbody.nice 25 Mar 2005 16:40:00 -0000 1.16 *************** *** 53,57 **** d.registerForDispatch(); if (isInterfaceTC(notNull(formals[0].tc))) ! User.error(this, notNull(name) + " is a native method. Dispatch can only occur if the first argument is not an interface."); } else if (! (d instanceof NiceMethod)) --- 53,57 ---- d.registerForDispatch(); if (isInterfaceTC(notNull(formals[0].tc))) ! User.error(this, name + " is a native method. Dispatch can only occur if the first argument is not an interface."); } else if (! (d instanceof NiceMethod)) *************** *** 471,475 **** } ! toString() = notNull(name) + "(" + Util.map("", ", ", "", formals) + ")"; } --- 471,475 ---- } ! toString() = name + "(" + Util.map("", ", ", "", formals) + ")"; } Index: dispatchTest.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/dispatchTest.nice,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dispatchTest.nice 24 Mar 2005 22:36:46 -0000 1.10 --- dispatchTest.nice 25 Mar 2005 16:40:00 -0000 1.11 *************** *** 172,181 **** for (a : alternatives) { ! if (len != notNull(a.patterns).length) Internal.error("Expected number of patterns is " + len + ".\nThe incorrect alternative: " + a); for (int i = 0; i < len; i++) ! if (! notNull(a.patterns)[i].atAny()) res[2*i] = res[2*i + 1] = true; } --- 172,181 ---- for (a : alternatives) { ! if (len != a.patterns.length) Internal.error("Expected number of patterns is " + len + ".\nThe incorrect alternative: " + a); for (int i = 0; i < len; i++) ! if (! a.patterns[i].atAny()) res[2*i] = res[2*i + 1] = true; } Index: enum.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/enum.nice,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** enum.nice 7 Mar 2005 17:10:51 -0000 1.20 --- enum.nice 25 Mar 2005 16:40:00 -0000 1.21 *************** *** 133,137 **** { res = new gnu.expr.Declaration(notNull(name).toString(), nice.tools.code.Types.javaType(type)); ! this.setDeclaration(notNull(res)); definition.module.pkg.addGlobalVar(res, true); } --- 133,137 ---- { res = new gnu.expr.Declaration(notNull(name).toString(), nice.tools.code.Types.javaType(type)); ! this.setDeclaration(res); definition.module.pkg.addGlobalVar(res, true); } Index: inline.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/inline.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** inline.nice 6 Mar 2005 01:34:26 -0000 1.5 --- inline.nice 25 Mar 2005 16:40:00 -0000 1.6 *************** *** 57,61 **** try{ m = notNull(refClass).getMethod("create", [String.class]); ! if (! java.lang.reflect.Modifier.isStatic(notNull(m).getModifiers())) throw new NoSuchMethodException(); } --- 57,61 ---- try{ m = notNull(refClass).getMethod("create", [String.class]); ! if (! java.lang.reflect.Modifier.isStatic(m.getModifiers())) throw new NoSuchMethodException(); } Index: typedef.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typedef.nice,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** typedef.nice 22 Mar 2005 15:32:16 -0000 1.22 --- typedef.nice 25 Mar 2005 16:40:00 -0000 1.23 *************** *** 111,115 **** void createTC() { ! String name = notNull(this.name).toString(); if (name.equals("nice.lang.Array")) --- 111,115 ---- void createTC() { ! String name = this.name.toString(); if (name.equals("nice.lang.Array")) *************** *** 301,305 **** for (MonotypeConstructor parent : names) { ! this.useInheritanceParams(this.resolveParams(parent, notNull(this.getLocalScope()))); let name = notNull(parent.tc); --- 301,305 ---- for (MonotypeConstructor parent : names) { ! this.useInheritanceParams(this.resolveParams(parent, this.getLocalScope())); let name = notNull(parent.tc); *************** *** 319,323 **** javaInterfaces = new ArrayList(5); ! notNull(javaInterfaces).add(s); } else --- 319,323 ---- javaInterfaces = new ArrayList(5); ! javaInterfaces.add(s); } else *************** *** 479,483 **** this.useInheritanceParams(this.resolveParams(s, this.getLocalScope())); let superClass = notNull(s.tc).resolveToTC(notNull(typeScope)); ! let name = notNull(this.name); this.superClass = superClass; --- 479,483 ---- this.useInheritanceParams(this.resolveParams(s, this.getLocalScope())); let superClass = notNull(s.tc).resolveToTC(notNull(typeScope)); ! let name = this.name; this.superClass = superClass; *************** *** 877,881 **** // Assume non-variance ! return notNull(parent.parameters).content.length; } --- 877,881 ---- // Assume non-variance ! return parent.parameters.content.length; } Index: constant.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/constant.nice,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** constant.nice 21 Mar 2005 17:37:41 -0000 1.18 --- constant.nice 25 Mar 2005 16:40:00 -0000 1.19 *************** *** 498,502 **** ?mlsub.typing.TypeConstructor getTC() { ! return notNull(nice.tools.typing.Types.rawType(representedType)).head(); } --- 498,502 ---- ?mlsub.typing.TypeConstructor getTC() { ! return nice.tools.typing.Types.rawType(representedType).head(); } *************** *** 522,526 **** String fullName = name.toString(); if (root != null) ! fullName =notNull(root.name).append(".").append(fullName).toString(); ?mlsub.typing.TypeConstructor tc = --- 522,526 ---- String fullName = name.toString(); if (root != null) ! fullName = root.name.append(".").append(fullName).toString(); ?mlsub.typing.TypeConstructor tc = Index: defaultconstructor.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/defaultconstructor.nice,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** defaultconstructor.nice 1 Mar 2005 17:36:36 -0000 1.6 --- defaultconstructor.nice 25 Mar 2005 16:40:00 -0000 1.7 *************** *** 141,145 **** let gnu.expr.Expression objectConstructor = new gnu.expr.QuoteExp (new gnu.expr.InitializeProc( ! notNull(gnu.bytecode.Type.pointer_type).getDeclaredMethod("<init>", 0))); /** --- 141,145 ---- let gnu.expr.Expression objectConstructor = new gnu.expr.QuoteExp (new gnu.expr.InitializeProc( ! gnu.bytecode.Type.pointer_type.getDeclaredMethod("<init>", 0))); /** Index: javaMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/javaMethod.nice,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** javaMethod.nice 11 Mar 2005 17:35:52 -0000 1.10 --- javaMethod.nice 25 Mar 2005 16:40:00 -0000 1.11 *************** *** 119,124 **** knownMethods.put(m.getName(), methods = new ArrayList()); - assert methods != null; - methods.add(m); } --- 119,122 ---- *************** *** 284,289 **** superClass = gnu.bytecode.Type.pointer_type; - assert superClass != null; // Typechecker limitation - res = alreadyHasMethod(superClass,m); if (res != null) --- 282,285 ---- *************** *** 342,346 **** { if (javaObjectConstructor == null) ! javaObjectConstructor = makeJavaMethod(getDeclaredMethod(notNull(gnu.bytecode.Type.pointer_type),"<init>", 0), true); return notNull(javaObjectConstructor); --- 338,342 ---- { if (javaObjectConstructor == null) ! javaObjectConstructor = makeJavaMethod(getDeclaredMethod(gnu.bytecode.Type.pointer_type,"<init>", 0), true); return notNull(javaObjectConstructor); Index: typeConstructors.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typeConstructors.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** typeConstructors.nice 24 Mar 2005 22:36:46 -0000 1.4 --- typeConstructors.nice 25 Mar 2005 16:40:00 -0000 1.5 *************** *** 40,46 **** { l = new LinkedList(); ! constructorsMap.put(tc, notNull(l)); } ! notNull(l).add(m.getSymbol()); } --- 40,46 ---- { l = new LinkedList(); ! constructorsMap.put(tc, l); } ! l.add(m.getSymbol()); } Index: symbol.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/symbol.nice,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** symbol.nice 10 Mar 2005 23:42:38 -0000 1.15 --- symbol.nice 25 Mar 2005 16:40:00 -0000 1.16 *************** *** 163,167 **** let k = nice.tools.typing.Types.rawType(type).getKind(); if (k instanceof mlsub.typing.FunTypeKind) ! if (!notNull(arguments).plainApplication(k.domainArity, this)) return 0; else --- 163,167 ---- let k = nice.tools.typing.Types.rawType(type).getKind(); if (k instanceof mlsub.typing.FunTypeKind) ! if (!arguments.plainApplication(k.domainArity, this)) return 0; else *************** *** 177,182 **** { int arity = k.domainArity; ! if (notNull(arguments).size() != arity) ! return notNull(name) + Util.has(arity, "parameter", notNull(arguments).size()); else // If the number of arguments is correct, it must be that --- 177,182 ---- { int arity = k.domainArity; ! if (arguments.size() != arity) ! return notNull(name) + Util.has(arity, "parameter", arguments.size()); else // If the number of arguments is correct, it must be that *************** *** 292,296 **** mlsub.typing.Monotype m = nice.tools.typing.Types.rawType( ! notNull(this.getType()).getMonotype()); if (m instanceof mlsub.typing.FunType) return bossa.util.Util.map("", ", ", "", m.domain()); --- 292,296 ---- mlsub.typing.Monotype m = nice.tools.typing.Types.rawType( ! this.getType().getMonotype()); if (m instanceof mlsub.typing.FunType) return bossa.util.Util.map("", ", ", "", m.domain()); Index: javaclass.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/javaclass.nice,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** javaclass.nice 11 Mar 2005 17:35:52 -0000 1.8 --- javaclass.nice 25 Mar 2005 16:40:00 -0000 1.9 *************** *** 244,248 **** return null; ! let compilation = notNull(Node.compilation); if (compilation.javaTypeConstructors.containsKey(classType)) --- 244,248 ---- return null; ! let compilation = Node.compilation; if (compilation.javaTypeConstructors.containsKey(classType)) Index: super.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/super.nice,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** super.nice 16 Jan 2005 00:28:21 -0000 1.12 --- super.nice 25 Mar 2005 16:40:00 -0000 1.13 *************** *** 187,191 **** return null; ! return superClass.getMethod(notNull(thisMethod).getName(), ! notNull(thisMethod).getParameterTypes(), true); } --- 187,191 ---- return null; ! return superClass.getMethod(thisMethod.getName(), ! thisMethod.getParameterTypes(), true); } Index: importedconstructor.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/importedconstructor.nice,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** importedconstructor.nice 6 Mar 2005 01:34:26 -0000 1.16 --- importedconstructor.nice 25 Mar 2005 16:40:00 -0000 1.17 *************** *** 104,108 **** let name = new LocatedString("<init>",def.getDefinition().location()); let parameters = readParametersFromBytecodeAttribute(attr, ! notNull(notNull(Node.compilation).parser)); let res = new ImportedConstructor(name, Node.down, --- 104,108 ---- let name = new LocatedString("<init>",def.getDefinition().location()); let parameters = readParametersFromBytecodeAttribute(attr, ! notNull(Node.compilation.parser)); let res = new ImportedConstructor(name, Node.down, Index: globalvar.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/globalvar.nice,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** globalvar.nice 12 Mar 2005 02:41:47 -0000 1.8 --- globalvar.nice 25 Mar 2005 16:40:00 -0000 1.9 *************** *** 81,85 **** res = new gnu.expr.Declaration (notNull(name).toString(), nice.tools.code.Types.javaType(type)); ! this.setDeclaration(notNull(res)); if (! definition.inInterfaceFile()) --- 81,85 ---- res = new gnu.expr.Declaration (notNull(name).toString(), nice.tools.code.Types.javaType(type)); ! this.setDeclaration(res); if (! definition.inInterfaceFile()) *************** *** 87,91 **** // Compute the value first, which might use another global value, // which will then be properly initialized before use. ! notNull(res).noteValue(definition.compileValue()); } --- 87,91 ---- // Compute the value first, which might use another global value, // which will then be properly initialized before use. ! res.noteValue(definition.compileValue()); } Index: monotype.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/monotype.nice,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** monotype.nice 16 Feb 2005 22:35:06 -0000 1.12 --- monotype.nice 25 Mar 2005 16:40:00 -0000 1.13 *************** *** 274,280 **** rawResolve(tm) { ! return new mlsub.typing.FunType ! (resolveMonotypes(notNull(tm), in), ! out.resolve(tm)); } --- 274,278 ---- rawResolve(tm) { ! return new mlsub.typing.FunType(resolveMonotypes(tm,in), out.resolve(tm)); } |