This is the mail archive of the kawa@sourceware.org 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]
Other format: [Raw text]

Re: [GSoC] Parameter protocols in CL


On Jul 24, 2012, at 10:40 AM, Charles Turner wrote:

On 23 July 2012 23:22, Charles Turner <chturne@gmail.com> wrote:
The extended keyword list is now implemented

Actually, it has a bug I'm not sure about:


#|kawa:14|# (defun test (&key ((:environment env-arg-name) 10)) (list
env-arg-name))
(Lambda/36/fl:0
(#!key
(ENVIRONMENT:/37/fl:40040(ignorable) (Quote
#! undefined ::java.lang.Object)))
(Let#37
(({COMMON-LISP}:ENV-ARG-NAME/36/fl:40040(ignorable) =
(If (Apply (Quote #<procedure eq?>)
(Ref/69/ENVIRONMENT:/Declaration[ENVIRONMENT:/37])
(Quote #!undefined)) ;; line 16 below surely should make
this conditional false?
(Quote 10)
(Ref/70/ENVIRONMENT:/Declaration[ENVIRONMENT:/37])))) ;; ...
and return this
(Apply line:14:53 (Ref/74/Declaration[applyToArgs/2])
(Ref/72/list)
(Ref/73/{COMMON-LISP}:ENV-ARG-NAME/Declaration[{COMMON- LISP}:ENV-ARG-NAME/36]))))]
#|kawa:15|# (test)
(10)
#|kawa:16|# (test :environment 12)
(10)


Can anyone see what's wrong with that syntax? Am I misunderstanding
how the keyword arguments are bound?

Hi Charles,


I'm back from my vacation now, still attempting to get caught up on what I
missed last week. [Thanks to Per & Helmut for helping Charlie stay on track
during my absence!]


Two questions:

1. What does (disassemble #'test) show?

2. I see you made your own SVN server, good idea. Is the above code snippet
reflecting its top-of-trunk (r7277)? I'm trying to compile it and hit a few
snags -- the first simple one was that gnu.mapping.Symbol#getLocalPart has
two return statements, so I commented out the latter. But now I get


std_syntax.scm:324:31: junk at end of specifier for parameter 'env' after type gnu.mapping.Environment
std_syntax.scm:324:31: misformed formals in lambda


which seems incorrect, as you haven't touched that file. So it must be due to
some of these lambda changes. Perhaps it's related to this current problem?


OK, #2 was a multi-part question.

-Jamie

--
Jamison Hope
The PTR Group
www.theptrgroup.com




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