This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: void run()
Chris Dean wrote:
The run(CallContext) method that the Kawa generates for each compiled
module is static, but the ModuleBody class (which is the parent class
of the generated module) has a non-static run(CallContext) method.
I'm hoping the attached patch should fix it.
(Using a different name than "run" in the static case, or
inlining it in <clinit> are other options.)
--
--Per Bothner
per@bothner.com http://per.bothner.com/
Index: Compilation.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/Compilation.java,v
retrieving revision 1.121
diff -u -r1.121 Compilation.java
--- Compilation.java 5 Nov 2004 19:23:22 -0000 1.121
+++ Compilation.java 10 Nov 2004 07:12:05 -0000
@@ -1838,11 +1838,10 @@
boolean staticModule = module.isStatic();
Method apply_method;
- int apply_flags = Access.PUBLIC|Access.FINAL;
- if (staticModule)
- apply_flags |= Access.STATIC;
apply_method
- = curClass.addMethod ("run", arg_types, Type.void_type, apply_flags);
+ = curClass.addMethod ("run", arg_types, Type.void_type,
+ staticModule ? Access.PRIVATE+Access.STATIC
+ : Access.PUBLIC+Access.FINAL);
method = apply_method;
// For each parameter, assign it to its proper slot.
// If a parameter !isSimple(), we cannot assign it to a local slot,