Re: [ANNOUNCE] STklos version 0.50
Bravo. It's very exciting.
I took a quick look on an IRIX64-6.5 box with gcc-2.95.2&gmake, and
here are a couple of small patches.
(1) gc/dyn_load.c doesn't compile as it is. I'm using boehm-gc-5.3 on the
different project and that works fine. The only difference in dyn_load.c
between 5.0 and 5.3 is as follows:
=============================================
*** dyn_load.c.orig Wed Jan 17 13:29:43 2001
--- dyn_load.c Wed Jan 17 13:29:12 2001
***************
*** 393,399 ****
--- 393,401 ----
/* The type is a lie, since the real type doesn't make sense here, */
/* and we only test for NULL. */
+ #ifndef GC_scratch_last_end_ptr /* Never an extern any more? */
extern ptr_t GC_scratch_last_end_ptr; /* End of GC_scratch_alloc arena */
+ #endif
/* We use /proc to track down all parts of the address space that are */
/* mapped by the process, and throw out regions we know we shouldn't */
=============================================
(2) In lib/compiler.stk, compile-named-let rewriting is not correct in
the case like:
(let ((name 0))
(let name ((x name)) x))
This should return 0 instead of a closure.
Also, compile-letrec produces invalid let syntax "(let ())" if
empty binding is given, and reports an error. Here's a quick fix:
=================================================
*** compiler.stk.orig Wed Jan 17 12:15:38 2001
--- compiler.stk Wed Jan 17 13:20:33 2001
***************
*** 1238,1249 ****
(let ((bindings (cadr args))
(body (cddr args)))
(when (valid-let-bindings? bindings #t)
! (let ((tmps (map (lambda (x) (gensym)) bindings)))
! (compile `(let ,(map (lambda (x) (list (car x) #f)) bindings)
! (let ,(map (lambda (x y) (list x (cadr y)))tmps bindings)
! ,_at_(map (lambda (x y) `(set! ,(car y) ,x))tmps bindings))
! ,(rewrite-body body))
! env tail?)))))))
;;
;; LET (& named let)
--- 1238,1251 ----
(let ((bindings (cadr args))
(body (cddr args)))
(when (valid-let-bindings? bindings #t)
! (if (null? bindings) ;to avoid producing an empty let
! (compile (rewrite-body body) env tail?)
! (let ((tmps (map (lambda (x) (gensym)) bindings)))
! (compile `(let ,(map (lambda (x) (list (car x) #f)) bindings)
! (let ,(map (lambda (x y) (list x (cadr y)))tmps bindings)
! ,_at_(map (lambda (x y) `(set! ,(car y) ,x))tmps bindings))
! ,(rewrite-body body))
! env tail?))))))))
;;
;; LET (& named let)
***************
*** 1253,1263 ****
(if (< len 4)
(compile-error "ill formed named let ~S" args)
(when (valid-let-bindings? bindings #t)
! (compile `(letrec ((,name (lambda ,(map car bindings)
! ,_at_body)))
! (,name ,_at_(map cadr bindings)))
! env
! tail?))))
(define (compile-let args env tail?)
--- 1255,1268 ----
(if (< len 4)
(compile-error "ill formed named let ~S" args)
(when (valid-let-bindings? bindings #t)
! (let ((tmpargs (map (lambda (_) (gensym)) bindings)))
! (compile `(let ,(map (lambda (var bind) (list var (cadr bind)))
! tmpargs bindings)
! (letrec ((,name (lambda ,(map car bindings)
! ,_at_body)))
! (,name ,_at_tmpargs)))
! env
! tail?)))))
(define (compile-let args env tail?)
=================================================
(3) I haven't nailed it down yet, but stklos crashes when it tries to
read certain bignums. It seems that it's a gmp problem.
Again, thanks for this exciting new release.
--shiro
Received on Thu Jan 18 2001 - 01:18:05 CET
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST