nice-commit Mailing List for The Nice Programming Language (Page 26)
Brought to you by:
bonniot
You can subscribe to this list here.
2003 |
Jan
|
Feb
(60) |
Mar
(125) |
Apr
(183) |
May
(140) |
Jun
(227) |
Jul
(141) |
Aug
(181) |
Sep
(75) |
Oct
(89) |
Nov
(187) |
Dec
(162) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(69) |
Feb
(197) |
Mar
(98) |
Apr
(26) |
May
(10) |
Jun
(85) |
Jul
(88) |
Aug
(79) |
Sep
(80) |
Oct
(81) |
Nov
(53) |
Dec
(109) |
2005 |
Jan
(68) |
Feb
(77) |
Mar
(232) |
Apr
(79) |
May
(37) |
Jun
(37) |
Jul
(3) |
Aug
(18) |
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
(10) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(9) |
2007 |
Jan
(2) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(17) |
Dec
(6) |
2008 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Daniel B. <bo...@us...> - 2004-12-25 23:26:29
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22430/src/bossa/syntax Modified Files: analyse.nice Log Message: Ignore anonymous symbols instead of failing (occured at least with custom constructors). Index: analyse.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** analyse.nice 19 Dec 2004 22:37:31 -0000 1.119 --- analyse.nice 25 Dec 2004 23:26:20 -0000 1.120 *************** *** 203,206 **** --- 203,210 ---- void addVar(MonoSymbol symbol) { + // Anonymous symbols are OK, but can be ignored. + if (symbol.name == null) + return; + ?Monotype type = symbol.syntacticType; if (type != null) |
From: Daniel B. <bo...@us...> - 2004-12-25 15:51:53
|
Update of /cvsroot/nice/Nice/src/gnu/expr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25062/src/gnu/expr Modified Files: LambdaExp.java Log Message: Throw error at the end of methods that should return a value but don't (happens in a branch that has an 'assert false'). Index: LambdaExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/expr/LambdaExp.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** LambdaExp.java 22 Nov 2004 21:37:05 -0000 1.26 --- LambdaExp.java 25 Dec 2004 15:51:44 -0000 1.27 *************** *** 481,493 **** if (! getInlineOnly()) { ! if (comp.method.reachableHere() ! /* Work-around since reachableHere is not computed properly: ! Only return if the method is void or if there is a value ! on the stack. ! */ ! && (comp.method.getReturnType().isVoid() || code.SP > 0) && (! Compilation.usingTailCalls || isModuleBody() || isClassMethod() || isHandlingTailCalls())) ! code.emitReturn(); code.popScope(); // Undoes enterScope in allocParameters } --- 481,510 ---- if (! getInlineOnly()) { ! if (comp.method.reachableHere() && (! Compilation.usingTailCalls || isModuleBody() || isClassMethod() || isHandlingTailCalls())) ! { ! /* If there is a value to return, or the method returns void, ! then emit a return. ! */ ! if (code.SP > 0 || comp.method.getReturnType().isVoid()) ! code.emitReturn(); ! else ! /* ! This can happen for unreachable code, like after an ! 'assert false' in a non-void method. ! ! It can also be because reachableHere is not computed properly. ! */ ! { ! // Throw an error explaining the situation. ! ClassType error = ClassType.make("java.lang.Error"); ! code.emitNew(error); ! code.emitDup(); ! code.emitPushString("Invalid location reached. Enable assertion checking to get more precise information"); ! code.emitInvokeSpecial(error.getDeclaredMethod("<init>", new Type[]{Type.string_type})); ! code.emitThrow(); ! } ! } code.popScope(); // Undoes enterScope in allocParameters } |
From: Daniel B. <bo...@us...> - 2004-12-25 15:51:52
|
Update of /cvsroot/nice/Nice/testsuite/compiler/designByContract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25062/testsuite/compiler/designByContract Modified Files: assert.testsuite Log Message: Throw error at the end of methods that should return a value but don't (happens in a branch that has an 'assert false'). Index: assert.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/designByContract/assert.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** assert.testsuite 18 Oct 2003 17:49:29 -0000 1.2 --- assert.testsuite 25 Dec 2004 15:51:44 -0000 1.3 *************** *** 24,25 **** --- 24,49 ---- /// PASS assert true : fail(); + + /// PASS + // bug #1090913 + foo(1); + /// TOPLEVEL + String foo(int x); + foo(0) { assert false; } + foo(x) = ""; + + /// PASS + // bug #1090913 + foo(1); + /// TOPLEVEL + int foo(int x); + foo(0) { assert false; } + foo(x) = 1; + + /// PASS + // bug #1090913 + foo(1); + /// TOPLEVEL + long foo(int x); + foo(0) { assert false; } + foo(x) = 1; |
From: Arjan B. <ar...@us...> - 2004-12-24 12:06:19
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14625/F:/nice/src/bossa/syntax Modified Files: javaMethod.nice Log Message: Use public accessor method instead of non public field. Index: javaMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/javaMethod.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** javaMethod.nice 20 Dec 2004 16:05:18 -0000 1.2 --- javaMethod.nice 24 Dec 2004 12:06:10 -0000 1.3 *************** *** 143,147 **** // search methods for (?gnu.bytecode.Method method = declaringClass.getMethods(); ! method != null; method = method.next) { if (!method.getName().equals(funName)) --- 143,147 ---- // search methods for (?gnu.bytecode.Method method = declaringClass.getMethods(); ! method != null; method = method.getNext()) { if (!method.getName().equals(funName)) *************** *** 211,219 **** classType.addMethods(); ! for (?gnu.bytecode.Field f = classType.getFields(); f != null; f = f.next) if (retyped.get(f) == null) addJavaSymbol(f, makeJavaFieldAccess(f)); ! for (?gnu.bytecode.Method m = classType.getMethods(); m != null; m = m.next) { // Ignore the method if it is explicitely retyped --- 211,219 ---- classType.addMethods(); ! for (?gnu.bytecode.Field f = classType.getFields(); f != null; f = f.getNext()) if (retyped.get(f) == null) addJavaSymbol(f, makeJavaFieldAccess(f)); ! for (?gnu.bytecode.Method m = classType.getMethods(); m != null; m = m.getNext()) { // Ignore the method if it is explicitely retyped |
From: Daniel B. <bo...@us...> - 2004-12-23 19:12:50
|
Update of /cvsroot/nice/Nice/testsuite/compiler/native In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12782/testsuite/compiler/native Modified Files: fields.testsuite Log Message: Access to private and protected fields in Java classes. Index: fields.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/native/fields.testsuite,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fields.testsuite 20 Mar 2004 15:25:29 -0000 1.4 --- fields.testsuite 23 Dec 2004 19:12:31 -0000 1.5 *************** *** 26,27 **** --- 26,35 ---- void foo(String) {} void foo(char) {} + + /// FAIL + // Access to private field (possibly, depending on the runtime used) + let v = ""./*/// FAIL HERE*/ value; + + /// FAIL bug + // Access to protected field + let f = javax.swing.JComboBox b => b.actionCommand; |
From: Arjan B. <ar...@us...> - 2004-12-23 15:22:14
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28527/F:/nice/src/bossa/syntax Modified Files: javaFieldAccess.nice Log Message: Use public accessor method instead of non public field. Index: javaFieldAccess.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/javaFieldAccess.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** javaFieldAccess.nice 19 Dec 2004 22:37:31 -0000 1.1 --- javaFieldAccess.nice 23 Dec 2004 15:22:05 -0000 1.2 *************** *** 79,83 **** className.content = c.getName(); ! for (?gnu.bytecode.Field f = c.getFields(); f != null; f = f.next ) if (name.equals(f.getName())) return f; --- 79,83 ---- className.content = c.getName(); ! for (?gnu.bytecode.Field f = c.getFields(); f != null; f = f.getNext() ) if (name.equals(f.getName())) return f; |
From: Arjan B. <ar...@us...> - 2004-12-23 12:49:11
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv401/F:/nice/src/bossa/syntax Modified Files: tools.nice Log Message: Added missing retyping. Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** tools.nice 20 Dec 2004 17:16:48 -0000 1.83 --- tools.nice 23 Dec 2004 12:49:00 -0000 1.84 *************** *** 283,286 **** --- 283,288 ---- List<VarSymbol> lookup(VarScope, LocatedString) = native List VarScope.lookup(LocatedString); Map<gnu.bytecode.Type,mlsub.typing.TypeConstructor> javaTypeConstructors(bossa.modules.Compilation ) = native bossa.modules.Compilation.javaTypeConstructors; + bossa.syntax.Constraint newConstraint(List<TypeSymbol>, List<AtomicConstraint>) = native new Constraint(List, List); + void addAtoms(Constraint, List<AtomicConstraint>) = native void Constraint.addAtoms(List); // Retypings needed since java types are not strict. |
From: Arjan B. <ar...@us...> - 2004-12-21 01:31:25
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20983/F:/nice/src/bossa/syntax Modified Files: alternative.nice dispatch.java.bootstrap Log Message: Converted ImportedAlternative. Index: alternative.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/alternative.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** alternative.nice 20 Dec 2004 23:54:14 -0000 1.2 --- alternative.nice 21 Dec 2004 01:31:14 -0000 1.3 *************** *** 69,70 **** --- 69,167 ---- method: method); } + + /** + An alternative imported from a compiled package. + + */ + public class ImportedAlternative extends Alternative + { + private gnu.expr.Expression code; + private Location loc; + + methodExp() = code; + + location() = loc; + } + + /** + * When read from a bytecode file. + */ + public void readImportedAlternative(gnu.bytecode.ClassType c, gnu.bytecode.Method method, Location location) + { + ?gnu.bytecode.MiscAttr attr = cast(gnu.bytecode.Attribute.get(method, "definition")); + if (attr == null) + // this must be a toplevel function, a constructor, ... + return; + + String fullName = new String(attr.data); + + registerJavaMethod(fullName); + + attr = cast(gnu.bytecode.Attribute.get(method, "patterns")); + if (attr == null) + throw Internal.error("Method " + method.getName() + + " in class " + c.getName() + " has no patterns"); + String rep = new String(attr.data); + + int[]/*ref*/ at = [0]; + + ArrayList<Pattern> patterns = new ArrayList(5); + + try { + ?Pattern p; + + while ((p = bossa.syntax.dispatch.readPattern(rep, at)) != null) + { + if (p.getTC() == nice.tools.typing.PrimitiveType.arrayTC) + /* Special treatment for arrays: + they are compiled into Object, + but we want a SpecialArray in the method bytecode type. + */ + { + int argnum = patterns.size(); + if (notNull(method.arg_types)[argnum] == gnu.bytecode.Type.pointer_type) + notNull(method.arg_types)[argnum] = nice.tools.code.SpecialArray.unknownTypeArray(); + } + + patterns.add(p); + } + + let alt = new ImportedAlternative(method.getName(), patterns.toArray(), + code: new gnu.expr.QuoteExp(new gnu.expr.PrimProcedure(method)), + loc: location); + + alt.add(nice.tools.util.System.split + (fullName, MethodDeclaration.methodListSeparator)); + } + catch(Pattern.Unknown ex) { + // This can happen if the class exists only in a later version + // of the JDK. We just ignore this alternative. + } + } + + /** + If this full name refers to a java method, make sure it participates + to the link tests and dispatch code generation. + */ + private void registerJavaMethod(String fullName) + { + if (! fullName.startsWith("JAVA:")) + return; + + int end = fullName.lastIndexOf(':'); + let methodName = new LocatedString(fullName.substring("JAVA:".length(), end), + bossa.util.Location.nowhere()); + + for (VarSymbol sym : bossa.syntax.Node.getGlobalScope().lookup(methodName)) + { + if (sym.getMethodDeclaration() == null) + continue; + + MethodDeclaration md = notNull(sym.getMethodDeclaration()); + if (md.getFullName().equals(fullName)) + { + md.registerForDispatch(); + return; + } + } + } \ No newline at end of file Index: dispatch.java.bootstrap =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/dispatch.java.bootstrap,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** dispatch.java.bootstrap 20 Dec 2004 23:54:14 -0000 1.44 --- dispatch.java.bootstrap 21 Dec 2004 01:31:14 -0000 1.45 *************** *** 13,16 **** --- 13,18 ---- public class dispatch { + public static void readImportedAlternative(gnu.bytecode.ClassType c, gnu.bytecode.Method method, bossa.util.Location location) {} + public static bossa.link.Alternative createJavaAlternative(bossa.syntax.MethodDeclaration method) { return null; } |
From: Arjan B. <ar...@us...> - 2004-12-21 01:31:23
|
Update of /cvsroot/nice/Nice/src/bossa/link In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20983/F:/nice/src/bossa/link Modified Files: Alternative.java Removed Files: ImportedAlternative.java Log Message: Converted ImportedAlternative. --- ImportedAlternative.java DELETED --- Index: Alternative.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/link/Alternative.java,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** Alternative.java 20 Dec 2004 23:54:13 -0000 1.59 --- Alternative.java 21 Dec 2004 01:31:13 -0000 1.60 *************** *** 231,235 **** } ! protected void add(String[] fullNames) { for (int i = 0; i < fullNames.length; i++) --- 231,235 ---- } ! public void add(String[] fullNames) { for (int i = 0; i < fullNames.length; i++) |
From: Arjan B. <ar...@us...> - 2004-12-21 01:31:23
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20983/F:/nice/src/bossa/modules Modified Files: Package.java Log Message: Converted ImportedAlternative. Index: Package.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Package.java,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** Package.java 20 Dec 2004 16:05:16 -0000 1.129 --- Package.java 21 Dec 2004 01:31:13 -0000 1.130 *************** *** 155,159 **** method != null; method = method.getNext()) ! bossa.link.ImportedAlternative.read(source.getBytecode(), method, location()); } --- 155,159 ---- method != null; method = method.getNext()) ! bossa.syntax.dispatch.readImportedAlternative(source.getBytecode(), method, location()); } |
From: Arjan B. <ar...@us...> - 2004-12-20 23:54:25
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31544/F:/nice/src/bossa/syntax Modified Files: alternative.nice dispatch.java.bootstrap Log Message: Converted JavaAlternative. Index: alternative.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/alternative.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** alternative.nice 18 Dec 2004 23:43:14 -0000 1.1 --- alternative.nice 20 Dec 2004 23:54:14 -0000 1.2 *************** *** 46,47 **** --- 46,70 ---- return res; } + + /** + An alternative for calling an existing Java method. + + */ + class JavaAlternative extends Alternative + { + MethodDeclaration method; + + methodExp() = method.getCode(); + } + + public Alternative createJavaAlternative(bossa.syntax.MethodDeclaration method) + { + + Pattern[] patterns = notNull(nice.tools.typing.Types.parameters(method.getType())). + mapToArray(mlsub.typing.Monotype param => createPattern(null, + nice.tools.typing.Types.concreteConstructor(param), + nice.tools.typing.Types.isSure(param))); + + return new JavaAlternative(method.getName().toString(), patterns, + method: method); + } Index: dispatch.java.bootstrap =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/dispatch.java.bootstrap,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** dispatch.java.bootstrap 20 Dec 2004 20:25:53 -0000 1.43 --- dispatch.java.bootstrap 20 Dec 2004 23:54:14 -0000 1.44 *************** *** 13,16 **** --- 13,19 ---- public class dispatch { + public static bossa.link.Alternative createJavaAlternative(bossa.syntax.MethodDeclaration method) + { return null; } + static TypeScope createGlobalTypeScope() { return null; } |
From: Arjan B. <ar...@us...> - 2004-12-20 23:54:22
|
Update of /cvsroot/nice/Nice/src/bossa/link In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31544/F:/nice/src/bossa/link Modified Files: Alternative.java Removed Files: JavaAlternative.java Log Message: Converted JavaAlternative. --- JavaAlternative.java DELETED --- Index: Alternative.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/link/Alternative.java,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Alternative.java 19 Dec 2004 22:37:17 -0000 1.58 --- Alternative.java 20 Dec 2004 23:54:13 -0000 1.59 *************** *** 242,246 **** if (from.isJavaMethod()) ! new JavaAlternative(from).add(fullName); List list = (List) alternatives.get(from.getFullName()); --- 242,246 ---- if (from.isJavaMethod()) ! bossa.syntax.dispatch.createJavaAlternative(from).add(fullName); List list = (List) alternatives.get(from.getFullName()); |
From: Arjan B. <ar...@us...> - 2004-12-20 22:18:11
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8892/F:/nice/testsuite/compiler/methods Modified Files: overriding.testsuite Log Message: Removed ambigious fail marker. Index: overriding.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/overriding.testsuite,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** overriding.testsuite 15 Dec 2004 15:55:44 -0000 1.10 --- overriding.testsuite 20 Dec 2004 22:18:02 -0000 1.11 *************** *** 172,176 **** class B extends A {} B foo(A x) = new B(); ! /*/// FAIL HERE*/ A foo(B x) = new A(); /// PASS --- 172,176 ---- class B extends A {} B foo(A x) = new B(); ! A foo(B x) = new A(); /// PASS *************** *** 195,199 **** abstract class B extends A {} <A T> T foo(T x); ! <B T> /*/// FAIL HERE*/ A foo(T x); /// FAIL --- 195,199 ---- abstract class B extends A {} <A T> T foo(T x); ! <B T> A foo(T x); /// FAIL *************** *** 202,206 **** abstract class B extends A {} <A T1, B U1> U1 foo(A a, T1 t, U1 u); ! <A T2, B U2> /*/// FAIL HERE*/ T2 foo(B b, T2 t, U2 u); /// PASS --- 202,206 ---- abstract class B extends A {} <A T1, B U1> U1 foo(A a, T1 t, U1 u); ! <A T2, B U2> T2 foo(B b, T2 t, U2 u); /// PASS |
From: Arjan B. <ar...@us...> - 2004-12-20 20:26:04
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15669/F:/nice/src/bossa/syntax Modified Files: Node.java TypeScope.java dispatch.java.bootstrap javaclass.nice scope.nice Removed Files: GlobalTypeScope.java Log Message: Converted GlobalTypeScope. Index: Node.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Node.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Node.java 19 Dec 2004 22:37:31 -0000 1.63 --- Node.java 20 Dec 2004 20:25:53 -0000 1.64 *************** *** 134,143 **** } ! private static GlobalTypeScope globalTypeScope; ! public static final GlobalTypeScope getGlobalTypeScope() { return globalTypeScope; } public static bossa.modules.Compilation compilation = null; --- 134,153 ---- } ! private static TypeScope globalTypeScope; ! public static final TypeScope getGlobalTypeScope() { return globalTypeScope; } + public static final Module getGlobalTypeScopeModule() + { + return globalTypeScope.getModule(); + } + + public static mlsub.typing.TypeConstructor globalTypeScopeLookup(String name, Location loc) + { + return globalTypeScope.globalLookup(name, loc); + } + public static bossa.modules.Compilation compilation = null; *************** *** 150,156 **** compilation = module.compilation(); globalScope = dispatch.createGlobalVarScope(); ! globalTypeScope = new GlobalTypeScope(); } ! globalTypeScope.module = module; } --- 160,166 ---- compilation = module.compilation(); globalScope = dispatch.createGlobalVarScope(); ! globalTypeScope = dispatch.createGlobalTypeScope(); } ! globalTypeScope.setModule(module); } *************** *** 310,314 **** } catch(UserError ex){ ! globalTypeScope.module.compilation().error(ex); } } --- 320,324 ---- } catch(UserError ex){ ! globalTypeScope.getModule().compilation().error(ex); } } Index: TypeScope.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/TypeScope.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** TypeScope.java 28 May 2003 12:57:26 -0000 1.40 --- TypeScope.java 20 Dec 2004 20:25:53 -0000 1.41 *************** *** 31,34 **** --- 31,40 ---- } + // only for GlobalTypeScope + void setModule(Module mod) {} + Module getModule() { return null; } + public mlsub.typing.TypeConstructor globalLookup(String name, Location loc) + { return null; } + void addSymbol(TypeSymbol s) throws DuplicateName Index: javaclass.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/javaclass.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** javaclass.nice 19 Dec 2004 22:37:31 -0000 1.3 --- javaclass.nice 20 Dec 2004 20:25:53 -0000 1.4 *************** *** 254,258 **** } ! ?TypeConstructor lookupJavaClass(String className, Location loc) { ?gnu.bytecode.Type classType = nice.tools.code.TypeImport.lookup(className, loc); --- 254,258 ---- } ! ?TypeConstructor lookupJavaClass(String className, ?Location loc) { ?gnu.bytecode.Type classType = nice.tools.code.TypeImport.lookup(className, loc); Index: dispatch.java.bootstrap =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/dispatch.java.bootstrap,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** dispatch.java.bootstrap 20 Dec 2004 16:05:18 -0000 1.42 --- dispatch.java.bootstrap 20 Dec 2004 20:25:53 -0000 1.43 *************** *** 13,16 **** --- 13,19 ---- public class dispatch { + static TypeScope createGlobalTypeScope() + { return null; } + public static void resetConstructorsMap() {} Index: scope.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/scope.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** scope.nice 19 Dec 2004 22:37:32 -0000 1.2 --- scope.nice 20 Dec 2004 20:25:53 -0000 1.3 *************** *** 32,33 **** --- 32,128 ---- return new GlobalVarScope(null); } + + /** + The global, toplevel type scope. + + */ + public class GlobalTypeScope extends TypeScope + { + public Module module = cast(null); + private Set<String> set; + + setModule(mod) + { + module = notNull(mod); + } + + getModule() = module; + + addMapping(name, s) + { + super; + + if (!set.add(notNull(name).toLowerCase())) + throw new TypeScope.DuplicateName(this, name); + } + + public mlsub.typing.TypeConstructor globalLookup(LocatedString name) + { + return this.globalLookup(name.toString(), name.location()); + } + + globalLookup(name, loc) + { + mlsub.typing.TypeSymbol 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 cast(null); + } + + lookup(name, loc) + { + ?mlsub.typing.TypeSymbol res = super; + if (res != null) + return res; + + boolean notFullyQualified = notNull(name).indexOf('.') == -1; + + if (notFullyQualified) + { + /* Try first to find the symbol in Nice definitions. + The first package is the current package. + If the symbol is not found there, we check there is no + ambiguity with another symbol from another package. + */ + boolean first = true; + String[] pkgs = module.listImplicitPackages(); + for (int i = 0; i < pkgs.length; i++) + { + String fullName = pkgs[i] + "." + name; + ?mlsub.typing.TypeSymbol sym = this.get(fullName); + if (sym != null) + if (res == null) + { + res = sym; + if (first) break; + } + else + User.error(loc, "Ambiguity for symbol " + name + + ":\n" + res + " and " + sym + + " both exist"); + first = false; + } + } + + if (res != null) + return res; + + return cast(lookupJavaClass(notNull(name), loc)); + } + } + + TypeScope createGlobalTypeScope() + { + let res = new GlobalTypeScope(null, set: new HashSet()); + + try { + res.addMapping("java.lang.Object", mlsub.typing.TopMonotype.instance); + } catch (TypeScope.DuplicateName ex) {} + + return res; + } --- GlobalTypeScope.java DELETED --- |
From: Arjan B. <ar...@us...> - 2004-12-20 20:26:02
|
Update of /cvsroot/nice/Nice/src/nice/tools/code In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15669/F:/nice/src/nice/tools/code Modified Files: TypeImport.java Types.java Log Message: Converted GlobalTypeScope. Index: TypeImport.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/code/TypeImport.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TypeImport.java 6 Nov 2004 20:00:56 -0000 1.9 --- TypeImport.java 20 Dec 2004 20:25:52 -0000 1.10 *************** *** 65,69 **** return res; ! String[] pkgs = bossa.syntax.Node.getGlobalTypeScope().module.listImplicitPackages(); for (int i = 0; i < pkgs.length; i++) { --- 65,69 ---- return res; ! String[] pkgs = bossa.syntax.Node.getGlobalTypeScopeModule().listImplicitPackages(); for (int i = 0; i < pkgs.length; i++) { *************** *** 122,126 **** return res; ! String[] pkgs = bossa.syntax.Node.getGlobalTypeScope().module.listImplicitPackages(); for (int i = 0; i < pkgs.length; i++) { --- 122,126 ---- return res; ! String[] pkgs = bossa.syntax.Node.getGlobalTypeScopeModule().listImplicitPackages(); for (int i = 0; i < pkgs.length; i++) { Index: Types.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/code/Types.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Types.java 1 Dec 2004 02:00:13 -0000 1.63 --- Types.java 20 Dec 2004 20:25:52 -0000 1.64 *************** *** 296,301 **** throws NotIntroducedClassException { ! TypeConstructor tc = bossa.syntax.Node.getGlobalTypeScope(). ! globalLookup(javaType.getName(), null); if (tc == null) --- 296,301 ---- throws NotIntroducedClassException { ! TypeConstructor tc = bossa.syntax.Node.globalTypeScopeLookup( ! javaType.getName(), null); if (tc == null) *************** *** 412,417 **** return TopMonotype.instance; ! TypeConstructor tc = bossa.syntax.Node.getGlobalTypeScope(). ! globalLookup(javaType.getName(), null); if (tc == null) --- 412,416 ---- return TopMonotype.instance; ! TypeConstructor tc = bossa.syntax.Node.globalTypeScopeLookup(javaType.getName(), null); if (tc == null) *************** *** 516,521 **** return Type.pointer_type; ! TypeConstructor sym = bossa.syntax.Node.getGlobalTypeScope(). ! globalLookup(type, loc); return get(sym); --- 515,519 ---- return Type.pointer_type; ! TypeConstructor sym = bossa.syntax.Node.globalTypeScopeLookup(type, loc); return get(sym); |
From: Arjan B. <ar...@us...> - 2004-12-20 17:17:08
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1446/F:/nice/src/bossa/parser Modified Files: Parser.jj Log Message: Converted TypeParameters. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.290 retrieving revision 1.291 diff -C2 -d -r1.290 -r1.291 *** Parser.jj 20 Dec 2004 13:56:14 -0000 1.290 --- Parser.jj 20 Dec 2004 17:16:45 -0000 1.291 *************** *** 674,678 **** last=getToken(0); ! return bossa.syntax.fun.createMonotypeConstructor(t,new TypeParameters(p), makeLocation(first, last)); } --- 674,678 ---- last=getToken(0); ! return bossa.syntax.fun.createMonotypeConstructor(t,bossa.syntax.dispatch.createTypeParameters(p), makeLocation(first, last)); } *************** *** 763,767 **** res = bossa.syntax.fun.createMonotypeConstructor (new TypeIdent(new LocatedString("nice.lang.Array", loc)), ! new TypeParameters(tp), loc); res.nullness = maybe ? res.maybe : res.absent; --- 763,767 ---- res = bossa.syntax.fun.createMonotypeConstructor (new TypeIdent(new LocatedString("nice.lang.Array", loc)), ! bossa.syntax.dispatch.createTypeParameters(tp), loc); res.nullness = maybe ? res.maybe : res.absent; *************** *** 935,939 **** // they should be checked [ "<" params = monotypes() ">" ] ! { return bossa.syntax.fun.createMonotypeConstructor(name, params == null ? null : new TypeParameters(params), name.location()); } } --- 935,939 ---- // they should be checked [ "<" params = monotypes() ">" ] ! { return bossa.syntax.fun.createMonotypeConstructor(name, params == null ? null : bossa.syntax.dispatch.createTypeParameters(params), name.location()); } } |
From: Arjan B. <ar...@us...> - 2004-12-20 17:17:08
|
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); |
From: Arjan B. <ar...@us...> - 2004-12-20 16:05:34
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16420/F:/nice/src/bossa/syntax Modified Files: Pattern.java ai.nice customConstructor.nice dispatch.java.bootstrap importedconstructor.nice javaMethod.nice methodbody.nice new.nice niceclass.nice pattern.nice retypedMethod.nice tools.nice typedef.nice Added Files: typeConstructors.nice Removed Files: TypeConstructors.java Log Message: Converted TypeConstructors. Index: Pattern.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Pattern.java,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** Pattern.java 18 Dec 2004 19:41:00 -0000 1.96 --- Pattern.java 20 Dec 2004 16:05:18 -0000 1.97 *************** *** 101,105 **** " is not a declared class or interface"); ! if (exactlyAtType() && !TypeConstructors.instantiable(tc)) User.error (typeConstructor.location(), --- 101,105 ---- " is not a declared class or interface"); ! if (exactlyAtType() && !dispatch.instantiableTC(tc)) User.error (typeConstructor.location(), Index: customConstructor.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/customConstructor.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** customConstructor.nice 18 Dec 2004 19:41:01 -0000 1.4 --- customConstructor.nice 20 Dec 2004 16:05:18 -0000 1.5 *************** *** 44,48 **** let tc = Node.getGlobalTypeScope().globalLookup(className); ! TypeConstructors.addConstructor(tc, this); classe = NiceClass.get(tc); --- 44,48 ---- let tc = Node.getGlobalTypeScope().globalLookup(className); ! addConstructor(tc, this); classe = NiceClass.get(tc); Index: methodbody.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/methodbody.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** methodbody.nice 19 Dec 2004 03:40:59 -0000 1.5 --- methodbody.nice 20 Dec 2004 16:05:18 -0000 1.6 *************** *** 52,56 **** if (d instanceof JavaMethod) { d.registerForDispatch(); ! if (TypeConstructors.isInterface(formals[0].tc)) User.error(this, notNull(name) + " is a native method. Dispatch can only occur if the first argument is not an interface."); } --- 52,56 ---- if (d instanceof JavaMethod) { 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."); } Index: new.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/new.nice,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** new.nice 19 Dec 2004 22:37:31 -0000 1.9 --- new.nice 20 Dec 2004 16:05:18 -0000 1.10 *************** *** 43,52 **** this.tc = tc; ! if (! TypeConstructors.instantiable(tc)) { String message; ! if (TypeConstructors.isInterface(tc)) message = tc + " is an interface, it can't be instantiated"; ! else if (TypeConstructors.isClass(tc)) message = tc + " is an abstract class, it can't be instantiated"; else --- 43,52 ---- this.tc = tc; ! if (! instantiableTC(tc)) { String message; ! if (isInterfaceTC(tc)) message = tc + " is an interface, it can't be instantiated"; ! else if (isClassTC(tc)) message = tc + " is an abstract class, it can't be instantiated"; else *************** *** 60,64 **** definition.resolve(); ! let constructors = TypeConstructors.getConstructors(tc); if (constructors == null) { --- 60,64 ---- definition.resolve(); ! let constructors = getConstructors(tc); if (constructors == null) { *************** *** 73,77 **** // the list of constructors must be cloned, as // OverloadedSymbolExp removes elements from it ! function = createOverloadedSymbolExp(new LinkedList(notNull(constructors)), new LocatedString("new " + tc, this.location())); } --- 73,77 ---- // the list of constructors must be cloned, as // OverloadedSymbolExp removes elements from it ! function = createOverloadedSymbolExp(new LinkedList(cast(constructors)), new LocatedString("new " + tc, this.location())); } Index: niceclass.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceclass.nice,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** niceclass.nice 14 Dec 2004 22:49:12 -0000 1.8 --- niceclass.nice 20 Dec 2004 16:05:18 -0000 1.9 *************** *** 377,381 **** getNativeConstructorParameters(TypeConstructor tc) { ! let constructors = TypeConstructors.getConstructors(tc); if (constructors == null) { --- 377,381 ---- getNativeConstructorParameters(TypeConstructor tc) { ! let constructors = getConstructors(tc); if (constructors == null) { *************** *** 555,559 **** Monotype.sure(new mlsub.typing.MonotypeConstructor(definition.getTC(), definition.getTypeParameters())), classe: this, isDefault: true, fields: fields, parent: parent); ! TypeConstructors.addConstructor(definition.getTC(), notNull(constructorMethod)[i]); } } --- 555,559 ---- Monotype.sure(new mlsub.typing.MonotypeConstructor(definition.getTC(), definition.getTypeParameters())), classe: this, isDefault: true, fields: fields, parent: parent); ! addConstructor(definition.getTC(), notNull(constructorMethod)[i]); } } Index: javaMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/javaMethod.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** javaMethod.nice 19 Dec 2004 22:37:31 -0000 1.1 --- javaMethod.nice 20 Dec 2004 16:05:18 -0000 1.2 *************** *** 242,246 **** let res = makeJavaMethod(m, true); assert res != null; ! TypeConstructors.addConstructor(tc, res); retyped.put(m, res); } --- 242,246 ---- let res = makeJavaMethod(m, true); assert res != null; ! addConstructor(tc, res); retyped.put(m, res); } Index: retypedMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/retypedMethod.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** retypedMethod.nice 19 Dec 2004 22:37:31 -0000 1.1 --- retypedMethod.nice 20 Dec 2004 16:05:18 -0000 1.2 *************** *** 136,140 **** if (tc != null) { ! TypeConstructors.addConstructor(tc, this); registerNativeConstructor(this, reflectMethod, tc); } --- 136,140 ---- if (tc != null) { ! addConstructor(tc, this); registerNativeConstructor(this, reflectMethod, tc); } *************** *** 269,273 **** */ if (auto != null && ! (auto instanceof RetypedJavaMethod)) ! TypeConstructors.removeConstructor(classe, auto); } --- 269,273 ---- */ if (auto != null && ! (auto instanceof RetypedJavaMethod)) ! removeConstructor(classe, auto); } Index: typedef.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typedef.nice,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** typedef.nice 19 Dec 2004 22:37:32 -0000 1.7 --- typedef.nice 20 Dec 2004 16:05:19 -0000 1.8 *************** *** 208,212 **** // We found a cycle. String message; ! if (TypeConstructors.isInterface(tc)) message = "Interface " + this.getName() + " extends itself"; else --- 208,212 ---- // We found a cycle. String message; ! if (isInterfaceTC(tc)) message = "Interface " + this.getName() + " extends itself"; else *************** *** 312,316 **** { let tc = s; ! if (!TypeConstructors.isInterface(tc)) throw User.error(name, tc + " is not an interface"); --- 312,316 ---- { let tc = s; ! if (!isInterfaceTC(tc)) throw User.error(name, tc + " is not an interface"); *************** *** 492,496 **** User.error(superClassIdent, superClass + " is a final class. It cannot be extended"); ! if (TypeConstructors.isInterface(superClass)) User.error(superClassIdent, superClass + " is an interface, so " + name + --- 492,496 ---- User.error(superClassIdent, superClass + " is a final class. It cannot be extended"); ! if (isInterfaceTC(superClass)) User.error(superClassIdent, superClass + " is an interface, so " + name + Index: pattern.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/pattern.nice,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pattern.nice 18 Dec 2004 19:41:01 -0000 1.12 --- pattern.nice 20 Dec 2004 16:05:18 -0000 1.13 *************** *** 375,379 **** return this.tc != that.tc; ! if (TypeConstructors.isClass(this.tc) && TypeConstructors.isClass(that.tc)) return (! Typing.testRigidLeq(this.tc, that.tc)) && (! Typing.testRigidLeq(that.tc, this.tc)); --- 375,379 ---- return this.tc != that.tc; ! if (isClassTC(notNull(this.tc)) && isClassTC(notNull(that.tc))) return (! Typing.testRigidLeq(this.tc, that.tc)) && (! Typing.testRigidLeq(that.tc, this.tc)); *************** *** 385,389 **** disjoint(Pattern this, Pattern that) { ! if (TypeConstructors.isClass(this.tc) && TypeConstructors.isClass(that.tc)) return (! Typing.testRigidLeq(this.tc, that.tc)) && (! Typing.testRigidLeq(that.tc, this.tc)); --- 385,389 ---- disjoint(Pattern this, Pattern that) { ! if (isClassTC(notNull(this.tc)) && isClassTC(notNull(that.tc))) return (! Typing.testRigidLeq(this.tc, that.tc)) && (! Typing.testRigidLeq(that.tc, this.tc)); --- NEW FILE: typeConstructors.nice --- /**************************************************************************/ /* N I C E */ /* A high-level object-oriented research language */ /* (c) Daniel Bonniot 2004 */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /**************************************************************************/ package bossa.syntax; import bossa.util.*; /** Tools for classes and type constructors. */ var HashMap<mlsub.typing.TypeConstructor,?LinkedList<VarSymbol>> constructorsMap = new HashMap(); public void resetConstructorsMap() { constructorsMap = new HashMap(); } /** The list can be modified by the caller. It should thus be cloned each time. @return a list of the MethodDefinition.Symbols of each constructor of this class. */ ?LinkedList<VarSymbol> getConstructors(mlsub.typing.TypeConstructor tc) { return constructorsMap.get(tc); } void addConstructor(mlsub.typing.TypeConstructor tc, MethodDeclaration m) { ?LinkedList<VarSymbol> l = constructorsMap.get(tc); if (l==null) { l = new LinkedList(); constructorsMap.put(tc, notNull(l)); } notNull(l).add(m.getSymbol()); } void removeConstructor(TypeConstructor tc, MethodDeclaration m) { ?LinkedList<VarSymbol> l = constructorsMap.get(tc); if (l == null) return; l.remove(m.getSymbol()); } /** Test if a type constructor can be instantiated. That is, if <code>new</code> is valid on this tc. */ boolean instantiableTC(mlsub.typing.TypeConstructor tc) { if(tc.isConcrete()) return true; let definition = getTypeDefinition(tc); return definition != null && definition.isConcrete(); } boolean isInterfaceTC(mlsub.typing.TypeConstructor tc) { let def = getTypeDefinition(tc); if (def != null) return def.getAssociatedInterface() != null; ?gnu.bytecode.ClassType c = cast(nice.tools.code.Types.get(tc)); return c != null && c.isInterface(); } boolean isClassTC(mlsub.typing.TypeConstructor tc) { return nice.tools.code.Types.get(tc) != null; } Index: ai.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ai.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ai.nice 18 Dec 2004 19:41:01 -0000 1.2 --- ai.nice 20 Dec 2004 16:05:18 -0000 1.3 *************** *** 103,107 **** classTC = new TypeIdent(name: className).resolveToTC(notNull(typeScope)); ! if (TypeConstructors.isInterface(classTC)) { if (!_interface) User.error(this, ""+classTC+" is not a class"); --- 103,107 ---- classTC = new TypeIdent(name: className).resolveToTC(notNull(typeScope)); ! if (isInterfaceTC(notNull(classTC))) { if (!_interface) User.error(this, ""+classTC+" is not a class"); Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** tools.nice 19 Dec 2004 22:37:32 -0000 1.81 --- tools.nice 20 Dec 2004 16:05:18 -0000 1.82 *************** *** 216,220 **** <T> String map(String, String, String, ?Collection<T>) = native String bossa.util.Util.map(String, String, String, Collection); Stack<bossa.link.Alternative> sortedAlternatives(MethodDeclaration) = native Stack bossa.link.Alternative.sortedAlternatives(MethodDeclaration); - ?LinkedList<VarSymbol> getConstructors(mlsub.typing.TypeConstructor) = native LinkedList TypeConstructors.getConstructors(mlsub.typing.TypeConstructor); void addValues(Pattern, List<ConstantExp>) = native void Pattern.addValues(List); ?mlsub.typing.TypeConstructor getRuntimeTC(Pattern) = native mlsub.typing.TypeConstructor Pattern.getRuntimeTC(); --- 216,219 ---- *************** *** 246,250 **** mlsub.typing.TypeSymbol[?] getBinders(MethodContainer) = native mlsub.typing.TypeSymbol[] MethodContainer.getBinders(); ?Expression value(FormalParameters.Parameter) = native Expression FormalParameters.Parameter.value(); - ?LinkedList<MethodSymbol> getConstructors(TypeConstructor) = native LinkedList TypeConstructors.getConstructors(TypeConstructor); ?gnu.bytecode.Attribute get(gnu.bytecode.AttrContainer, String) = native gnu.bytecode.Attribute gnu.bytecode.Attribute.get(gnu.bytecode.AttrContainer, String); void printInterface(Definition, java.io.PrintWriter) = native void Definition.printInterface(java.io.PrintWriter); --- 245,248 ---- Index: importedconstructor.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/importedconstructor.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** importedconstructor.nice 19 Dec 2004 22:37:31 -0000 1.4 --- importedconstructor.nice 20 Dec 2004 16:05:18 -0000 1.5 *************** *** 110,114 **** method: method); ! TypeConstructors.addConstructor(res.classe.getDefinition().getTC(), res); return res; } --- 110,114 ---- method: method); ! addConstructor(res.classe.getDefinition().getTC(), res); return res; } Index: dispatch.java.bootstrap =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/dispatch.java.bootstrap,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** dispatch.java.bootstrap 20 Dec 2004 02:16:30 -0000 1.41 --- dispatch.java.bootstrap 20 Dec 2004 16:05:18 -0000 1.42 *************** *** 13,16 **** --- 13,21 ---- public class dispatch { + public static void resetConstructorsMap() {} + + static boolean instantiableTC(mlsub.typing.TypeConstructor tc) + { return false; } + public static void loadJavaMethods(String name) {} --- TypeConstructors.java DELETED --- |
From: Arjan B. <ar...@us...> - 2004-12-20 16:05:27
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16420/F:/nice/src/bossa/modules Modified Files: Package.java Log Message: Converted TypeConstructors. Index: Package.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Package.java,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -d -r1.128 -r1.129 *** Package.java 19 Dec 2004 22:37:16 -0000 1.128 --- Package.java 20 Dec 2004 16:05:16 -0000 1.129 *************** *** 291,295 **** bossa.link.DispatchTest.reset(); bossa.syntax.dispatch.resetTypeDefinitionMappings(); ! TypeConstructors.reset(); bossa.syntax.dispatch.resetJavaClasses(); PrimitiveType.reset(); --- 291,295 ---- bossa.link.DispatchTest.reset(); bossa.syntax.dispatch.resetTypeDefinitionMappings(); ! bossa.syntax.dispatch.resetConstructorsMap(); bossa.syntax.dispatch.resetJavaClasses(); PrimitiveType.reset(); |
From: Arjan B. <ar...@us...> - 2004-12-20 13:56:31
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19598/F:/nice/src/bossa/syntax Modified Files: block.nice Added Files: statement.nice Removed Files: Statement.java Log Message: Converted Statement. Index: block.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/block.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** block.nice 13 Aug 2004 21:04:41 -0000 1.2 --- block.nice 20 Dec 2004 13:56:16 -0000 1.3 *************** *** 104,108 **** // That is why we can't set body's body at construction. let res = this.addLocals(locals.iterator(), body); ! body.setExpressions(Statement.compile(statements)); return res; } --- 104,108 ---- // That is why we can't set body's body at construction. let res = this.addLocals(locals.iterator(), body); ! body.setExpressions(compileStatements(statements)); return res; } --- NEW FILE: statement.nice --- /**************************************************************************/ /* N I C E */ /* A high-level object-oriented research language */ /* (c) Daniel Bonniot 2004 */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /**************************************************************************/ package bossa.syntax; import bossa.util.*; /** Abstract ancestor for all statements. Descendants have "Stmt" suffix. */ public abstract class Statement implements Located { Location loc = Location.nowhere(); gnu.expr.Expression generateCode(); location() = loc; public void setLocation(Location l) { loc=l; } } gnu.expr.Expression[] compileStatements(Statement[] statements) { gnu.expr.Expression[] res = cast(new gnu.expr.Expression[statements.length]); for (int i = 0; i < statements.length; i++) { Statement s = statements[i]; if (s == null) { res[i] = gnu.expr.QuoteExp.voidExp; continue; } try { res[i] = s.generateCode(); } catch(UserError e) { // Make sure that the error is attached to a location. // If not, it's better than nothing to located the error in // the containing statement. if (e.location == null) e.location = s.location(); // Rethrow. throw e; } if (s.location() != null) s.location().write(res[i]); } return res; } --- Statement.java DELETED --- |
From: Arjan B. <ar...@us...> - 2004-12-20 13:56:29
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19598/F:/nice/src/bossa/parser Modified Files: Parser.jj Log Message: Converted Statement. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.289 retrieving revision 1.290 diff -C2 -d -r1.289 -r1.290 *** Parser.jj 19 Dec 2004 22:37:15 -0000 1.289 --- Parser.jj 20 Dec 2004 13:56:14 -0000 1.290 *************** *** 2469,2473 **** { res = bossa.syntax.dispatch.createLocalVariable(id,type,constant,e); } ( LOOKAHEAD( "," <IDENT> ( "=" | ";" | ",") ) ! "," id=ident() {e=null;} [ "=" e=Expression() ] { bossa.syntax.dispatch.addNextLocal(res,id,e); } )* { return res; } --- 2469,2473 ---- { res = bossa.syntax.dispatch.createLocalVariable(id,type,constant,e); } ( LOOKAHEAD( "," <IDENT> ( "=" | ";" | ",") ) ! "," id=ident() {e=null;} [ "=" e=Expression() ] { bossa.syntax.fun.addNextLocal(res,id,e); } )* { return res; } |
From: Arjan B. <ar...@us...> - 2004-12-20 02:16:39
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19833/F:/nice/src/bossa/syntax Modified Files: dispatch.java.bootstrap Log Message: Removed superfluous methods. Index: dispatch.java.bootstrap =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/dispatch.java.bootstrap,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** dispatch.java.bootstrap 19 Dec 2004 22:37:31 -0000 1.40 --- dispatch.java.bootstrap 20 Dec 2004 02:16:30 -0000 1.41 *************** *** 23,44 **** { return null; } - static String getAlikeID() - { return null; } - public static Monotype createTypeIdent(LocatedString name) { return null;} - public static Definition createMethodWithDefault(LocatedString name, Constraint constraint, Monotype returnType, FormalParameters parameters, Statement body, Contract contract, boolean isOverride) - { return null; } - - static Monotype createMonotypeConstructor(mlsub.typing.TypeConstructor tc, TypeParameters parameters, bossa.util.Location loc) - { return null; } - public static Expression createIdentExp(LocatedString i) { return null; } - public static Expression createSymbolExp(VarSymbol symbol, bossa.util.Location loc) - { return null; } - public static Expression createCallExp(Expression function, Expression param1) { return null; } --- 23,32 ---- *************** *** 53,59 **** { return null; } - public static VarSymbol createConstructorCallSymbol(MethodDeclaration declaration, LocatedString name, mlsub.typing.Polytype type) - { return null; } - public static gnu.bytecode.Method getImplementationAbove(MethodDeclaration decl, gnu.bytecode.ClassType firstArg) { return null; } --- 41,44 ---- *************** *** 65,71 **** { return null; } - public static Pattern createPattern(LocatedString name) - { return null; } - public static Pattern createPattern(LocatedString name, mlsub.typing.TypeConstructor tc, boolean sure) { return null; } --- 50,53 ---- *************** *** 77,83 **** { return false; } - static Statement analyseMethodBody(Statement s, VarScope varScope, TypeScope typeScope, MonoSymbol[] params, boolean mustReturnAValue) - { return null; } - static Expression analyse(Expression e, VarScope v, TypeScope t) { return null; } --- 59,62 ---- *************** *** 86,90 **** { return null; } - static void typecheck(Statement s) {} static void typecheck(Expression e) {} --- 65,68 ---- *************** *** 94,100 **** { return null; } - public static mlsub.typing.Monotype getTypeWithTC(mlsub.typing.TypeConstructor tc) - { return null; } - public static mlsub.typing.Monotype getTypeWithTC(mlsub.typing.TypeConstructor tc, mlsub.typing.Monotype[] sourceParams ) { return null; } --- 72,75 ---- *************** *** 103,111 **** { return null; } - static bossa.util.UserError unknownIdent(LocatedString ident) - { - return null; - } - public static void _printStackTraceWithSourceInfo(Throwable t) {} } --- 78,81 ---- |
From: Arjan B. <ar...@us...> - 2004-12-19 22:37:58
|
Update of /cvsroot/nice/Nice/src/bossa/link In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6256/F:/nice/src/bossa/link Modified Files: Alternative.java Compilation.java DispatchTest.java ImportedAlternative.java JavaAlternative.java Log Message: Converted the Java* classes. (by Luc Perrin) Index: Alternative.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/link/Alternative.java,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** Alternative.java 18 Dec 2004 23:43:14 -0000 1.57 --- Alternative.java 19 Dec 2004 22:37:17 -0000 1.58 *************** *** 18,22 **** import bossa.syntax.MethodDeclaration; - import bossa.syntax.JavaMethod; import bossa.syntax.Pattern; import bossa.syntax.LocatedString; --- 18,21 ---- *************** *** 242,247 **** String fullName = to.getFullName(); ! if (from instanceof JavaMethod) ! new JavaAlternative((JavaMethod) from).add(fullName); List list = (List) alternatives.get(from.getFullName()); --- 241,246 ---- String fullName = to.getFullName(); ! if (from.isJavaMethod()) ! new JavaAlternative(from).add(fullName); List list = (List) alternatives.get(from.getFullName()); Index: JavaAlternative.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/link/JavaAlternative.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JavaAlternative.java 12 Oct 2004 23:35:49 -0000 1.1 --- JavaAlternative.java 19 Dec 2004 22:37:17 -0000 1.2 *************** *** 13,17 **** package bossa.link; - import bossa.syntax.JavaMethod; import bossa.syntax.Pattern; import nice.tools.typing.Types; --- 13,16 ---- *************** *** 25,29 **** class JavaAlternative extends Alternative { ! JavaAlternative(JavaMethod method) { super(method.getName().toString(), patterns(method)); --- 24,28 ---- class JavaAlternative extends Alternative { ! JavaAlternative(bossa.syntax.MethodDeclaration method) { super(method.getName().toString(), patterns(method)); *************** *** 32,36 **** } ! JavaMethod method; static Pattern[] patterns(bossa.syntax.MethodDeclaration method) --- 31,35 ---- } ! bossa.syntax.MethodDeclaration method; static Pattern[] patterns(bossa.syntax.MethodDeclaration method) Index: Compilation.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/link/Compilation.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Compilation.java 19 Dec 2004 19:58:27 -0000 1.19 --- Compilation.java 19 Dec 2004 22:37:17 -0000 1.20 *************** *** 132,136 **** ****************************************************************/ ! static void compile(JavaMethod m, Stack sortedAlternatives, bossa.modules.Package module) --- 132,136 ---- ****************************************************************/ ! static void compile(MethodDeclaration /* JavaMethod */ m, Stack sortedAlternatives, bossa.modules.Package module) *************** *** 176,180 **** } ! private static NiceClass declaringClass(JavaMethod m, Alternative alt) { mlsub.typing.TypeConstructor firstArgument = alt.getPatterns()[0].getTC(); --- 176,180 ---- } ! private static NiceClass declaringClass(MethodDeclaration /* JavaMethod */ m, Alternative alt) { mlsub.typing.TypeConstructor firstArgument = alt.getPatterns()[0].getTC(); *************** *** 202,206 **** boolean voidReturn, Expression[] params, ! ClassType c, JavaMethod m) { if (!sortedAlternatives.hasNext()) --- 202,206 ---- boolean voidReturn, Expression[] params, ! ClassType c, MethodDeclaration /* JavaMethod */ m) { if (!sortedAlternatives.hasNext()) Index: DispatchTest.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/link/DispatchTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DispatchTest.java 19 Dec 2004 19:58:27 -0000 1.2 --- DispatchTest.java 19 Dec 2004 22:37:17 -0000 1.3 *************** *** 44,55 **** private DispatchTest() { } ! public static void register(UserOperator/*NiceMethod*/ m) ! { ! methods.add(m); ! } ! ! public static void register(JavaMethod m) { ! javaMethods.add(m); } --- 44,53 ---- private DispatchTest() { } ! public static void register(MethodDeclaration m) { ! if( m.isJavaMethod() ) ! javaMethods.add(m); ! else ! methods.add(m); } *************** *** 76,80 **** for (Iterator i = javaMethods.iterator(); i.hasNext();) ! test((JavaMethod) i.next(), module); } finally { --- 74,78 ---- for (Iterator i = javaMethods.iterator(); i.hasNext();) ! test((MethodDeclaration/*JavaMethod*/) i.next(), module); } finally { *************** *** 97,101 **** } ! private static void test(JavaMethod m, bossa.modules.Package module) { Stack sortedAlternatives = Alternative.sortedAlternatives(m); --- 95,99 ---- } ! private static void test(MethodDeclaration/*JavaMethod*/ m, bossa.modules.Package module) { Stack sortedAlternatives = Alternative.sortedAlternatives(m); *************** *** 121,127 **** } ! private static boolean trivialTestJava(JavaMethod m, Stack alternatives) { ! gnu.bytecode.Method reflectMethod = m.reflectMethod; // Static methods and constructors cannot be overriden, so there is --- 119,125 ---- } ! private static boolean trivialTestJava(MethodDeclaration m, Stack alternatives) { ! gnu.bytecode.Method reflectMethod = m.getReflectMethod(); // Static methods and constructors cannot be overriden, so there is *************** *** 317,321 **** { gnu.bytecode.Method superImplementation = bossa.syntax.dispatch.getImplementationAbove ! ((JavaMethod) method, firstArg); if (superImplementation != null && superImplementation.isAbstract() == false) --- 315,319 ---- { gnu.bytecode.Method superImplementation = bossa.syntax.dispatch.getImplementationAbove ! (method, firstArg); if (superImplementation != null && superImplementation.isAbstract() == false) Index: ImportedAlternative.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/link/ImportedAlternative.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ImportedAlternative.java 1 Dec 2004 02:00:30 -0000 1.11 --- ImportedAlternative.java 19 Dec 2004 22:37:17 -0000 1.12 *************** *** 16,20 **** import bossa.syntax.LocatedString; import bossa.syntax.MethodDeclaration; - import bossa.syntax.JavaMethod; import bossa.syntax.VarSymbol; import nice.tools.code.*; --- 16,19 ---- *************** *** 98,107 **** private static void registerJavaMethod(String fullName) { ! if (! fullName.startsWith(JavaMethod.fullNamePrefix)) return; int end = fullName.lastIndexOf(':'); LocatedString methodName = new LocatedString ! (fullName.substring(JavaMethod.fullNamePrefix.length(), end), bossa.util.Location.nowhere()); --- 97,106 ---- private static void registerJavaMethod(String fullName) { ! if (! fullName.startsWith("JAVA:")) return; int end = fullName.lastIndexOf(':'); LocatedString methodName = new LocatedString ! (fullName.substring("JAVA:".length(), end), bossa.util.Location.nowhere()); *************** *** 115,119 **** if (md.getFullName().equals(fullName)) { ! ((JavaMethod) md).registerForDispatch(); return; } --- 114,118 ---- if (md.getFullName().equals(fullName)) { ! md.registerForDispatch(); return; } |
From: Arjan B. <ar...@us...> - 2004-12-19 22:37:56
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6256/F:/nice/src/bossa/parser Modified Files: Parser.jj Log Message: Converted the Java* classes. (by Luc Perrin) Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.288 retrieving revision 1.289 diff -C2 -d -r1.288 -r1.289 *** Parser.jj 19 Dec 2004 19:58:25 -0000 1.288 --- Parser.jj 19 Dec 2004 22:37:15 -0000 1.289 *************** *** 1471,1475 **** { javaTypes.add(0,method); ! return new RetypedJavaMethod(method,"<init>",javaTypes, name,cst,returnType,parameters); } --- 1471,1475 ---- { javaTypes.add(0,method); ! return bossa.syntax.dispatch.createRetypedJavaMethod(method,"<init>",javaTypes, name,cst,returnType,parameters); } *************** *** 1483,1487 **** if(javaTypes!=null) ! return new RetypedJavaMethod(className,methodName,javaTypes, name,cst,returnType,parameters); else --- 1483,1487 ---- if(javaTypes!=null) ! return bossa.syntax.dispatch.createRetypedJavaMethod(className,methodName,javaTypes, name,cst,returnType,parameters); else |
From: Arjan B. <ar...@us...> - 2004-12-19 22:37:55
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6256/F:/nice/src/bossa/modules Modified Files: Package.java Log Message: Converted the Java* classes. (by Luc Perrin) Index: Package.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Package.java,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -d -r1.127 -r1.128 *** Package.java 19 Dec 2004 19:58:26 -0000 1.127 --- Package.java 19 Dec 2004 22:37:16 -0000 1.128 *************** *** 292,296 **** bossa.syntax.dispatch.resetTypeDefinitionMappings(); TypeConstructors.reset(); ! JavaClasses.reset(); PrimitiveType.reset(); gnu.bytecode.Type.reset(); --- 292,296 ---- bossa.syntax.dispatch.resetTypeDefinitionMappings(); TypeConstructors.reset(); ! bossa.syntax.dispatch.resetJavaClasses(); PrimitiveType.reset(); gnu.bytecode.Type.reset(); |