Skip to content

Commit

Permalink
Revert "syntax/parse: fix for deterministic compilation"
Browse files Browse the repository at this point in the history
This reverts commit 1acaf01.
  • Loading branch information
rmculpepper committed May 3, 2016
1 parent f7fff58 commit c8f3536
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
20 changes: 2 additions & 18 deletions racket/collects/syntax/parse/private/parse.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- rhs : RHS
Expand Down Expand Up @@ -747,10 +733,8 @@ Conventions:
[#s(action:do _ (stmt ...))
#'(let () (no-shadow stmt) ... (#%expression k))]
[#s(action:post _ pattern group index)
(with-syntax ([group* (let ([group (syntax->datum #'group)])
(if group (lift-gensym group) #'#f))])
#'(let ([pr* (ps-add-post pr group* 'index)])
(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]
;; In k: attrs(clauses) are bound.
Expand Down
2 changes: 1 addition & 1 deletion racket/collects/syntax/parse/private/rep-patterns.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ A ActionPattern is one of
* (action:and Base (listof ActionPattern))
(action:parse Base SinglePattern 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
|#
Expand Down

0 comments on commit c8f3536

Please sign in to comment.