Hi,
I managed to implement JIT compilation of method calls into the Guile
interpreter (AIscm 0.8.2 [1]):
(use-modules (oop goops) (aiscm sequence) (aiscm obj) (aiscm jit))
(<< 1 (* 10 (seq <obj> 1 2 4 8)))
;#<sequence<obj>>:
;(1024 1048576 1099511627776 1208925819614629174706176)
Types can also be composed using Scheme objects:
(use-modules (oop goops) (aiscm sequence) (aiscm obj) (aiscm complex)
(aiscm jit))
(* (seq (complex <obj>) 1+2i 3+4i) 5)
;#<sequence<complex<obj>>>:
;(5.0+10.0i 15.0+20.0i)
In the same way native types can be composed:
(use-modules (oop goops) (aiscm sequence) (aiscm rgb) (aiscm int) (aiscm
jit))
(make (multiarray (rgb (integer 8 unsigned)) 2) #:shape '(3 2))
;#<sequence<sequence<rgb<int<8,unsigned>>>>>:
;(((rgb 160 85 191) (rgb 10 0 0) (rgb 0 0 0))
; ((rgb 0 0 0) (rgb 0 0 0) (rgb 0 0 0)))
Let me know if you have any suggestions or comments.
Regards
Jan
[1] http://wedesoft.github.io/aiscm/