ライブラリが動くようになった - Scheme VM を書く
(library (rnrs io simple (6)) (export display) (import) (define (display x . port) (if (null? port) (sys-display x) (sys-display x (car port))))) (library (higepon) (export hello) (import (rnrs io simple (6))) (define (hello) (display "hello"))) (import (higepon)) (hello)
のようにライブラリが動くようになった。
昨日動かなかったのは VM のレジスタを破壊しているのが原因だった。
evaluate =>runループ =>call =>evaluate =>runループ
のようにネストしている時におかしくなるという。