fix lazy stepper bug: annota of non-identifier fns

- fix lazy stepper bug where delaying of non-identifier fns
  wasnt being properly hidden
- add test case for this bug

include in 5.2
(cherry picked from commit 79dd7df945)
This commit is contained in:
Stephen Chang 2011-10-08 15:54:09 -04:00 committed by Eli Barzilay
parent fcd5fb9d74
commit d2204bfd17
3 changed files with 15 additions and 4 deletions

View File

@ -78,7 +78,10 @@
(define-syntax (mark-as-lazy-op stx) (define-syntax (mark-as-lazy-op stx)
(syntax-case stx () (syntax-case stx ()
[(_ arg) (stepper-add-lazy-op-prop (syntax/loc stx arg))])) [(_ arg)
(identifier? #'arg)
(stepper-add-lazy-op-prop (syntax/loc stx arg))]
[(_ arg) #'arg]))
(define-syntax (hidden-~ stx) (define-syntax (hidden-~ stx)
(syntax-case stx () (syntax-case stx ()

View File

@ -23,7 +23,7 @@
lazy-length lazy-list-ref lazy-list-tail lazy-append lazy-reverse lazy-empty? lazy-length lazy-list-ref lazy-list-tail lazy-append lazy-reverse lazy-empty?
lazy-assoc lazy-assq lazy-assv lazy-cons? lazy-remove lazy-remq lazy-remv lazy-assoc lazy-assq lazy-assv lazy-cons? lazy-remove lazy-remq lazy-remv
lazy-member lazy-memq lazy-memv lazy-filter1 lazy-filter2 lazy-fold lazy-member lazy-memq lazy-memv lazy-filter1 lazy-filter2 lazy-fold
lazy-cyclic1)) lazy-cyclic1 lazy-fn-app))
(let ((outer-namespace (current-namespace))) (let ((outer-namespace (current-namespace)))
(parameterize ([display-only-errors #t] (parameterize ([display-only-errors #t]

View File

@ -2132,8 +2132,16 @@
-> ,def (+ 1 {1}) -> ,def (+ 1 {1})
:: ,def {(+ 1 1)} -> ,def {2})) :: ,def {(+ 1 1)} -> ,def {2}))
; application in function position -- checks bug fix
(let* ([lxx '(lambda (x) x)]
[def `(define I ,lxx)])
(t 'lazy-fn-app m:lazy
,def ((I I) I)
:: ,def (({I} I) I) -> ,def (({,lxx} I) I)
:: ,def ((,lxx {I}) I) -> ,def ((,lxx {,lxx}) I)
:: ,def ({(,lxx ,lxx)} I) -> ,def ({,lxx} I)
:: ,def (,lxx {I}) -> ,def (,lxx {,lxx})
:: ,def {(,lxx ,lxx)} -> ,def {,lxx}))
#; #;