This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: static modules and local vars
- From: Chris Dean <ctdean at sokitomi dot com>
- To: "62945" <62945 at bol dot com dot br>
- Cc: "kawa" <kawa at sources dot redhat dot com>
- Date: Sat, 07 Aug 2004 11:21:57 -0700
- Subject: Re: static modules and local vars
- References: <I2383J$BE4FDC0790DF34D12AFF43642905FE2F@bol.com.br>
"62945" <62945@bol.com.br> writes:
> So is the "y" in the "let" transformed to static class
> var "Lit0" ? If not I imagine it would be much better if
> "y" was trasformed to a local var in method "f". In case
> "y" is "Lit0" f is not thread-safe is it ?
My reading is that "1" is translated to Lit0. Since 1 is a constant
that seems fine.
jode output is easier read:
public class m extends ModuleBody
{
public static final ModuleMethod f;
static final m $instance = new m();
static final IntNum Lit0;
// ...
public static Object f(Object x) {
Object y = x;
return AddOp.$Pl.apply2(Lit0, y);
}
Regards,
Chris Dean