This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Compiling packages with gnu.expr


Daniel Bonniot wrote:

>Not exactly: an inner class in java would be prefixed by the englobing
>class name, not the (global) module name.
>I have written code for that: follow the <code>outer</code> links until
>I find a classExp, and use its name as the prefix if it is found.
>
Yes, that seems right.

>So it could be the job of the LambdaExp/ClassExp to compute its bytecode
>name, and it can fetch the prefix from the compilation if it wants. Thus
>we could remove generateClassName from Compilation, and add
>getJavaName(Compilation) to LambdaExp. Compilation should probably keep
>a mechanism to create unique names by adding numbers at the end
>(generateUniqueName ?)
>I am puzzled by the existing LambdaExp.getJavaName(), as it doesn't
>return the final bytecode name. It is needed? For debugging only?
>
My initial suspicion is that it is a rememnet of older code, when we
used to generate a class for each (non-inlined) LambdaExp.  We no longer
do that, even when compiling with --full-tailcalls.  A function is now
compiled to a methid, not a class.  A class may be generated for a closure,
not for for a function per se.

So I have the feel that allocClass and getJavaName are now only called
for ModuleExp, not plain LambdaExp.

>Or do you have another design in mind? Some way or another it should be
>possible to use fully qualified name, and to have frames and inner
>classes named after the englobing class.
>
Yes.

>What is the "scoping" in the generated classes? The
>private/default/protected/public visibility in the JVM spec?
>
I was just clarifying thta whatever it is, ScopeExps should probably not
be used for it!



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]