This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: for-each does not compile in CVS tree
- To: Emmanuel Castro <castro at lirmm dot fr>
- Subject: Re: for-each does not compile in CVS tree
- From: Per Bothner <per at bothner dot com>
- Date: 13 Dec 2000 08:24:45 -0800
- Cc: kawa at sourceware dot cygnus dot com
- References: <3A37925E.819D5B08@lirmm.fr>
Emmanuel Castro <castro@lirmm.fr> writes:
> The new inlined version of for-each does not work properly when compiled
>
> In fact, it does nothing. I don't know why.
Ouch. The problem was easy to find, but it is embarassing that
testing didn't catch it. I'm not quite sure why.
Anyway, I've checked the following patch in.
2000-12-13 Per Bothner <per@bothner.com>
* kawa/standard/map.java (inline): Swap order of then-clause and
else-clause in generated code. Fixes bug 'for-each does not compile
in CVS tree' reported by Emmanuel Castro <castro@lirmm.fr>.
Index: map.java
===================================================================
RCS file: /cvs/kawa/kawa/kawa/standard/map.java,v
retrieving revision 1.4
diff -u -r1.4 map.java
--- map.java 2000/12/12 06:50:43 1.4
+++ map.java 2000/12/13 16:15:48
@@ -166,7 +166,7 @@
compArgs[0] = new ReferenceExp(largs[i]);
compArgs[1] = empty;
lexp.body = new IfExp(new ApplyExp(isEq, compArgs),
- lexp.body, QuoteExp.voidExp);
+ QuoteExp.voidExp, lexp.body);
initArgs[i] = args[i+1];
}
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/