[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bugs #8973] define-private functions not accessible from eve
From: |
Per Bothner |
Subject: |
[Bug-kawa] [bugs #8973] define-private functions not accessible from everywhere in a module |
Date: |
Sun, 16 May 2004 18:45:15 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040113 |
This mail is an automated notification from the bugs tracker
of the project: Kawa.
/**************************************************************************/
[bugs #8973] Latest Modifications:
Changes by:
Per Bothner <address@hidden>
'Date:
Sun 05/16/04 at 22:44 (GMT)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Works for me
Assigned to | None | bothner
------------------ Additional Follow-up Comments ----------------------------
Hmm. Another one where it works for me:
$ java kawa.repl
#|kawa:1|# (require 'list-lib)
#|kawa:2|# (count < '(1 2 4 8) '(2 4 6 8 10 12 14 16))
3
> Perhaps define-private functions should be implemented as "package scope"?
There is a mechanism for handling this, that is used for public macros that
reference private data. We should extend that mechanism, if needed.
> Sometimes define-private functions get used in a named let or letrec whose
> body is implemented as a separate class.
I'd like to reduce the number of such classes. From the TODO file:
If a local variable is captured, and all functions intermediate between the
capture site and the definition are call-only functions, and the local variable
is never written (except before all calls to these intermediate functions),
then add the variable as an extra implicit parameter to thse intermediate
functions, instead of storing the variable in a frame.
/**************************************************************************/
[bugs #8973] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=8973>
Project: Kawa
Submitted by: Chris Dean
On: Sun 05/16/04 at 02:48
Category: Code generation
Severity: 5 - Average
Item Group: Run-time exception
Resolution: Works for me
Assigned to: bothner
Status: Open
Summary: define-private functions not accessible from everywhere in a module
Original Submission: Sometimes define-private functions get used in a named
let or letrec whose body is implemented as a separate class.
That is, for some module M with a private function p we
will generate the private method M.p. If there is also a
function f then parts of the body of f might be generated
in M$frame1.lambda1recur. If lambda1recur calls M.p we will
get a runtime error.
Perhaps define-private functions should be implemented as
"package scope"?
Here's an example from srfi1:
#|kawa:2|# (count < '(1 2 4 8) '(2 4 6 8 10 12 14 16))
java.lang.IllegalAccessError: tried to access method
gnu.kawa.slib.srfi1.$PcCars$PlCdrs(Ljava/lang/Object;)Ljava/lang/Object; from
class gnu.kawa.slib.srfi1$frame6
at gnu.kawa.slib.srfi1$frame6.lambda21(srfi1.scm:802)
at gnu.kawa.slib.srfi1$frame6.apply0(srfi1.scm)
at gnu.expr.ModuleMethod.apply0(ModuleMethod.java:81)
at
kawa.standard.call_with_values.callWithValues(call_with_values.java:10)
at kawa.standard.call_with_values.apply2(call_with_values.java:19)
at gnu.kawa.slib.srfi1$frame5.lambda20lp(srfi1.scm:802)
at gnu.kawa.slib.srfi1.count$V(srfi1.scm:800)
Follow-up Comments
------------------
-------------------------------------------------------
Date: Sun 05/16/04 at 22:44 By: bothner
Hmm. Another one where it works for me:
$ java kawa.repl
#|kawa:1|# (require 'list-lib)
#|kawa:2|# (count < '(1 2 4 8) '(2 4 6 8 10 12 14 16))
3
> Perhaps define-private functions should be implemented as "package scope"?
There is a mechanism for handling this, that is used for public macros that
reference private data. We should extend that mechanism, if needed.
> Sometimes define-private functions get used in a named let or letrec whose
> body is implemented as a separate class.
I'd like to reduce the number of such classes. From the TODO file:
If a local variable is captured, and all functions intermediate between the
capture site and the definition are call-only functions, and the local variable
is never written (except before all calls to these intermediate functions),
then add the variable as an extra implicit parameter to thse intermediate
functions, instead of storing the variable in a frame.
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=8973>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/