mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 08:47:35 +02:00
Reproduce crash from icyc
This commit is contained in:
parent
3abfc51bef
commit
d947337688
1 changed files with 24 additions and 19 deletions
43
test.scm
43
test.scm
|
@ -1,19 +1,24 @@
|
|||
;; Temporary testing, delete this once it works
|
||||
(define (call2 fn x y)
|
||||
(write
|
||||
(fn x y)))
|
||||
|
||||
(define (call fn a)
|
||||
(fn a))
|
||||
|
||||
(call write 'hello)
|
||||
|
||||
;; Demonstrate sending an interpreted function to compiled code
|
||||
;; I think in order for this to work, the compiled code would have to
|
||||
;; detect an interpreted proc, and use eval to execute it
|
||||
|
||||
;; TODO: to debug this, may try placing printfs in runtime's apply
|
||||
(eval '(call2 (lambda (x y) (+ y x)) 2 3))
|
||||
;(eval '(call (lambda (x) (+ 1 x)) (display (+ 1 1))))
|
||||
;(eval '(call write 1))
|
||||
;(eval '(call mywrite 1))
|
||||
;;; Temporary testing, delete this once it works
|
||||
;(define (call2 fn x y)
|
||||
; (write
|
||||
; (fn x y)))
|
||||
;
|
||||
;(define (call fn a)
|
||||
; (fn a))
|
||||
;
|
||||
;(call write 'hello)
|
||||
;
|
||||
;;; Demonstrate sending an interpreted function to compiled code
|
||||
;;; I think in order for this to work, the compiled code would have to
|
||||
;;; detect an interpreted proc, and use eval to execute it
|
||||
;
|
||||
;;; TODO: to debug this, may try placing printfs in runtime's apply
|
||||
;(eval '(call2 (lambda (x y) (+ y x)) 2 3))
|
||||
;;(eval '(call (lambda (x) (+ 1 x)) (display (+ 1 1))))
|
||||
;;(eval '(call write 1))
|
||||
;;(eval '(call mywrite 1))
|
||||
;
|
||||
(eval '(define (a x) x))
|
||||
(eval '(a 1))
|
||||
(eval '(a 1))
|
||||
(eval '(begin (define (a z) z) (a 1) (a 1)))
|
||||
|
|
Loading…
Add table
Reference in a new issue