still chasing the bug
This commit is contained in:
parent
fff511672d
commit
2f90e68db1
|
@ -84,7 +84,6 @@
|
||||||
(make-bootstrapped-primitive-code
|
(make-bootstrapped-primitive-code
|
||||||
'map
|
'map
|
||||||
'(letrec ([map (lambda (f l)
|
'(letrec ([map (lambda (f l)
|
||||||
(displayln "in map")
|
|
||||||
(if (null? l)
|
(if (null? l)
|
||||||
null
|
null
|
||||||
(cons (f (car l))
|
(cons (f (car l))
|
||||||
|
|
|
@ -261,9 +261,10 @@
|
||||||
(let: ([a-top : toplevel (ensure-toplevel (env-ref m (CheckToplevelBound!-depth op)))])
|
(let: ([a-top : toplevel (ensure-toplevel (env-ref m (CheckToplevelBound!-depth op)))])
|
||||||
(when (> (CheckToplevelBound!-pos op)
|
(when (> (CheckToplevelBound!-pos op)
|
||||||
(length (toplevel-vals a-top)))
|
(length (toplevel-vals a-top)))
|
||||||
(printf "ERROR: toplevel is length ~s, but trying to refer to ~s"
|
(printf "ERROR: toplevel is length ~s, but trying to refer to ~s.\n\n~s"
|
||||||
(length (toplevel-vals a-top))
|
(length (toplevel-vals a-top))
|
||||||
(CheckToplevelBound!-pos op)))
|
(CheckToplevelBound!-pos op)
|
||||||
|
(toplevel-names a-top)))
|
||||||
(cond
|
(cond
|
||||||
[(undefined? (list-ref (toplevel-vals a-top) (CheckToplevelBound!-pos op)))
|
[(undefined? (list-ref (toplevel-vals a-top) (CheckToplevelBound!-pos op)))
|
||||||
(error 'check-toplevel-bound! "Unbound identifier ~s"
|
(error 'check-toplevel-bound! "Unbound identifier ~s"
|
||||||
|
@ -316,6 +317,7 @@
|
||||||
(let: ([a-proc : SlotValue (machine-proc m)])
|
(let: ([a-proc : SlotValue (machine-proc m)])
|
||||||
(cond
|
(cond
|
||||||
[(closure? a-proc)
|
[(closure? a-proc)
|
||||||
|
(printf "installing values ~s\n" (closure-vals a-proc))
|
||||||
(env-push-many! m (closure-vals a-proc))]
|
(env-push-many! m (closure-vals a-proc))]
|
||||||
[else
|
[else
|
||||||
(error 'step-perform "Procedure register doesn't hold a procedure: ~s"
|
(error 'step-perform "Procedure register doesn't hold a procedure: ~s"
|
||||||
|
|
|
@ -54,5 +54,5 @@
|
||||||
|
|
||||||
(test (read (open-input-file "tests/earley/earley.sch"))
|
(test (read (open-input-file "tests/earley/earley.sch"))
|
||||||
(port->string (open-input-file "tests/earley/expected.txt"))
|
(port->string (open-input-file "tests/earley/expected.txt"))
|
||||||
;;#:debug? #t
|
#:debug? #t
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user