Discussion:
[Larceny-users] ANF size error with 0.97b1
Marco Maggi
2008-12-09 20:17:54 UTC
Permalink
With larceny-0.97b1-bin-native-ia32-linux86
I get this output:

ANF size: 20396

and on the same program with
larceny-0.963-bin-native-ia32-linux86 I get

ANF size: 20416

the program works with both Ikarus and Ypsilon.

It is complex to provide code, because I am
using the R6RS port of the SRFI by Derick
Eddington[1]. (I failed to understand how to
load Larceny's SRFIs from "larceny -r6rs", I
will have to read the guide more carefully.)

Is it something to report as a bug?

[1]
https://code.launchpad.net/~ikarus-libraries-team/ikarus-libraries/srfi
--
Marco Maggi

"Now feel the funk blast!"
Rage Against the Machine - "Calm like a bomb"
William D Clinger
2008-12-09 22:53:41 UTC
Permalink
Post by Marco Maggi
Is it something to report as a bug?
The "ANF size:" reports come from the compiler, and
provide an estimate of the code size. Those messages
were added to help us track down some performance
bugs in compiler optimization.

They shouldn't be generated in R6RS mode, so that is
indeed a bug. It would probably be better for me to
file that bug report.
Post by Marco Maggi
(I failed to understand how to
load Larceny's SRFIs from "larceny -r6rs", I
will have to read the guide more carefully.)
SRFI 41 is the only SRFI that Larceny v0.97b1 supports
in R6RS mode. We expect to add a bunch of SRFIs as
R6RS libraries after SRFI 97 becomes final, which is
expected to happen soon.

Will
Marco Maggi
2008-12-10 06:40:54 UTC
Permalink
Post by William D Clinger
Post by Marco Maggi
Is it something to report as a bug?
The "ANF size:" reports come from the compiler, and
provide an estimate of the code size. [...] It would
probably be better for me to file that bug report.
Thanks. The following script triggers the output; the
import specs I have commented out will cause errors
(Derick is still working to Larceny support).

;; proof.sls --
(import (rnrs)
(srfi and-let-star)
(srfi args-fold)
(srfi case-lambda)
(srfi char-set)
(srfi compare)
(srfi cond-expand)
(srfi cut)
(srfi eager-comprehensions)
;; (srfi error-reporting)
(srfi format)
;; (srfi general-cond)
(srfi let-values)
(srfi lightweight-testing)
(srfi lists)
(srfi parameters)
(srfi random)
(srfi rec)
(srfi receive)
;; (srfi records)
(srfi sharing)
(srfi streams)
(srfi string-ports)
;; (srfi strings)
(srfi time)
;; (srfi vectors)
)
(display 123)
;;; end of file

I run it with:

$ larceny -r6rs -path /usr/local/lib/scheme \
-program proof.sps

after putting Derick's SRFIs in the selected
directory. In the SRFI distribution I rename
all the "xxx.larceny.sls" to "xxx.sls" else
they are not found. I have NOT tried to
precompile the libraries.

The following libraries, when imported alone,
will NOT trigger the output:

(srfi and-let-star)
(srfi args-fold)
(srfi case-lambda)
(srfi char-set)
(srfi compare)
(srfi cond-expand)
(srfi cut)
(srfi format)
(srfi let-values)
(srfi lists)
(srfi parameters)
(srfi random)
(srfi rec)
(srfi receive)
(srfi sharing)
(srfi streams)
(srfi string-ports)
(srfi time)

while the following will do:

(srfi eager-comprehensions)
(srfi lightweight-testing)

The following script imports all the
libraries that, when imported, alone do
NOT trigger the output, and it does NOT
trigger the output:

;; proof.sls --

(import (rnrs)
(srfi and-let-star)
(srfi args-fold)
(srfi case-lambda)
(srfi char-set)
(srfi compare)
(srfi cond-expand)
(srfi cut)
(srfi format)
(srfi let-values)
(srfi lists)
(srfi parameters)
(srfi random)
(srfi rec)
(srfi receive)
(srfi sharing)
(srfi streams)
(srfi string-ports)
(srfi time))
(display 123)
;;; end of file

Derick is using an INCLUDE/RESOLVE form
to include source files, but it does not
seem to cause problems because it does it
in (srfi time), which is loaded without
output messages.

The lightweight testing library loads
the eager comp library, so it may be that
the ec library is the culprit.
Post by William D Clinger
We expect to add a bunch of SRFIs as
R6RS libraries after SRFI 97 becomes
final[...]
Thanks.
--
Marco Maggi

"Now feel the funk blast!"
Rage Against the Machine - "Calm like a bomb"
William D Clinger
2008-12-10 15:22:26 UTC
Permalink
I have NOT tried to precompile the libraries.
Since the "ANF size:" messages are coming from
the compiler, precompiling the libraries would
eliminate those messages from the run-time output.

Will

Continue reading on narkive:
Loading...