simplify stepper and fix unevaluated id bug
This commit is contained in:
parent
a72b8d8a05
commit
89b96ef9f3
|
@ -962,3 +962,17 @@ code, and works better, too.
|
|||
Nice to be here again...
|
||||
|
||||
2010-12-04
|
||||
|
||||
**************
|
||||
|
||||
How time flies. Small bug fixes; it's now illegal to refer to undefined
|
||||
values. That is, (letrec ([a a]) 3) is illegal. This caused stepper
|
||||
breakage, and I was worried that fixing this was going to require some
|
||||
terrible deep surgery. In fact, though, it looks like this change
|
||||
makes things *simpler*; it looks like I was going out of my way to
|
||||
preserve the undefined values for situations where it might turn up in
|
||||
student programs, and now I can omit that check.
|
||||
|
||||
2013-05-18
|
||||
|
||||
**************
|
||||
|
|
|
@ -436,7 +436,7 @@
|
|||
; wish me luck.
|
||||
|
||||
|
||||
(define (let-abstraction stx output-identifier make-init-list)
|
||||
(define (let-abstraction stx output-identifier)
|
||||
(with-syntax ([(_ ([(var ...) val] ...) . bodies) stx])
|
||||
(match-let*
|
||||
([binding-sets (map syntax->list (syntax->list #'((var ...) ...)))]
|
||||
|
@ -491,7 +491,7 @@
|
|||
free-varref-sets-vals))
|
||||
binding-list)]
|
||||
[counter-id #`lifting-counter]
|
||||
[unevaluated-list (make-init-list binding-list)]
|
||||
[unevaluated-list (map (lambda (b) *unevaluated*) binding-list)]
|
||||
[outer-initialization
|
||||
#`([(#,@lifted-vars #,@binding-list #,let-counter)
|
||||
(values #,@(append (map (lambda (dc_binding) counter-id)
|
||||
|
@ -788,16 +788,9 @@
|
|||
#,rolled-into-fakes))
|
||||
all-free-vars))]
|
||||
|
||||
[(let-values . _)
|
||||
(let-abstraction exp
|
||||
#`let-values
|
||||
(lambda (bindings)
|
||||
(map (lambda (_) *unevaluated*) bindings)))]
|
||||
[(let-values . _) (let-abstraction exp #`let-values)]
|
||||
|
||||
[(letrec-values . _)
|
||||
(let-abstraction exp
|
||||
#`letrec-values
|
||||
(lambda (bindings) (map (lambda (b) #`#,b) bindings)))]
|
||||
[(letrec-values . _) (let-abstraction exp #`letrec-values)]
|
||||
|
||||
|
||||
; $
|
||||
|
|
|
@ -522,6 +522,7 @@
|
|||
;; step through a single expanded expression.
|
||||
(define (step-through-expression expanded)
|
||||
(define annotated (a:annotate expanded break show-lambdas-as-lambdas?))
|
||||
#;(printf "annotated: ~s\n" annotated)
|
||||
(parameterize ([test-engine:test-silence #t])
|
||||
(eval-syntax annotated)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user