Revert "syntax/parse: fix for deterministic compilation"
This reverts commit 1acaf0111d
.
This commit is contained in:
parent
f7fff58de6
commit
c8f3536694
|
@ -283,20 +283,6 @@ Some optimizations:
|
||||||
|
|
||||||
;; ----
|
;; ----
|
||||||
|
|
||||||
(begin-for-syntax
|
|
||||||
;; gensym=>var : Hash[(cons Symbol LiftTarget) => Syntax]
|
|
||||||
(define gensym=>var (make-hash))
|
|
||||||
|
|
||||||
;; lift-gensym : Symbol -> Syntax
|
|
||||||
;; For deterministic compilation. Maps compile-time gensyms used by
|
|
||||||
;; action:post to expressions whose values preserve distinctness.
|
|
||||||
(define (lift-gensym g)
|
|
||||||
(define key (cons g (syntax-local-lift-context)))
|
|
||||||
(hash-ref! gensym=>var key
|
|
||||||
(lambda () (syntax-local-lift-expression #'(gensym))))))
|
|
||||||
|
|
||||||
;; ----
|
|
||||||
|
|
||||||
#|
|
#|
|
||||||
Conventions:
|
Conventions:
|
||||||
- rhs : RHS
|
- rhs : RHS
|
||||||
|
@ -747,10 +733,8 @@ Conventions:
|
||||||
[#s(action:do _ (stmt ...))
|
[#s(action:do _ (stmt ...))
|
||||||
#'(let () (no-shadow stmt) ... (#%expression k))]
|
#'(let () (no-shadow stmt) ... (#%expression k))]
|
||||||
[#s(action:post _ pattern group index)
|
[#s(action:post _ pattern group index)
|
||||||
(with-syntax ([group* (let ([group (syntax->datum #'group)])
|
#'(let ([pr* (ps-add-post pr 'group 'index)])
|
||||||
(if group (lift-gensym group) #'#f))])
|
(parse:A x cx pattern pr* es k))])]))
|
||||||
#'(let ([pr* (ps-add-post pr group* 'index)])
|
|
||||||
(parse:A x cx pattern pr* es k)))])]))
|
|
||||||
|
|
||||||
;; (bind/sides clauses k) : expr[Ans]
|
;; (bind/sides clauses k) : expr[Ans]
|
||||||
;; In k: attrs(clauses) are bound.
|
;; In k: attrs(clauses) are bound.
|
||||||
|
|
|
@ -79,7 +79,7 @@ A ActionPattern is one of
|
||||||
* (action:and Base (listof ActionPattern))
|
* (action:and Base (listof ActionPattern))
|
||||||
(action:parse Base SinglePattern stx)
|
(action:parse Base SinglePattern stx)
|
||||||
(action:do Base (listof stx))
|
(action:do Base (listof stx))
|
||||||
(action:post Base ActionPattern (U UninternedSymbol #f) Nat)
|
(action:post Base ActionPattern Quotable Nat)
|
||||||
|
|
||||||
action:and is desugared below in create-* procedures
|
action:and is desugared below in create-* procedures
|
||||||
|#
|
|#
|
||||||
|
|
Loading…
Reference in New Issue
Block a user