GSOC | Extending Common Lisp support
Jamison Hope
jrh@theptrgroup.com
Sat Apr 28 20:18:00 GMT 2012
On Apr 28, 2012, at 4:02 PM, Charles Turner wrote:
> Having a few problems with the transliteration of PrimOps.scm to CL:
>
> I've transliterated
>
> (define (make-string (count :: <int>) ch)
> (make <gnu.lists.FString> count
> (invoke-static <gnu.commonlisp.lang.CommonLisp>
> 'asChar ch)))
>
> into
>
> (defun make-string (count ch)
> (declare (int count))
> (make <gnu.lists.FString> count
> (invoke-static <gnu.commonlisp.lang.CommonLisp>
> 'asChar ch)))
>
> But with the latter I get the following warning:
>
> $ kawa -C primitives.lisp
> primitives.lisp:134:9: warning - no declaration seen for
> <gnu.lists.FString>
>
> Any ideas why that's happening in CL but not Scheme?
I don't have a complete answer for you, but here's an additional
data point that might help:
$ kawa --lisp
#|kawa:1|# <gnu.lists.FString>
<unknown>: warning - no declaration seen for <gnu.lists.FString>
unbound location <gnu.lists.FString>
at gnu.mapping.Location.get(Location.java:67)
at atInteractiveLevel$1.run(stdin)
at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:299)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:200)
at kawa.Shell.run(Shell.java:279)
at kawa.Shell.run(Shell.java:194)
at kawa.Shell.run(Shell.java:175)
at kawa.repl.main(repl.java:884)
#|kawa:2|# gnu.lists.FString
class gnu.lists.FString
#|kawa:3|# ^D
So, check where Kawa handles class literals enclosed in angle brackets.
Maybe it's in Scheme-only code (and therefore another candidate for
refactoring).
> Adding
> defProcStFld("make", "gnu.kawa.reflect.Invoke", "make");
> to CommonLisp doesn't seem to make a difference (not that surprising
> in hindsight)
Right, I think that's already in there due to the
LocationEnumeration e = Scheme.builtin().enumerateAllLocations();
while (e.hasMoreElements())
{
importLocation(e.nextLocation());
}
at the top of initLisp().
> Thanks for your time,
> Charlie.
--
Jamison Hope
The PTR Group
www.theptrgroup.com
More information about the Kawa
mailing list