macro-debugger: workaround for instrumentation problem in provide

The expansion observer is not propagated to expand_all_provides.

original commit: e13cce267d4f37242d494fc2dcba6a5ff4408c19
This commit is contained in:
Ryan Culpepper 2012-03-14 23:07:44 -06:00
parent b4086e0783
commit 7baa54e6b1
2 changed files with 21 additions and 0 deletions

View File

@ -288,10 +288,23 @@
[() #f]
[((? CheckImmediateMacro)) $1])
;; FIXME: workaround for problem in expander instrumentation:
;; observer not propagated correctly to expand_all_provides
;; so local actions that should be within prim-provide's EE
;; instead appear directly here
(Prim#%ModuleBegin
(#:args e1 e2 rs)
[(prim-#%module-begin ! rename-one (? ModuleBegin/Phase) (? Eval))
(make p:#%module-begin e1 e2 rs $2 $3 $4
(for/or ([la (in-list $5)])
(and (local-exn? la) (local-exn-exn la))))])
#|
;; restore this version when expander fixed
(Prim#%ModuleBegin-REAL
(#:args e1 e2 rs)
[(prim-#%module-begin ! rename-one (? ModuleBegin/Phase) !)
(make p:#%module-begin e1 e2 rs $2 $3 $4 $5)])
|#
(ModuleBegin/Phase
[((? ModulePass1) next-group (? ModulePass2) next-group (? ModulePass3))

View File

@ -215,4 +215,12 @@
(syntax-local-value (quote-syntax lambda) void)))))])
(check-pred deriv? d)
(check-pred ok-node? d)))
(test-case "syntax-local-value in provide"
(let ([d (trace '(module m racket/base
(#%plain-module-begin
(provide (except-out (all-defined-out) x y))
(define-values (x) 1)
(define-values (y) 2))))])
(check-pred deriv? d)
(check-pred ok-node? d)))
))