From: Ito Kazumitsu <kaz@maczuka.gcd.org>
To: kawa@sourceware.org
Subject: Re: kawa 1.14: java.io.PrintWriter prints everything as "true"
Date: Wed, 09 Oct 2013 01:51:00 -0000 [thread overview]
Message-ID: <20131009.105106.389956539.kaz@maczuka.gcd.org> (raw)
In-Reply-To: <5253AEAA.6030605@bothner.com>
From: Per Bothner <per@bothner.com>
Subject: Re: kawa 1.14: java.io.PrintWriter prints everything as "true"
Date: Tue, 08 Oct 2013 00:05:14 -0700
> * Try using the latest Subversion of Kawa - it's possible the fix
> I checked in for your previous bug report may be relevant.
I tried the latest Subversion of Kawa, but it did not help.
> * Simplify your script as much as you can. For example:
I succeeded in simplifying the script significantly.
> * Try removing the --no-warn-unknown-member flags - that warning
> tells you useful information.
>
> * If you're adventurous, try adding the --debug-print-final-expr
> flag. That tells you how Kawa has analyzed your code - i.e.
> what it looks like just before bytecode generation.
Here it is.
$ cat test.scm
(define wtr
(java.io.PrintWriter
(java.io.OutputStreamWriter (java.lang.System:.out) "UTF-8")))
(define (print-it)
(wtr:println "PRINT ME"))
(print-it)
(wtr:flush)
$ java -cp kawa-1.14.1-svn.jar kawa.repl --debug-print-final-expr --script test.scm
[Compiling final atInteractiveLevel$1 to atInteractiveLevel$1:
(Module/atInteractiveLevel$1/1/ (Declarations: wtr/15/fl:40809)
(Define line:1:1 /Declaration[wtr/15]
(Apply => ClassType java.io.PrintWriter line:2:4
(Quote
java.io.PrintWriter java.io.PrintWriter.<init>(java.io.Writer) ::gnu.expr.PrimProcedure)
(Quote class java.io.PrintWriter ::class)
(Apply => ClassType java.io.OutputStreamWriter line:3:8
(Quote
java.io.OutputStreamWriter java.io.OutputStreamWriter.<init>(java.io.OutputStream,java.lang.String) ::gnu.expr.PrimProcedure)
(Quote class java.io.OutputStreamWriter ::class)
(Apply => ClassType java.io.PrintStream line:3:36
(Quote #<procedure static-field> ::gnu.kawa.reflect.SlotGet)
(Quote ClassType java.lang.System ::class-type)
(Quote Field:java.lang.System.out ::gnu.bytecode.Field))
(Quote "UTF-8" ::java.lang.String)))))]
test.scm:5:6: warning - no known slot 'println' in java.lang.Object
[Compiling final atInteractiveLevel$2 to atInteractiveLevel$2:
(Module/atInteractiveLevel$2/6/
(Declarations: print-it/26/fl:408c8::gnu.mapping.Procedure)
(Define line:4:1 /Declaration[print-it/26]
(Lambda/print-it/8/fl:3 line:4:9 ()
(Apply [tailcall] line:5:5 (Ref/15/Declaration[applyToArgs/2])
(Apply line:5:6
(Quote
#<procedure gnu.kawa.functions.GetNamedPart> ::gnu.kawa.functions.GetNamedPart)
(Ref/13/Declaration[wtr/15])
(Quote println ::gnu.mapping.SimpleSymbol))
(Quote "PRINT ME" ::java.lang.String)))))]
[Compiling final atInteractiveLevel$3 to atInteractiveLevel$3:
(Module/atInteractiveLevel$3/10/ ()
(Apply [tailcall] line:6:1 (Ref/17/Declaration[print-it/26])))]
test.scm:7:2: warning - no known slot 'flush' in java.lang.Object
[Compiling final atInteractiveLevel$4 to atInteractiveLevel$4:
(Module/atInteractiveLevel$4/11/ ()
(Apply [tailcall] line:7:1 (Ref/24/Declaration[applyToArgs/2])
(Apply line:7:2
(Quote
#<procedure gnu.kawa.functions.GetNamedPart> ::gnu.kawa.functions.GetNamedPart)
(Ref/22/Declaration[wtr/15])
(Quote flush ::gnu.mapping.SimpleSymbol))))]
true
next prev parent reply other threads:[~2013-10-09 1:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 4:19 Ito Kazumitsu
2013-10-08 7:05 ` Per Bothner
2013-10-09 1:51 ` Ito Kazumitsu [this message]
2013-10-09 5:56 ` Per Bothner
2013-10-13 7:03 ` Per Bothner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131009.105106.389956539.kaz@maczuka.gcd.org \
--to=kaz@maczuka.gcd.org \
--cc=kawa@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).