/dports/lang/racket/racket-8.3/src/expander/syntax/ |
H A D | scope.rkt | 22 add-scopes 39 add-binding-in-scopes! 40 add-bulk-binding-in-scopes! 199 ;; other scopes in the binding may be unreachable, but it 756 ;; scope must be represented in such a way that the binding 757 ;; shift is implicit via the phase in which the binding 875 (define (add-binding-in-scopes! scopes sym binding #:just-for-nominal? [just-for-nominal? #f]) 877 (define bt (binding-table-add (scope-binding-table max-sc) scopes sym binding just-for-nominal?)) 881 (define (add-bulk-binding-in-scopes! scopes bulk-binding 884 (define bt (binding-table-add-bulk (scope-binding-table max-sc) scopes bulk-binding [all …]
|
H A D | binding-table.rkt | 25 binding-table-add 26 binding-table-add-bulk 29 in-binding-table 111 (define (binding-table-add bt scopes sym binding just-for-nominal?) 117 (binding-table-add (table-with-bulk-bindings-syms bt) 133 [else (binding-table-add (table-with-bulk-bindings-syms/serialize bt) 146 (define (binding-table-add-bulk bt scopes bulk 166 (binding-table-add-bulk (table-with-bulk-bindings bt bt null) scopes bulk)])) 337 (for/hash ([(scopes binding) (in-immutable-hash bindings-for-sym)] 362 [(scopes binding) (in-immutable-hash bindings-for-sym)]) [all …]
|
H A D | binding-set.rkt | 4 "module-binding.rkt" 7 (provide syntax-binding-set 8 syntax-binding-set? 9 syntax-binding-set-extend 10 syntax-binding-set->syntax) 12 (struct syntax-binding-set (binds)) 13 (struct bind (sym phase binding)) 20 (struct-copy syntax-binding-set bs 33 (define s (add-scope (datum->syntax #f datum) 35 (for ([bind (in-list (syntax-binding-set-binds bs))]) [all …]
|
/dports/lang/racket-minimal/racket-8.3/src/expander/syntax/ |
H A D | scope.rkt | 22 add-scopes 39 add-binding-in-scopes! 40 add-bulk-binding-in-scopes! 199 ;; other scopes in the binding may be unreachable, but it 756 ;; scope must be represented in such a way that the binding 757 ;; shift is implicit via the phase in which the binding 875 (define (add-binding-in-scopes! scopes sym binding #:just-for-nominal? [just-for-nominal? #f]) 877 (define bt (binding-table-add (scope-binding-table max-sc) scopes sym binding just-for-nominal?)) 881 (define (add-bulk-binding-in-scopes! scopes bulk-binding 884 (define bt (binding-table-add-bulk (scope-binding-table max-sc) scopes bulk-binding [all …]
|
H A D | binding-table.rkt | 25 binding-table-add 26 binding-table-add-bulk 29 in-binding-table 111 (define (binding-table-add bt scopes sym binding just-for-nominal?) 117 (binding-table-add (table-with-bulk-bindings-syms bt) 133 [else (binding-table-add (table-with-bulk-bindings-syms/serialize bt) 146 (define (binding-table-add-bulk bt scopes bulk 166 (binding-table-add-bulk (table-with-bulk-bindings bt bt null) scopes bulk)])) 337 (for/hash ([(scopes binding) (in-immutable-hash bindings-for-sym)] 362 [(scopes binding) (in-immutable-hash bindings-for-sym)]) [all …]
|
/dports/lang/racket/racket-8.3/src/expander/expand/ |
H A D | apply-transformer.rkt | 19 (for/list ([v (in-list vs)]) 24 ;; the `local-expand`-like bits are in this function 58 (add-intdef-scopes 65 (flip-introduction-scopes binding-id ctx))) 81 ;; the macro application-like bits are in this function 96 (define use-scopes (maybe-create-use-site-scope ctx binding)) 99 (define intro-s (add-scope s intro-scope)) 100 (define use-s (add-scopes intro-s use-scopes)) 106 (apply-transformer-in-context transformer scoped-args ctx 112 (define post-s (maybe-add-post-expansion result-s ctx)) [all …]
|
H A D | definition-context.rkt | 16 (provide add-intdef-scopes 27 internal-definition-context-add-scopes 60 ;; keep parent or context frame-id in order to add use-site scopes to uses of spliced macros 96 (add-intdef-scopes (add-intdef-scopes pre-id intdef #:always? #t) 102 (add-local-binding! intdef-id phase counter 118 (define input-s (flip-introduction-scopes (add-intdef-scopes s all-intdefs) ctx)) 151 (add-intdef-scopes s intdef 185 ;; internal-definition-context-add-scopes 186 (define (internal-definition-context-add-scopes intdef s) 190 (raise-argument-error 'internal-definition-context-add-scopes [all …]
|
H A D | def-id.rkt | 4 "../syntax/binding.rkt" 5 "../syntax/module-binding.rkt" 14 add-defined-sym!) 19 ;; that wrap the same symbol in different scopes, we invent new 26 ;; reference can still work in normal cases. 47 (for/list ([id (in-list ids)]) 52 ;; extra scopes on the binding form... 53 (no-extra-scopes? id all-scopes-stx top-level-bind-scope phase) 67 (add-binding! id b phase #:in orig-s) 72 (define (no-extra-scopes? id all-scopes-stx top-level-bind-scope phase) [all …]
|
H A D | env.rkt | 32 add-binding! 33 add-bulk-binding! 34 add-local-binding! 67 (if (syntax-any-macro-scopes? id) 93 (define (add-binding! id binding phase #:in [in-s #f] #:just-for-nominal? [just-for-nominal? #f]) 95 (add-binding-in-scopes! (syntax-scope-set id phase) (syntax-e id) binding 98 (define (add-bulk-binding! s binding phase 103 (add-bulk-binding-in-scopes! (syntax-scope-set s phase) binding 106 ;; Helper for registering a local binding in a set of scopes: 107 (define (add-local-binding! id phase counter [all …]
|
H A D | main.rkt | 71 maybe-add-post-expansion) 232 " extra bindings or scopes in the current context") 322 "encountered a macro binding in form that should be fully expanded" 351 ;; If the variable is locally bound, replace the use's scopes with the binding's scopes 383 (define use-scopes (maybe-create-use-site-scope ctx binding)) 384 (define use-s (add-scopes intro-s use-scopes)) 400 (define post-s (maybe-add-post-expansion result-s ctx)) 461 ;; We're in a recursive definition context where use-site scopes 480 (define (maybe-add-post-expansion s ctx) 506 (define intro-id (add-scope target-id intro-scope)) [all …]
|
H A D | expr.rkt | 47 (add-local-binding! id phase counter #:in s #:local-sym local-sym) 54 (for/list ([body (in-list bodys)]) (add-scope body sc)) 60 [scopes (if sc 229 (add-local-binding! id phase counter 235 (add-local-binding! id phase counter 284 (let ([scopes (cons sc (expand-context-scopes ctx))]) 478 (define use-site-scopes (root-expand-context-use-site-scopes ctx)) 479 (define datum-s (remove-scopes (remove-scopes (m 'datum) (expand-context-scopes ctx)) 480 (if use-site-scopes (unbox use-site-scopes) '()))) 635 ;; Must be in a module, and we'll check the binding later, so strip `#%top`: [all …]
|
H A D | body.rkt | 41 (add-scope body inside-sc))) 45 (define def-ctx-scopes (box null)) 53 [def-ctx-scopes def-ctx-scopes] 55 (lambda (s) (add-scope s inside-sc))] 62 ;; Increment the binding layer relative to `ctx` when we encounter a binding 125 ;; Found a variable definition; add bindings, extend the 135 (add-local-binding! id phase counter 174 ;; Found a macro definition; add bindings, evaluate the 185 (add-local-binding! id phase counter 267 …(define finish-ctx (struct*-copy expand-context (accumulate-def-ctx-scopes body-ctx def-ctx-scopes) [all …]
|
/dports/lang/racket-minimal/racket-8.3/src/expander/expand/ |
H A D | apply-transformer.rkt | 19 (for/list ([v (in-list vs)]) 24 ;; the `local-expand`-like bits are in this function 58 (add-intdef-scopes 65 (flip-introduction-scopes binding-id ctx))) 81 ;; the macro application-like bits are in this function 96 (define use-scopes (maybe-create-use-site-scope ctx binding)) 99 (define intro-s (add-scope s intro-scope)) 100 (define use-s (add-scopes intro-s use-scopes)) 106 (apply-transformer-in-context transformer scoped-args ctx 112 (define post-s (maybe-add-post-expansion result-s ctx)) [all …]
|
H A D | definition-context.rkt | 16 (provide add-intdef-scopes 27 internal-definition-context-add-scopes 60 ;; keep parent or context frame-id in order to add use-site scopes to uses of spliced macros 96 (add-intdef-scopes (add-intdef-scopes pre-id intdef #:always? #t) 102 (add-local-binding! intdef-id phase counter 118 (define input-s (flip-introduction-scopes (add-intdef-scopes s all-intdefs) ctx)) 151 (add-intdef-scopes s intdef 185 ;; internal-definition-context-add-scopes 186 (define (internal-definition-context-add-scopes intdef s) 190 (raise-argument-error 'internal-definition-context-add-scopes [all …]
|
H A D | def-id.rkt | 4 "../syntax/binding.rkt" 5 "../syntax/module-binding.rkt" 14 add-defined-sym!) 19 ;; that wrap the same symbol in different scopes, we invent new 26 ;; reference can still work in normal cases. 47 (for/list ([id (in-list ids)]) 52 ;; extra scopes on the binding form... 53 (no-extra-scopes? id all-scopes-stx top-level-bind-scope phase) 67 (add-binding! id b phase #:in orig-s) 72 (define (no-extra-scopes? id all-scopes-stx top-level-bind-scope phase) [all …]
|
H A D | env.rkt | 32 add-binding! 33 add-bulk-binding! 34 add-local-binding! 67 (if (syntax-any-macro-scopes? id) 93 (define (add-binding! id binding phase #:in [in-s #f] #:just-for-nominal? [just-for-nominal? #f]) 95 (add-binding-in-scopes! (syntax-scope-set id phase) (syntax-e id) binding 98 (define (add-bulk-binding! s binding phase 103 (add-bulk-binding-in-scopes! (syntax-scope-set s phase) binding 106 ;; Helper for registering a local binding in a set of scopes: 107 (define (add-local-binding! id phase counter [all …]
|
H A D | main.rkt | 71 maybe-add-post-expansion) 232 " extra bindings or scopes in the current context") 322 "encountered a macro binding in form that should be fully expanded" 351 ;; If the variable is locally bound, replace the use's scopes with the binding's scopes 383 (define use-scopes (maybe-create-use-site-scope ctx binding)) 384 (define use-s (add-scopes intro-s use-scopes)) 400 (define post-s (maybe-add-post-expansion result-s ctx)) 461 ;; We're in a recursive definition context where use-site scopes 480 (define (maybe-add-post-expansion s ctx) 506 (define intro-id (add-scope target-id intro-scope)) [all …]
|
H A D | expr.rkt | 47 (add-local-binding! id phase counter #:in s #:local-sym local-sym) 54 (for/list ([body (in-list bodys)]) (add-scope body sc)) 60 [scopes (if sc 229 (add-local-binding! id phase counter 235 (add-local-binding! id phase counter 284 (let ([scopes (cons sc (expand-context-scopes ctx))]) 478 (define use-site-scopes (root-expand-context-use-site-scopes ctx)) 479 (define datum-s (remove-scopes (remove-scopes (m 'datum) (expand-context-scopes ctx)) 480 (if use-site-scopes (unbox use-site-scopes) '()))) 635 ;; Must be in a module, and we'll check the binding later, so strip `#%top`: [all …]
|
H A D | body.rkt | 41 (add-scope body inside-sc))) 45 (define def-ctx-scopes (box null)) 53 [def-ctx-scopes def-ctx-scopes] 55 (lambda (s) (add-scope s inside-sc))] 62 ;; Increment the binding layer relative to `ctx` when we encounter a binding 125 ;; Found a variable definition; add bindings, extend the 135 (add-local-binding! id phase counter 174 ;; Found a macro definition; add bindings, evaluate the 185 (add-local-binding! id phase counter 267 …(define finish-ctx (struct*-copy expand-context (accumulate-def-ctx-scopes body-ctx def-ctx-scopes) [all …]
|
/dports/lang/racket/racket-8.3/src/expander/namespace/ |
H A D | api.rkt | 2 (require (only-in "../syntax/syntax.rkt" syntax-mpi-shifts empty-syntax) 3 (only-in "../syntax/scope.rkt" add-scopes push-scope syntax-scope-set) 4 (only-in "../syntax/fallback.rkt" fallback-first) 5 (only-in "../syntax/binding.rkt" resolve+shift syntax-transfer-shifts) 65 (define other-namespace-scopes (for/list ([sc (in-set 71 (define (add-ns-scopes s) 72 (syntax-transfer-shifts (add-scopes (push-scope s post-scope) 81 (add-ns-scopes (car (syntax-e s))))) 91 (add-ns-scopes s)])) 121 (define ctx-stx (add-scopes empty-syntax [all …]
|
/dports/lang/racket-minimal/racket-8.3/src/expander/namespace/ |
H A D | api.rkt | 2 (require (only-in "../syntax/syntax.rkt" syntax-mpi-shifts empty-syntax) 3 (only-in "../syntax/scope.rkt" add-scopes push-scope syntax-scope-set) 4 (only-in "../syntax/fallback.rkt" fallback-first) 5 (only-in "../syntax/binding.rkt" resolve+shift syntax-transfer-shifts) 65 (define other-namespace-scopes (for/list ([sc (in-set 71 (define (add-ns-scopes s) 72 (syntax-transfer-shifts (add-scopes (push-scope s post-scope) 81 (add-ns-scopes (car (syntax-e s))))) 91 (add-ns-scopes s)])) 121 (define ctx-stx (add-scopes empty-syntax [all …]
|
/dports/lang/racket/racket-8.3/src/expander/eval/ |
H A D | root-context.rkt | 8 "../syntax/binding.rkt" 9 "../syntax/module-binding.rkt" 29 (define s (add-scopes empty-syntax (root-expand-context-module-scopes root-ctx))) 32 (for ([(phase+reqs) (in-list requires)]) 34 (for ([req (in-list (cdr phase+reqs))]) 45 (for ([(phase linklet) (in-hash evaled-ld-h)]) 46 (for ([sym (in-list (linklet-export-variables linklet))]) 48 ;; the binding should be unreachable, but we need to reserve 51 (add-binding! id (make-module-binding self phase sym) phase) 52 (add-defined-sym! defined-syms phase sym id))) [all …]
|
/dports/lang/racket-minimal/racket-8.3/src/expander/eval/ |
H A D | root-context.rkt | 8 "../syntax/binding.rkt" 9 "../syntax/module-binding.rkt" 29 (define s (add-scopes empty-syntax (root-expand-context-module-scopes root-ctx))) 32 (for ([(phase+reqs) (in-list requires)]) 34 (for ([req (in-list (cdr phase+reqs))]) 45 (for ([(phase linklet) (in-hash evaled-ld-h)]) 46 (for ([sym (in-list (linklet-export-variables linklet))]) 48 ;; the binding should be unreachable, but we need to reserve 51 (add-binding! id (make-module-binding self phase sym) phase) 52 (add-defined-sym! defined-syms phase sym id))) [all …]
|
/dports/lang/racket-minimal/racket-8.3/src/expander/compile/ |
H A D | serialize.rkt | 74 add-module-path-index! 286 (define reachable-scopes (find-reachable-scopes v bulk-shifts)) 303 (define add-frontier! 856 (decode* (deserialize-bulk-binding-at scopes bulk))] 926 ;; For pruning unreachable scopes in serialization 931 (define (get-reachable-scopes) reachable-scopes) 935 ;; binding tables when bulk-binding provides will be preserved, in 952 (set! reachable-scopes (set-add reachable-scopes v)) 961 ;; that equivalence is reachable if all the scopes in the 974 [(reach-scopes? v) [all …]
|
/dports/lang/racket/racket-8.3/src/expander/compile/ |
H A D | serialize.rkt | 74 add-module-path-index! 286 (define reachable-scopes (find-reachable-scopes v bulk-shifts)) 303 (define add-frontier! 856 (decode* (deserialize-bulk-binding-at scopes bulk))] 926 ;; For pruning unreachable scopes in serialization 931 (define (get-reachable-scopes) reachable-scopes) 935 ;; binding tables when bulk-binding provides will be preserved, in 952 (set! reachable-scopes (set-add reachable-scopes v)) 961 ;; that equivalence is reachable if all the scopes in the 974 [(reach-scopes? v) [all …]
|