From d54c1e4e4942c26dcbaaebcc43d5c92d507a8112 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Sun, 30 Jun 2013 10:04:34 -0400 Subject: [PATCH] Remove most uses of `mzscheme` in the core. Remaining are: - parts of unit200 that Matthew plans to remove. - the `mzscheme` implementation itself. The implementation of `mzscheme` has been moved to the `mzscheme` collection (from the `racket` and `scheme` collections). The `scheme/mzscheme` language, which was undocumented, has been removed. This is slightly backwards-incompatible, because the `xform` handling of precompiled headers now evaluates code in a `racket/base`-like namespace, instead of in a `mzscheme`-like namespace. --- racket/lib/collects/compiler/bundle-dist.rkt | 8 +- racket/lib/collects/compiler/compiler.rkt | 2 +- racket/lib/collects/compiler/embed-sig.rkt | 2 +- racket/lib/collects/compiler/embed-unit.rkt | 6 +- racket/lib/collects/compiler/option-unit.rkt | 2 +- racket/lib/collects/compiler/option.rkt | 2 +- .../compiler/private/collects-path.rkt | 5 +- .../lib/collects/compiler/private/embed.rkt | 3 +- .../lib/collects/compiler/private/macfw.rkt | 4 +- .../collects/compiler/private/windlldir.rkt | 2 +- .../collects/compiler/private/winsubsys.rkt | 2 +- .../lib/collects/compiler/private/xform.rkt | 170 +++++++++--------- racket/lib/collects/compiler/sig.rkt | 3 +- racket/lib/collects/dynext/compile-sig.rkt | 34 ++-- racket/lib/collects/dynext/compile-unit.rkt | 2 +- racket/lib/collects/dynext/compile.rkt | 12 +- racket/lib/collects/dynext/dynext-sig.rkt | 8 +- racket/lib/collects/dynext/dynext-unit.rkt | 10 +- racket/lib/collects/dynext/dynext.rkt | 10 +- racket/lib/collects/dynext/file-sig.rkt | 31 ++-- racket/lib/collects/dynext/file.rkt | 12 +- racket/lib/collects/dynext/link-sig.rkt | 28 +-- racket/lib/collects/dynext/link-unit.rkt | 2 +- racket/lib/collects/dynext/link.rkt | 12 +- .../lib/collects/dynext/private/cmdargs.rkt | 3 +- racket/lib/collects/dynext/private/dirs.rkt | 11 +- .../lib/collects/ffi/examples/use-magick.rkt | 2 +- racket/lib/collects/file/gzip.rkt | 11 +- racket/lib/collects/file/zip.rkt | 5 +- racket/lib/collects/mzlib/private/sigutil.rkt | 1 - racket/lib/collects/mzscheme/main.rkt | 112 +++++++++++- .../{racket => mzscheme}/private/old-ds.rkt | 4 +- .../{racket => mzscheme}/private/old-if.rkt | 0 .../private/old-procs.rkt | 34 +++- .../{racket => mzscheme}/private/old-rp.rkt | 3 +- .../private/stxmz-body.rkt | 7 +- racket/lib/collects/openssl/openssl.rkt | 7 +- .../lib/collects/racket/private/increader.rkt | 2 +- racket/lib/collects/racket/trait.rkt | 36 ++-- racket/lib/collects/scheme/mzscheme.rkt | 132 -------------- racket/lib/collects/setup/main-doc.rkt | 2 +- racket/lib/collects/setup/option-sig.rkt | 3 +- racket/lib/collects/setup/setup-go.rkt | 2 +- racket/lib/collects/setup/unpack.rkt | 5 +- racket/lib/collects/srfi/13/string.rkt | 19 +- racket/lib/collects/srfi/14/char-set.rkt | 4 +- racket/lib/collects/srfi/29/localization.rkt | 15 +- racket/lib/collects/syntax/boundmap.rkt | 3 +- racket/lib/collects/syntax/moddep.rkt | 10 +- racket/lib/collects/syntax/modread.rkt | 4 +- racket/lib/collects/syntax/primitives.rkt | 2 +- .../lib/collects/syntax/private/doctable.rkt | 17 +- racket/lib/collects/syntax/to-string.rkt | 2 +- racket/lib/collects/syntax/trusted-xforms.rkt | 2 +- racket/src/mac/osx_appl.rkt | 2 +- racket/src/racket/gc2/setup.rkt | 1 - racket/src/racket/gc2/xform-mod.rkt | 5 +- racket/src/racket/src/schvers.h | 4 +- 58 files changed, 420 insertions(+), 424 deletions(-) rename racket/lib/collects/{racket => mzscheme}/private/old-ds.rkt (91%) rename racket/lib/collects/{racket => mzscheme}/private/old-if.rkt (100%) rename racket/lib/collects/{racket => mzscheme}/private/old-procs.rkt (70%) rename racket/lib/collects/{racket => mzscheme}/private/old-rp.rkt (94%) rename racket/lib/collects/{racket => mzscheme}/private/stxmz-body.rkt (79%) delete mode 100644 racket/lib/collects/scheme/mzscheme.rkt diff --git a/racket/lib/collects/compiler/bundle-dist.rkt b/racket/lib/collects/compiler/bundle-dist.rkt index e7b596d260..af419cf515 100644 --- a/racket/lib/collects/compiler/bundle-dist.rkt +++ b/racket/lib/collects/compiler/bundle-dist.rkt @@ -1,7 +1,7 @@ -(module bundle-dist mzscheme +(module bundle-dist racket/base (require racket/file - (only racket/base lambda) + (only-in racket/base lambda) racket/path racket/system file/zip @@ -80,8 +80,8 @@ "-mode" "555" "-volname" (path->string (path-replace-suffix (file-name-from-path target) #"")) - "-srcfolder" (path->string (expand-path (path->complete-path dir))) - (path->string (expand-path (path->complete-path target))))]) + "-srcfolder" (path->string (cleanse-path (path->complete-path dir))) + (path->string (cleanse-path (path->complete-path target))))]) ((list-ref p 4) 'wait) (unless (eq? ((list-ref p 4) 'status) 'done-ok) (error 'bundle-directory diff --git a/racket/lib/collects/compiler/compiler.rkt b/racket/lib/collects/compiler/compiler.rkt index 044ae7fb57..05315ff5eb 100644 --- a/racket/lib/collects/compiler/compiler.rkt +++ b/racket/lib/collects/compiler/compiler.rkt @@ -1,4 +1,4 @@ -(module compiler mzscheme +(module compiler racket/base (require racket/unit) (require "sig.rkt") diff --git a/racket/lib/collects/compiler/embed-sig.rkt b/racket/lib/collects/compiler/embed-sig.rkt index e7cac31ad2..aeded68b62 100644 --- a/racket/lib/collects/compiler/embed-sig.rkt +++ b/racket/lib/collects/compiler/embed-sig.rkt @@ -1,5 +1,5 @@ -(module embed-sig mzscheme +(module embed-sig racket/base (require racket/unit) (provide compiler:embed^) diff --git a/racket/lib/collects/compiler/embed-unit.rkt b/racket/lib/collects/compiler/embed-unit.rkt index 12863a18a6..17a2a32283 100644 --- a/racket/lib/collects/compiler/embed-unit.rkt +++ b/racket/lib/collects/compiler/embed-unit.rkt @@ -446,9 +446,9 @@ (if (path? module-path) (path->complete-path module-path) module-path)]) - (syntax-case (expand `(,#'module m mzscheme - (require (only ,module-path) - mzlib/runtime-path) + (syntax-case (expand `(,#'module m racket/base + (#%require (only ,module-path) + racket/runtime-path) (runtime-paths ,module-path))) (quote) [(_ m mz (#%mb rfs req (quote (spec ...)))) (syntax->datum #'(spec ...))] diff --git a/racket/lib/collects/compiler/option-unit.rkt b/racket/lib/collects/compiler/option-unit.rkt index c50abf4c4b..b8d5d69970 100644 --- a/racket/lib/collects/compiler/option-unit.rkt +++ b/racket/lib/collects/compiler/option-unit.rkt @@ -1,4 +1,4 @@ -#lang mzscheme +#lang racket/base (require racket/unit) (require "sig.rkt") diff --git a/racket/lib/collects/compiler/option.rkt b/racket/lib/collects/compiler/option.rkt index debd346a87..68ccd2f021 100644 --- a/racket/lib/collects/compiler/option.rkt +++ b/racket/lib/collects/compiler/option.rkt @@ -1,4 +1,4 @@ -(module option mzscheme +(module option racket/base (require racket/unit) (require "sig.rkt" diff --git a/racket/lib/collects/compiler/private/collects-path.rkt b/racket/lib/collects/compiler/private/collects-path.rkt index a31172bcd8..1ca1168919 100644 --- a/racket/lib/collects/compiler/private/collects-path.rkt +++ b/racket/lib/collects/compiler/private/collects-path.rkt @@ -1,5 +1,4 @@ - -(module collects-path mzscheme +(module collects-path racket/base (provide collects-path->bytes check-collects-path @@ -54,4 +53,4 @@ (file-position out libpos) (write-bytes collects-path-bytes out) (write-bytes #"\0\0" out))) - 'update))))) + #:exists 'update))))) diff --git a/racket/lib/collects/compiler/private/embed.rkt b/racket/lib/collects/compiler/private/embed.rkt index 5c782341df..e20849b6f9 100644 --- a/racket/lib/collects/compiler/private/embed.rkt +++ b/racket/lib/collects/compiler/private/embed.rkt @@ -1,5 +1,4 @@ - -(module embed mzscheme +(module embed racket/base (require compiler/embed) (define mzc:create-embedding-executable create-embedding-executable) (define mzc:embedding-executable-add-suffix embedding-executable-add-suffix) diff --git a/racket/lib/collects/compiler/private/macfw.rkt b/racket/lib/collects/compiler/private/macfw.rkt index 10680dc2fa..ee9f07dc6a 100644 --- a/racket/lib/collects/compiler/private/macfw.rkt +++ b/racket/lib/collects/compiler/private/macfw.rkt @@ -1,7 +1,7 @@ -(module macfw mzscheme +(module macfw racket/base (require "mach-o.rkt" racket/string - (only racket/base regexp-quote) + (only-in racket/base regexp-quote) racket/system) (provide update-framework-path diff --git a/racket/lib/collects/compiler/private/windlldir.rkt b/racket/lib/collects/compiler/private/windlldir.rkt index 54a565ab7a..2c2cbe3a66 100644 --- a/racket/lib/collects/compiler/private/windlldir.rkt +++ b/racket/lib/collects/compiler/private/windlldir.rkt @@ -1,4 +1,4 @@ -(module windlldir mzscheme +(module windlldir racket/base (require racket/port "winutf16.rkt") diff --git a/racket/lib/collects/compiler/private/winsubsys.rkt b/racket/lib/collects/compiler/private/winsubsys.rkt index ffafe53534..0cc699833e 100644 --- a/racket/lib/collects/compiler/private/winsubsys.rkt +++ b/racket/lib/collects/compiler/private/winsubsys.rkt @@ -1,4 +1,4 @@ -(module winsubsys mzscheme +(module winsubsys racket/base (provide set-subsystem) (define DF_NewHeaderOffset #x3C) diff --git a/racket/lib/collects/compiler/private/xform.rkt b/racket/lib/collects/compiler/private/xform.rkt index 05ce53a148..3cf0e1a54d 100644 --- a/racket/lib/collects/compiler/private/xform.rkt +++ b/racket/lib/collects/compiler/private/xform.rkt @@ -1,6 +1,6 @@ -(module xform mzscheme +(module xform racket/base (require racket/list - (only racket/base sort filter remove let) + (for-syntax racket/base) racket/system) (provide xform) @@ -43,10 +43,10 @@ ;; "AST" structures ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (define-struct tok (n line file) (make-inspector)) + (define-struct tok (n line file) #:inspector (make-inspector)) (define-struct (sysheader-tok tok) ()) - (define-struct (seq tok) (close in) (make-inspector)) - (define-struct (parens seq) () (make-inspector)) + (define-struct (seq tok) (close in) #:inspector (make-inspector)) + (define-struct (parens seq) () #:inspector (make-inspector)) (define-struct (brackets seq) ()) (define-struct (braces seq) ()) (define-struct (callstage-parens parens) ()) @@ -72,28 +72,28 @@ (define seqce vector) ;; A cheap way of getting rid of unneeded prototypes: - (define used-symbols (make-hash-table)) - (hash-table-put! used-symbols (string->symbol "GC_variable_stack") 1) - (hash-table-put! used-symbols (string->symbol "GC_cpp_delete") 1) - (hash-table-put! used-symbols (string->symbol "GC_get_variable_stack") 1) - (hash-table-put! used-symbols (string->symbol "GC_set_variable_stack") 1) - (hash-table-put! used-symbols (string->symbol "memset") 1) - (hash-table-put! used-symbols (string->symbol "scheme_thread_local_key") 1) - (hash-table-put! used-symbols (string->symbol "scheme_thread_locals") 1) - (hash-table-put! used-symbols (string->symbol "pthread_getspecific") 1) + (define used-symbols (make-hasheq)) + (hash-set! used-symbols (string->symbol "GC_variable_stack") 1) + (hash-set! used-symbols (string->symbol "GC_cpp_delete") 1) + (hash-set! used-symbols (string->symbol "GC_get_variable_stack") 1) + (hash-set! used-symbols (string->symbol "GC_set_variable_stack") 1) + (hash-set! used-symbols (string->symbol "memset") 1) + (hash-set! used-symbols (string->symbol "scheme_thread_local_key") 1) + (hash-set! used-symbols (string->symbol "scheme_thread_locals") 1) + (hash-set! used-symbols (string->symbol "pthread_getspecific") 1) ;; For dependency tracking: - (define depends-files (make-hash-table 'equal)) + (define depends-files (make-hash)) (define (make-triple v src line sysheader?) (when (symbol? v) - (hash-table-put! used-symbols v - (add1 (hash-table-get + (hash-set! used-symbols v + (add1 (hash-ref used-symbols v (lambda () 0))))) (when (and src output-depends-info?) - (hash-table-put! depends-files src #t)) + (hash-set! depends-files src #t)) (if sysheader? (make-sysheader-tok v line src) (make-tok v line src))) @@ -479,7 +479,7 @@ (define recorded-cpp-out (and precompiling-header? - (open-output-file (change-suffix file-out #".e") 'truncate))) + (open-output-file (change-suffix file-out #".e") #:exists 'truncate))) (define recorded-cpp-in (and precompiled-header (open-input-file (change-suffix precompiled-header #".e")))) @@ -557,7 +557,7 @@ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (current-output-port (if file-out - (open-output-file file-out 'truncate) + (open-output-file file-out #:exists 'truncate) (make-output-port 'dev/null always-evt (lambda (s st ed f?) @@ -585,7 +585,7 @@ (define map-port (if palm-out - (open-output-file palm-out 'truncate) + (open-output-file palm-out #:exists 'truncate) #f)) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -808,10 +808,10 @@ nonempty-calls?)) ;; A function prototype record: - (define-struct prototype (type args static? pointer? pointer?-determined?)) + (define-struct prototype (type args static? pointer? pointer?-determined?) #:mutable) ;; A C++ class record: - (define-struct c++-class (parent parent-name prototyped top-vars)) + (define-struct c++-class (parent parent-name prototyped top-vars) #:mutable) ;; Symbol constants: (define semi (string->symbol ";")) @@ -903,17 +903,17 @@ scheme_make_small_bignum scheme_make_small_rational scheme_make_small_complex)) (define non-functions-table - (let ([ht (make-hash-table)]) + (let ([ht (make-hasheq)]) (for-each (lambda (s) - (hash-table-put! ht s #f)) + (hash-set! ht s #f)) non-functions) ht)) (define args-unevaled '(sizeof __typeof __builtin_object_size)) (define args-unevaled-table - (let ([ht (make-hash-table)]) + (let ([ht (make-hasheq)]) (for-each (lambda (s) - (hash-table-put! ht s #t)) + (hash-set! ht s #t)) args-unevaled) ht)) @@ -936,9 +936,9 @@ '("XTextExtents" "XTextExtents16" "XDrawImageString16" "XDrawImageString" "XDrawString16" "XDrawString")))) - (define non-gcing-functions (make-hash-table)) + (define non-gcing-functions (make-hasheq)) (for-each (lambda (name) - (hash-table-put! non-gcing-functions name #t)) + (hash-set! non-gcing-functions name #t)) non-gcing-builtin-functions) (define non-returning-functions @@ -1038,49 +1038,50 @@ ;; Marhsaling and unmarshaling ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (define makers (make-hash-table)) - (hash-table-put! makers 'struct:tok (cons 'make-tok make-tok)) - (hash-table-put! makers 'struct:sysheader-tok (cons 'make-sysheader-tok make-sysheader-tok)) - (hash-table-put! makers 'struct:seq (cons 'make-a-seq make-a-seq)) - (hash-table-put! makers 'struct:parens (cons 'make-parens make-parens)) - (hash-table-put! makers 'struct:brackets (cons 'make-brackets make-brackets)) - (hash-table-put! makers 'struct:braces (cons 'make-braces make-braces)) - (hash-table-put! makers 'struct:callstage-parens (cons 'make-callstage-parens make-callstage-parens)) - (hash-table-put! makers 'struct:creation-parens (cons 'make-creation-parens make-creation-parens)) - (hash-table-put! makers 'struct:nosrc-parens (cons 'make-nosrc-parens make-nosrc-parens)) - (hash-table-put! makers 'struct:call (cons 'make-call make-call)) - (hash-table-put! makers 'struct:block-push (cons 'make-block-push make-block-push)) - (hash-table-put! makers 'struct:note (cons 'make-note make-note)) - (hash-table-put! makers 'struct:vtype (cons 'make-vtype make-vtype)) - (hash-table-put! makers 'struct:pointer-type (cons 'make-pointer-type make-pointer-type)) - (hash-table-put! makers 'struct:array-type (cons 'make-array-type make-array-type)) - (hash-table-put! makers 'struct:struc-type (cons 'make-struc-type make-struc-type)) - (hash-table-put! makers 'struct:struct-array-type (cons 'make-struct-array-type make-struct-array-type)) - (hash-table-put! makers 'struct:union-type (cons 'make-union-type make-union-type)) - (hash-table-put! makers 'struct:non-pointer-type (cons 'make-non-pointer-type make-non-pointer-type)) - (hash-table-put! makers 'struct:live-var-info (cons 'make-live-var-info make-live-var-info)) - (hash-table-put! makers 'struct:prototype (cons 'make-prototype make-prototype)) - (hash-table-put! makers 'struct:c++-class (cons 'make-c++-class make-c++-class)) + (define makers (make-hasheq)) + (hash-set! makers 'struct:tok (cons 'make-tok make-tok)) + (hash-set! makers 'struct:sysheader-tok (cons 'make-sysheader-tok make-sysheader-tok)) + (hash-set! makers 'struct:seq (cons 'make-a-seq make-a-seq)) + (hash-set! makers 'struct:parens (cons 'make-parens make-parens)) + (hash-set! makers 'struct:brackets (cons 'make-brackets make-brackets)) + (hash-set! makers 'struct:braces (cons 'make-braces make-braces)) + (hash-set! makers 'struct:callstage-parens (cons 'make-callstage-parens make-callstage-parens)) + (hash-set! makers 'struct:creation-parens (cons 'make-creation-parens make-creation-parens)) + (hash-set! makers 'struct:nosrc-parens (cons 'make-nosrc-parens make-nosrc-parens)) + (hash-set! makers 'struct:call (cons 'make-call make-call)) + (hash-set! makers 'struct:block-push (cons 'make-block-push make-block-push)) + (hash-set! makers 'struct:note (cons 'make-note make-note)) + (hash-set! makers 'struct:vtype (cons 'make-vtype make-vtype)) + (hash-set! makers 'struct:pointer-type (cons 'make-pointer-type make-pointer-type)) + (hash-set! makers 'struct:array-type (cons 'make-array-type make-array-type)) + (hash-set! makers 'struct:struc-type (cons 'make-struc-type make-struc-type)) + (hash-set! makers 'struct:struct-array-type (cons 'make-struct-array-type make-struct-array-type)) + (hash-set! makers 'struct:union-type (cons 'make-union-type make-union-type)) + (hash-set! makers 'struct:non-pointer-type (cons 'make-non-pointer-type make-non-pointer-type)) + (hash-set! makers 'struct:live-var-info (cons 'make-live-var-info make-live-var-info)) + (hash-set! makers 'struct:prototype (cons 'make-prototype make-prototype)) + (hash-set! makers 'struct:c++-class (cons 'make-c++-class make-c++-class)) (define (make-short-tok l) (make-tok l #f #f)) ;; A precompiled header saves the above state variables. (when precompiled-header (let ([orig (current-namespace)]) - (parameterize ([current-namespace (make-namespace)]) - (namespace-attach-module orig 'mzscheme) - (namespace-require 'mzscheme) + (parameterize ([current-namespace (make-base-empty-namespace)]) + (namespace-require/copy 'racket/base) + (namespace-attach-module orig 'racket/base) + (namespace-require 'racket/base) ;; Put constructors into the namespace: - (hash-table-for-each makers + (hash-for-each makers (lambda (k v) (namespace-set-variable-value! (car v) (cdr v)))) (namespace-set-variable-value! 'make-short-tok make-short-tok) ;; Load the pre-compiled-header-as-.zo: (let ([l (load (change-suffix precompiled-header #".zo"))]) (for-each (lambda (x) - (hash-table-put! used-symbols (car x) + (hash-set! used-symbols (car x) (+ - (hash-table-get + (hash-ref used-symbols (car x) (lambda () 0)) (cdr x)))) @@ -1094,7 +1095,7 @@ (set! non-pointer-types (list-ref l 5)) (set! struct-defs (list-ref l 6)) - (set! non-gcing-functions (hash-table-copy (list-ref l 7))) + (set! non-gcing-functions (hash-copy (list-ref l 7))) (set! gc-var-stack-mode (list-ref l 8)))))) @@ -1519,11 +1520,11 @@ [(proc-prototype? e) (let ([name (register-proto-information e)]) (when (eq? (tok-n (car e)) '__xform_nongcing__) - (hash-table-put! non-gcing-functions name #t)) + (hash-set! non-gcing-functions name #t)) (when show-info? (printf "/* PROTO ~a */\n" name)) (if (or precompiling-header? - (> (hash-table-get used-symbols name) 1) + (> (hash-ref used-symbols name) 1) (ormap (lambda (v) (eq? (tok-n v) 'virtual)) e)) ; can't drop virtual methods! (if palm? (add-segment-label name e) @@ -1553,7 +1554,7 @@ [(function? e) (let ([name (register-proto-information e)]) (when (eq? (tok-n (car e)) '__xform_nongcing__) - (hash-table-put! non-gcing-functions name #t)) + (hash-set! non-gcing-functions name #t)) (if (skip-function? e) e (begin @@ -1698,7 +1699,7 @@ (andmap (lambda (x) (and (symbol? (tok-n x)) (not (eq? '|,| (tok-n x))))) e) - (= 1 (hash-table-get used-symbols + (= 1 (hash-ref used-symbols (let loop ([e e]) (if (null? (cddr e)) (tok-n (car e)) @@ -1710,7 +1711,7 @@ (define (unused-struc-typedef? e) (let ([once (lambda (s) (and (not precompiling-header?) - (= 1 (hash-table-get used-symbols + (= 1 (hash-ref used-symbols (tok-n s)))))] [seps (list '|,| '* semi)]) (let ([e (if (eq? '__extension__ (car e)) @@ -1920,8 +1921,10 @@ 0)] [non-ptr-base (cond [(eq? 'unsigned (tok-n (car e))) - (if (memq (tok-n (cadr e)) '(int long char intptr_t)) - (list 'unsigned (tok-n (cadr e))))] + (if (memq (tok-n (cadr e)) + '(int long char intptr_t)) + (list 'unsigned (tok-n (cadr e))) + (void))] [(lookup-non-pointer-type (tok-n (car e))) (list (tok-n (car e)))] [else #f])]) @@ -2488,7 +2491,7 @@ e (lambda (name class-name type args static?) type)))]) - (if (hash-table-get non-gcing-functions name (lambda () #f)) + (if (hash-ref non-gcing-functions name (lambda () #f)) (when saw-gcing-call (log-error "[GCING] ~a in ~a: Function ~a declared __xform_nongcing__, but includes a function call." (tok-line saw-gcing-call) (tok-file saw-gcing-call) @@ -2871,15 +2874,15 @@ (convert-function-calls (car el) extra-vars &-vars c++-class live-vars "decls" #f #t)]) (dloop (cdr el) live-vars))))))]) ;; Calculate vars to push in this block. Make sure there are no duplicates. - (let ([newly-pushed (let ([ht (make-hash-table)]) + (let ([newly-pushed (let ([ht (make-hasheq)]) (for-each (lambda (x) (when (or (assq (car x) local-vars) (assq (car x) pushable-vars) (and setup-stack-return-type (is-generated? x))) - (hash-table-put! ht (car x) x))) + (hash-set! ht (car x) x))) (live-var-info-pushed-vars live-vars)) - (hash-table-map ht (lambda (k v) v)))]) + (hash-map ht (lambda (k v) v)))]) (values (apply append pragmas @@ -3035,7 +3038,7 @@ ;; Something precedes (not (null? (cdr e-))) ;; Not an assignment, sizeof, if, string - (or nf? (hash-table-get non-functions-table (tok-n (cadr e-)) #t)) + (or nf? (hash-ref non-functions-table (tok-n (cadr e-)) #t)) (not (string? (tok-n (cadr e-)))) ;; Look back one more for if, etc. if preceding is paren (not (and (parens? (cadr e-)) @@ -3433,7 +3436,7 @@ [(sub-memcpy?) ;; memcpy, etc. call? (and (pair? (cdr e-)) - (hash-table-get non-gcing-functions (tok-n (cadr e-)) #f))] + (hash-ref non-gcing-functions (tok-n (cadr e-)) #f))] [(args live-vars) (convert-paren-interior args vars &-vars c++-class @@ -3507,7 +3510,7 @@ (live-var-info-nonempty-calls? live-vars)))]) (let ([non-gcing-call? (and (null? (cdr func)) - (hash-table-get non-gcing-functions (tok-n (car func)) (lambda () #f)))] + (hash-ref non-gcing-functions (tok-n (car func)) (lambda () #f)))] [setjmp-call? (memq (tok-n (car func)) setjmp-functions)]) (loop rest- @@ -3566,7 +3569,7 @@ (null? rest-) (not (memq (tok-n (car rest-)) '(return else)))))))))))] [(and (looks-like-call? e- #t) - (hash-table-get args-unevaled-table (tok-n (cadr e-)) #f)) + (hash-ref args-unevaled-table (tok-n (cadr e-)) #f)) (loop (cddr e-) (cons (cadr e-) (cons (car e-) result)) live-vars converted-sub?)] [(eq? 'goto (tok-n (car e-))) ;; Goto - assume all vars are live @@ -4027,7 +4030,7 @@ (if (eq? 'struct:tok (vector-ref vec 0)) (list 'make-short-tok (loop (vector-ref vec 1))) (cons - (car (hash-table-get makers (vector-ref vec 0))) + (car (hash-ref makers (vector-ref vec 0))) (map loop (cdr (vector->list vec))))))] [(list? v) (cons 'list (map loop v))] [(pair? v) (list 'cons (loop (car v)) (loop (cdr v)))] @@ -4043,7 +4046,7 @@ (list 'list - (list 'quote (hash-table-map used-symbols cons)) + (list 'quote (hash-map used-symbols cons)) (marshall c++-classes) (marshall (prototyped)) @@ -4057,12 +4060,15 @@ (with-output-to-file (change-suffix file-out #".zo") (lambda () (let ([orig (current-namespace)]) - (parameterize ([current-namespace (make-namespace)]) - (namespace-attach-module orig 'mzscheme) - (namespace-require 'mzscheme) + (parameterize ([current-namespace (make-base-namespace)]) + (namespace-require/copy 'racket/base) + (namespace-attach-module orig 'racket/base) + (namespace-require 'racket/base) + (namespace-require '(for-syntax racket/base)) + (namespace-require/copy '(for-syntax racket/base)) (eval #'(define-syntaxes (#%top-interaction) (lambda (stx) (cdr (syntax-e stx))))) (write (compile e))))) - 'truncate)))) + #:exists 'truncate)))) (when precompiling-header? (let loop ([i 1]) @@ -4079,6 +4085,6 @@ (when output-depends-info? (with-output-to-file (change-suffix file-out #".sdep") (lambda () - (write (hash-table-map depends-files (lambda (k v) k))) + (write (hash-map depends-files (lambda (k v) k))) (newline)) - 'truncate/replace)))))) + #:exists 'truncate/replace)))))) diff --git a/racket/lib/collects/compiler/sig.rkt b/racket/lib/collects/compiler/sig.rkt index 860a07eb70..87f1af4dda 100644 --- a/racket/lib/collects/compiler/sig.rkt +++ b/racket/lib/collects/compiler/sig.rkt @@ -1,5 +1,4 @@ - -#lang mzscheme +#lang racket/base (require racket/unit) diff --git a/racket/lib/collects/dynext/compile-sig.rkt b/racket/lib/collects/dynext/compile-sig.rkt index 4a82b1dc57..2d77778f45 100644 --- a/racket/lib/collects/dynext/compile-sig.rkt +++ b/racket/lib/collects/dynext/compile-sig.rkt @@ -1,19 +1,19 @@ -(module compile-sig mzscheme - (require racket/unit) +#lang racket/base +(require racket/unit) - (provide dynext:compile^) - - (define-signature dynext:compile^ - (compile-extension - preprocess-extension - current-extension-compiler - current-extension-compiler-flags - current-extension-preprocess-flags - current-make-compile-include-strings - current-make-compile-input-strings - current-make-compile-output-strings - use-standard-compiler - get-standard-compilers - compile-variant - expand-for-compile-variant))) +(provide dynext:compile^) + +(define-signature dynext:compile^ + (compile-extension + preprocess-extension + current-extension-compiler + current-extension-compiler-flags + current-extension-preprocess-flags + current-make-compile-include-strings + current-make-compile-input-strings + current-make-compile-output-strings + use-standard-compiler + get-standard-compilers + compile-variant + expand-for-compile-variant)) diff --git a/racket/lib/collects/dynext/compile-unit.rkt b/racket/lib/collects/dynext/compile-unit.rkt index 39b2e8a955..131b3ce220 100644 --- a/racket/lib/collects/dynext/compile-unit.rkt +++ b/racket/lib/collects/dynext/compile-unit.rkt @@ -1,4 +1,4 @@ -(module compile-unit mzscheme +(module compile-unit scheme/base (require racket/unit racket/system "private/dirs.rkt" diff --git a/racket/lib/collects/dynext/compile.rkt b/racket/lib/collects/dynext/compile.rkt index e788c31209..b424658a61 100644 --- a/racket/lib/collects/dynext/compile.rkt +++ b/racket/lib/collects/dynext/compile.rkt @@ -1,9 +1,9 @@ -(module compile mzscheme - (require racket/unit) +#lang racket/base +(require racket/unit) - (require "compile-sig.rkt" - "compile-unit.rkt") +(require "compile-sig.rkt" + "compile-unit.rkt") - (define-values/invoke-unit/infer dynext:compile@) +(define-values/invoke-unit/infer dynext:compile@) - (provide-signature-elements dynext:compile^)) +(provide-signature-elements dynext:compile^) diff --git a/racket/lib/collects/dynext/dynext-sig.rkt b/racket/lib/collects/dynext/dynext-sig.rkt index 4d21480f57..ee3eddade1 100644 --- a/racket/lib/collects/dynext/dynext-sig.rkt +++ b/racket/lib/collects/dynext/dynext-sig.rkt @@ -1,7 +1,7 @@ -(module dynext-sig mzscheme +(module dynext-sig racket/base (require "compile-sig.rkt" "link-sig.rkt" "file-sig.rkt") - (provide (all-from "compile-sig.rkt") - (all-from "link-sig.rkt") - (all-from "file-sig.rkt"))) + (provide (all-from-out "compile-sig.rkt") + (all-from-out "link-sig.rkt") + (all-from-out "file-sig.rkt"))) diff --git a/racket/lib/collects/dynext/dynext-unit.rkt b/racket/lib/collects/dynext/dynext-unit.rkt index cc3185e9fb..d2791a7fc5 100644 --- a/racket/lib/collects/dynext/dynext-unit.rkt +++ b/racket/lib/collects/dynext/dynext-unit.rkt @@ -1,7 +1,7 @@ -(module dynext-unit mzscheme +#lang racket/base - (require "compile-unit.rkt" "link-unit.rkt" "file-unit.rkt") +(require "compile-unit.rkt" "link-unit.rkt" "file-unit.rkt") - (provide (all-from "compile-unit.rkt") - (all-from "link-unit.rkt") - (all-from "file-unit.rkt"))) +(provide (all-from-out "compile-unit.rkt") + (all-from-out "link-unit.rkt") + (all-from-out "file-unit.rkt")) diff --git a/racket/lib/collects/dynext/dynext.rkt b/racket/lib/collects/dynext/dynext.rkt index a2650bf19f..25cde65819 100644 --- a/racket/lib/collects/dynext/dynext.rkt +++ b/racket/lib/collects/dynext/dynext.rkt @@ -1,7 +1,7 @@ -(module dynext mzscheme +#lang racket/base - (require "compile.rkt" "link.rkt" "file.rkt") +(require "compile.rkt" "link.rkt" "file.rkt") - (provide (all-from "compile.rkt") - (all-from "link.rkt") - (all-from "file.rkt"))) +(provide (all-from-out "compile.rkt") + (all-from-out "link.rkt") + (all-from-out "file.rkt")) diff --git a/racket/lib/collects/dynext/file-sig.rkt b/racket/lib/collects/dynext/file-sig.rkt index 27c53282d8..25945c21ca 100644 --- a/racket/lib/collects/dynext/file-sig.rkt +++ b/racket/lib/collects/dynext/file-sig.rkt @@ -1,18 +1,17 @@ +#lang racket/base +(require racket/unit) -(module file-sig mzscheme - (require racket/unit) +(provide dynext:file^) - (provide dynext:file^) - - (define-signature dynext:file^ - (append-zo-suffix - append-c-suffix - append-constant-pool-suffix - append-object-suffix - append-extension-suffix - - extract-base-filename/ss - extract-base-filename/c - extract-base-filename/kp - extract-base-filename/o - extract-base-filename/ext))) +(define-signature dynext:file^ + (append-zo-suffix + append-c-suffix + append-constant-pool-suffix + append-object-suffix + append-extension-suffix + + extract-base-filename/ss + extract-base-filename/c + extract-base-filename/kp + extract-base-filename/o + extract-base-filename/ext)) \ No newline at end of file diff --git a/racket/lib/collects/dynext/file.rkt b/racket/lib/collects/dynext/file.rkt index 80469f122d..ff5ce27f8a 100644 --- a/racket/lib/collects/dynext/file.rkt +++ b/racket/lib/collects/dynext/file.rkt @@ -1,9 +1,9 @@ -(module file mzscheme - (require racket/unit) +#lang racket/base +(require racket/unit) - (require "file-sig.rkt" - "file-unit.rkt") +(require "file-sig.rkt" + "file-unit.rkt") - (define-values/invoke-unit/infer dynext:file@) +(define-values/invoke-unit/infer dynext:file@) - (provide-signature-elements dynext:file^)) +(provide-signature-elements dynext:file^) diff --git a/racket/lib/collects/dynext/link-sig.rkt b/racket/lib/collects/dynext/link-sig.rkt index 3c659ae29d..2eebe0e390 100644 --- a/racket/lib/collects/dynext/link-sig.rkt +++ b/racket/lib/collects/dynext/link-sig.rkt @@ -1,16 +1,16 @@ -(module link-sig mzscheme - (require racket/unit) +#lang racket/base +(require racket/unit) - (provide dynext:link^) +(provide dynext:link^) - (define-signature dynext:link^ - (link-extension - current-extension-linker - current-extension-linker-flags - current-make-link-input-strings - current-make-link-output-strings - current-standard-link-libraries - current-use-mzdyn - use-standard-linker - link-variant - expand-for-link-variant))) +(define-signature dynext:link^ + (link-extension + current-extension-linker + current-extension-linker-flags + current-make-link-input-strings + current-make-link-output-strings + current-standard-link-libraries + current-use-mzdyn + use-standard-linker + link-variant + expand-for-link-variant)) diff --git a/racket/lib/collects/dynext/link-unit.rkt b/racket/lib/collects/dynext/link-unit.rkt index 2fad99f61d..85b47620f9 100644 --- a/racket/lib/collects/dynext/link-unit.rkt +++ b/racket/lib/collects/dynext/link-unit.rkt @@ -1,4 +1,4 @@ -(module link-unit mzscheme +(module link-unit scheme/base (require racket/unit racket/system "private/dirs.rkt" diff --git a/racket/lib/collects/dynext/link.rkt b/racket/lib/collects/dynext/link.rkt index f0cb941cb5..f478f018fd 100644 --- a/racket/lib/collects/dynext/link.rkt +++ b/racket/lib/collects/dynext/link.rkt @@ -1,9 +1,9 @@ -(module link mzscheme - (require racket/unit) +#lang racket/base +(require racket/unit) - (require "link-sig.rkt" - "link-unit.rkt") +(require "link-sig.rkt" + "link-unit.rkt") - (define-values/invoke-unit/infer dynext:link@) +(define-values/invoke-unit/infer dynext:link@) - (provide-signature-elements dynext:link^)) +(provide-signature-elements dynext:link^) diff --git a/racket/lib/collects/dynext/private/cmdargs.rkt b/racket/lib/collects/dynext/private/cmdargs.rkt index c162b7bb4a..2d506406b8 100644 --- a/racket/lib/collects/dynext/private/cmdargs.rkt +++ b/racket/lib/collects/dynext/private/cmdargs.rkt @@ -1,5 +1,4 @@ - -(module cmdargs mzscheme +(module cmdargs scheme/base (provide split-command-line-args) diff --git a/racket/lib/collects/dynext/private/dirs.rkt b/racket/lib/collects/dynext/private/dirs.rkt index 1bebd11207..b3d2f63ead 100644 --- a/racket/lib/collects/dynext/private/dirs.rkt +++ b/racket/lib/collects/dynext/private/dirs.rkt @@ -1,8 +1,7 @@ +#lang racket/base +(require setup/dirs) -(module dirs mzscheme - (require setup/dirs) +(define include-dir find-include-dir) +(define std-library-dir find-lib-dir) - (define include-dir find-include-dir) - (define std-library-dir find-lib-dir) - - (provide include-dir std-library-dir)) +(provide include-dir std-library-dir) diff --git a/racket/lib/collects/ffi/examples/use-magick.rkt b/racket/lib/collects/ffi/examples/use-magick.rkt index dd1e6c9fd0..104f30d4a3 100755 --- a/racket/lib/collects/ffi/examples/use-magick.rkt +++ b/racket/lib/collects/ffi/examples/use-magick.rkt @@ -251,7 +251,7 @@ ;; (MagickAnimateImages morph) ;; (let ([x (test (MagickWriteImageBlob w))]) -;; (with-output-to-file "~/tmp/x" (lambda () (display x)) 'truncate) +;; (with-output-to-file "~/tmp/x" (lambda () (display x)) #:exists 'truncate) ;; (let ([ww (NewMagickWand)]) ;; (test (MagickReadImageBlob ww x)) ;; (MagickDisplayImage ww))) diff --git a/racket/lib/collects/file/gzip.rkt b/racket/lib/collects/file/gzip.rkt index 757c426d77..b65969c532 100644 --- a/racket/lib/collects/file/gzip.rkt +++ b/racket/lib/collects/file/gzip.rkt @@ -12,11 +12,11 @@ ;; LGPL-compatible license. I (Eli Barzilay) have tried to contact the ;; author, but no reply yet. -(module deflate mzscheme +(module deflate racket/base (provide deflate gzip-through-ports gzip) - (require mzlib/unit200) + (require mzlib/unit200 (for-syntax racket/base)) (define (vector-ref* v i) (let ([r (vector-ref v i)]) @@ -880,7 +880,7 @@ ;; */ ;; /* Data structure describing a single value and its code string. */ -(define-struct ct_data (freq code dad len)) +(define-struct ct_data (freq code dad len) #:mutable) ;; union { ;; ush freq; ;; /* frequency count */ ;; ush code; ;; /* bit string */ @@ -930,7 +930,8 @@ extra_base; ;; /* base index for extra_bits */ elems; ;; /* max number of elements in the tree */ max_length; ;; /* max bit length for the codes */ - max_code)); ;; /* largest code with non zero frequency */ + max_code); ;; /* largest code with non zero frequency */ + #:mutable) (define l_desc (make-tree_desc dyn_ltree static_ltree extra_lbits @@ -2213,7 +2214,7 @@ (dynamic-wind void (lambda () - (let ([o (open-output-file outfile 'truncate/replace)]) + (let ([o (open-output-file outfile #:exists 'truncate/replace)]) (dynamic-wind void (lambda () diff --git a/racket/lib/collects/file/zip.rkt b/racket/lib/collects/file/zip.rkt index 9d6e53a046..5f353ffb09 100644 --- a/racket/lib/collects/file/zip.rkt +++ b/racket/lib/collects/file/zip.rkt @@ -1,8 +1,7 @@ ;; A modification of Dave Herman's zip module -(module zip mzscheme - (require file/gzip racket/file - (only racket/base define)) +(module zip racket/base + (require file/gzip racket/file) ;; =========================================================================== ;; DATA DEFINITIONS diff --git a/racket/lib/collects/mzlib/private/sigutil.rkt b/racket/lib/collects/mzlib/private/sigutil.rkt index 7615bab957..ccd2dcc574 100644 --- a/racket/lib/collects/mzlib/private/sigutil.rkt +++ b/racket/lib/collects/mzlib/private/sigutil.rkt @@ -1,4 +1,3 @@ - (module sigutil mzscheme ;; Used by unitsig.rkt ;; (needs an overhaul, too) diff --git a/racket/lib/collects/mzscheme/main.rkt b/racket/lib/collects/mzscheme/main.rkt index fc8a61111d..05311db5e4 100644 --- a/racket/lib/collects/mzscheme/main.rkt +++ b/racket/lib/collects/mzscheme/main.rkt @@ -1,3 +1,111 @@ +;;---------------------------------------------------------------------- +;; mzscheme: provide everything -(module main scheme/mzscheme - (provide (all-from scheme/mzscheme))) +(module mzscheme '#%kernel + (#%require racket/private/more-scheme + (all-except racket/private/misc + collection-path + collection-file-path) + racket/private/letstx-scheme + racket/private/stxcase-scheme + racket/private/stx + racket/private/qqstx + racket/private/define + mzscheme/private/stxmz-body + mzscheme/private/old-ds + mzscheme/private/old-rp + mzscheme/private/old-if + mzscheme/private/old-procs + racket/private/map ; shadows #%kernel bindings + racket/private/kernstruct + racket/private/promise + racket/private/cert + (only racket/private/cond old-cond) + ;; shadows #%kernel bindings: + (only racket/private/list + assq assv assoc reverse) + racket/private/member + racket/tcp + racket/udp + '#%builtin) ; so it's attached + + (#%provide require require-for-syntax require-for-template require-for-label + provide provide-for-syntax provide-for-label + (all-from-except racket/private/more-scheme case old-case + log-fatal log-error log-warning log-info log-debug + hash-update hash-update!) + (rename old-case case) + (all-from racket/private/misc) + collection-path + collection-file-path + (all-from-except racket/private/stxcase-scheme _ datum datum-case with-datum) + (all-from-except racket/private/letstx-scheme + -define -define-syntax -define-struct + cond old-cond else =>) + (rename old-cond cond) + define-struct let-struct + identifier? ;; from racket/private/stx + (all-from racket/private/cert) + (all-from-except racket/private/qqstx quasidatum undatum undatum-splicing) + (all-from racket/private/define) + (all-from racket/private/kernstruct) + force delay promise? + (all-from-except '#%kernel #%module-begin #%datum + if make-empty-namespace + syntax->datum datum->syntax + free-identifier=? + free-transformer-identifier=? + free-template-identifier=? + free-label-identifier=? + vector-copy! + thread-send + thread-receive + thread-try-receive + thread-receive-evt + make-hash make-immutable-hash make-weak-hash + make-hasheq make-immutable-hasheq make-weak-hasheq + hash? hash-eq? hash-weak? + hash-ref hash-set! hash-set + hash-remove! hash-remove + hash-copy hash-count + hash-map hash-for-each + hash-iterate-first hash-iterate-next + hash-iterate-value hash-iterate-key + log-message log-level? make-logger logger? current-logger logger-name + make-log-receiver log-receiver? + prop:incomplete-arity) + (rename syntax->datum syntax-object->datum) + (rename datum->syntax datum->syntax-object) + (rename free-identifier=? module-identifier=?) + (rename free-transformer-identifier=? module-transformer-identifier=?) + (rename free-template-identifier=? module-template-identifier=?) + (rename free-label-identifier=? module-label-identifier=?) + (rename free-identifier=?* free-identifier=?) + make-hash-table hash-table? make-immutable-hash-table + (rename hash-ref hash-table-get) + (rename hash-set! hash-table-put!) + (rename hash-remove! hash-table-remove!) + (rename hash-count hash-table-count) + (rename hash-copy hash-table-copy) + (rename hash-map hash-table-map) + (rename hash-for-each hash-table-for-each) + (rename hash-iterate-first hash-table-iterate-first) + (rename hash-iterate-next hash-table-iterate-next) + (rename hash-iterate-value hash-table-iterate-value) + (rename hash-iterate-key hash-table-iterate-key) + namespace-transformer-require + transcript-on transcript-off + (rename cleanse-path expand-path) + (rename if* if) + (rename list list-immutable) + make-namespace + #%top-interaction + map for-each andmap ormap + assq assv assoc reverse memq memv member + (rename old-datum #%datum) + (rename mzscheme-in-stx-module-begin #%module-begin) + (rename #%module-begin #%plain-module-begin) + (rename lambda #%plain-lambda) + (rename #%app #%plain-app) + (all-from racket/tcp) + (all-from racket/udp))) diff --git a/racket/lib/collects/racket/private/old-ds.rkt b/racket/lib/collects/mzscheme/private/old-ds.rkt similarity index 91% rename from racket/lib/collects/racket/private/old-ds.rkt rename to racket/lib/collects/mzscheme/private/old-ds.rkt index e0b35a753b..3b7c9ff128 100644 --- a/racket/lib/collects/racket/private/old-ds.rkt +++ b/racket/lib/collects/mzscheme/private/old-ds.rkt @@ -1,8 +1,8 @@ (module old-ds '#%kernel - (#%require "define-struct.rkt" + (#%require racket/private/define-struct (for-syntax '#%kernel - "stxcase-scheme.rkt")) + racket/private/stxcase-scheme)) (#%provide define-struct let-struct old-datum) diff --git a/racket/lib/collects/racket/private/old-if.rkt b/racket/lib/collects/mzscheme/private/old-if.rkt similarity index 100% rename from racket/lib/collects/racket/private/old-if.rkt rename to racket/lib/collects/mzscheme/private/old-if.rkt diff --git a/racket/lib/collects/racket/private/old-procs.rkt b/racket/lib/collects/mzscheme/private/old-procs.rkt similarity index 70% rename from racket/lib/collects/racket/private/old-procs.rkt rename to racket/lib/collects/mzscheme/private/old-procs.rkt index 3e5bec899c..c9dcb62e99 100644 --- a/racket/lib/collects/racket/private/old-procs.rkt +++ b/racket/lib/collects/mzscheme/private/old-procs.rkt @@ -1,20 +1,46 @@ (module old-procs '#%kernel - (#%require "small-scheme.rkt" - "more-scheme.rkt" - "define.rkt" - "member.rkt") + (#%require racket/private/small-scheme + racket/private/more-scheme + racket/private/define + racket/private/member + (only racket/private/misc collection-path collection-file-path)) (#%provide make-namespace free-identifier=?* namespace-transformer-require transcript-on transcript-off + (rename new:collection-path collection-path) + (rename new:collection-file-path collection-file-path) make-hash-table make-immutable-hash-table hash-table?) (define reflect-var #f) + + (define new:collection-path + (let ([collection-path (lambda (collection . collections) + (apply collection-path + (lambda (s) + (raise + (exn:fail:filesystem + (string-append "collection-path: " s) + (current-continuation-marks)))) + collection collections))]) + collection-path)) + + (define new:collection-file-path + (let ([collection-file-path (lambda (file-name collection . collections) + (apply collection-file-path + (lambda (s) + (raise + (exn:fail:filesystem + (string-append "collection-file-path: " s) + (current-continuation-marks)))) + file-name collection collections))]) + collection-file-path)) + (define make-namespace (case-lambda diff --git a/racket/lib/collects/racket/private/old-rp.rkt b/racket/lib/collects/mzscheme/private/old-rp.rkt similarity index 94% rename from racket/lib/collects/racket/private/old-rp.rkt rename to racket/lib/collects/mzscheme/private/old-rp.rkt index 14b78db0c5..b922da931a 100644 --- a/racket/lib/collects/racket/private/old-rp.rkt +++ b/racket/lib/collects/mzscheme/private/old-rp.rkt @@ -1,6 +1,7 @@ (module old-rp '#%kernel - (#%require (for-syntax '#%kernel "stx.rkt" "small-scheme.rkt" "stxcase-scheme.rkt")) + (#%require (for-syntax '#%kernel racket/private/stx racket/private/small-scheme + racket/private/stxcase-scheme)) (#%provide require require-for-syntax require-for-template require-for-label provide provide-for-syntax provide-for-label) diff --git a/racket/lib/collects/racket/private/stxmz-body.rkt b/racket/lib/collects/mzscheme/private/stxmz-body.rkt similarity index 79% rename from racket/lib/collects/racket/private/stxmz-body.rkt rename to racket/lib/collects/mzscheme/private/stxmz-body.rkt index 39ccc18992..c6de635053 100644 --- a/racket/lib/collects/racket/private/stxmz-body.rkt +++ b/racket/lib/collects/mzscheme/private/stxmz-body.rkt @@ -2,8 +2,9 @@ ;; mzscheme's `#%module-begin' (module stxmz-body '#%kernel - (#%require "define.rkt" - (for-syntax '#%kernel "stx.rkt")) + ;; These could probably change to just be `(require racket/base)`. + (#%require racket/private/define + (for-syntax '#%kernel racket/private/stx)) ;; So that expansions print the way the Racket programmer expects: (#%require (rename '#%kernel #%plain-module-begin #%module-begin)) @@ -16,7 +17,7 @@ (list* (quote-syntax #%plain-module-begin) (datum->syntax stx - (list (quote-syntax #%require) '(for-syntax scheme/mzscheme))) + (list (quote-syntax #%require) '(for-syntax mzscheme))) (stx-cdr stx)) stx) (raise-syntax-error #f "bad syntax" stx)))) diff --git a/racket/lib/collects/openssl/openssl.rkt b/racket/lib/collects/openssl/openssl.rkt index 0fb1348221..3c3d59e23c 100644 --- a/racket/lib/collects/openssl/openssl.rkt +++ b/racket/lib/collects/openssl/openssl.rkt @@ -1,4 +1,3 @@ -(module openssl mzscheme - (require "mzssl.rkt") - - (provide ssl-connect)) +#lang racket/base +(require "mzssl.rkt") +(provide ssl-connect) diff --git a/racket/lib/collects/racket/private/increader.rkt b/racket/lib/collects/racket/private/increader.rkt index 26db1a0570..afc685faa5 100644 --- a/racket/lib/collects/racket/private/increader.rkt +++ b/racket/lib/collects/racket/private/increader.rkt @@ -1,5 +1,5 @@ -(module increader mzscheme +(module increader racket/base (define-struct reader (val)) (provide reader? make-reader reader-val)) diff --git a/racket/lib/collects/racket/trait.rkt b/racket/lib/collects/racket/trait.rkt index 875fe94b50..c21601edee 100644 --- a/racket/lib/collects/racket/trait.rkt +++ b/racket/lib/collects/racket/trait.rkt @@ -1,18 +1,16 @@ -(module trait mzscheme +(module trait racket/base (require racket/class - racket/list - (only racket/base sort filter struct-copy)) - (require-for-syntax racket/list - (only racket/base filter) + racket/list) + (require (for-syntax racket/list racket/base syntax/stx syntax/boundmap syntax/kerncase ;; This should be part of a public expand-time API ;; exported by the class system: - (only "private/classidmap.rkt" - generate-class-expand-context)) + (only-in "private/classidmap.rkt" + generate-class-expand-context))) - (provide (rename :trait trait) + (provide (rename-out [:trait trait]) trait? trait->mixin trait-sum @@ -172,7 +170,7 @@ "bad syntax" e))] [(id . rest) - (ormap (lambda (x) (module-identifier=? x #'id)) + (ormap (lambda (x) (free-identifier=? x #'id)) (syntax->list #'(public public-final pubment override override-final augment augment-final augride overment @@ -216,13 +214,13 @@ [(null? l) (apply values results)] [else (let ([kw (stx-car (car l))]) - (if (or (module-identifier=? kw #'define-values) - (module-identifier=? kw #'field)) + (if (or (free-identifier=? kw #'define-values) + (free-identifier=? kw #'field)) (loop (cdr l) results) (loop (cdr l) (let iloop ([mapping keyword-mapping] [results results]) - (if (ormap (lambda (x) (module-identifier=? kw x)) + (if (ormap (lambda (x) (free-identifier=? kw x)) (car mapping)) (cons (append (stx->list (stx-cdr (car l))) (car results)) @@ -518,23 +516,23 @@ (define (validate-trait who t) ;; Methods: - (let ([ht (make-hash-table)]) + (let ([ht (make-hasheq)]) ;; Build up table and check for duplicates: (for-each (lambda (m) (let* ([name (method-name m)] [key (member-name-key-hash-code name)]) - (let ([l (hash-table-get ht key null)]) + (let ([l (hash-ref ht key null)]) (when (ormap (lambda (n) (member-name-key=? (car n) name)) l) (raise-mismatch-error who "result would include multiple declarations of a method: " name)) - (hash-table-put! ht key (cons (cons name m) l))))) + (hash-set! ht key (cons (cons name m) l))))) (trait-methods t)) ;; Check consistency of expectations and provisions: (let* ([find (lambda (name) - (let ([l (hash-table-get ht (member-name-key-hash-code name) null)]) + (let ([l (hash-ref ht (member-name-key-hash-code name) null)]) (ormap (lambda (n) (and (member-name-key=? (car n) name) (cdr n))) @@ -567,19 +565,19 @@ (method-need-inner m))) (trait-methods t)))) ;; Fields: - (let ([ht (make-hash-table)]) + (let ([ht (make-hasheq)]) ;; Build up table and check for duplicates: (for-each (lambda (f) (let* ([name (feeld-name f)] [key (member-name-key-hash-code name)]) - (let ([l (hash-table-get ht key null)]) + (let ([l (hash-ref ht key null)]) (when (ormap (lambda (n) (member-name-key=? (car n) name)) l) (raise-mismatch-error who "result would include multiple declarations of a field: " name)) - (hash-table-put! ht key (cons (cons name f) l))))) + (hash-set! ht key (cons (cons name f) l))))) (trait-fields t))) ;; Return validated trait: t) diff --git a/racket/lib/collects/scheme/mzscheme.rkt b/racket/lib/collects/scheme/mzscheme.rkt deleted file mode 100644 index 54a5dec9fe..0000000000 --- a/racket/lib/collects/scheme/mzscheme.rkt +++ /dev/null @@ -1,132 +0,0 @@ -;;---------------------------------------------------------------------- -;; mzscheme: provide everything - -(module mzscheme '#%kernel - (#%require racket/private/more-scheme - racket/private/misc - racket/private/letstx-scheme - racket/private/stxcase-scheme - racket/private/stx - racket/private/stxmz-body - racket/private/qqstx - racket/private/define - racket/private/old-ds - racket/private/old-rp - racket/private/old-if - racket/private/old-procs - racket/private/map ; shadows #%kernel bindings - racket/private/kernstruct - racket/private/promise - racket/private/cert - (only racket/private/cond old-cond) - ;; shadows #%kernel bindings: - (only racket/private/list - assq assv assoc reverse) - racket/private/member - racket/tcp - racket/udp - '#%builtin) ; so it's attached - - (define new:collection-path - (let ([collection-path (lambda (collection . collections) - (apply collection-path - (lambda (s) - (raise - (exn:fail:filesystem - (string-append "collection-path: " s) - (current-continuation-marks)))) - collection collections))]) - collection-path)) - - (define new:collection-file-path - (let ([collection-file-path (lambda (file-name collection . collections) - (apply collection-file-path - (lambda (s) - (raise - (exn:fail:filesystem - (string-append "collection-file-path: " s) - (current-continuation-marks)))) - file-name collection collections))]) - collection-file-path)) - - - (#%provide require require-for-syntax require-for-template require-for-label - provide provide-for-syntax provide-for-label - (all-from-except racket/private/more-scheme case old-case - log-fatal log-error log-warning log-info log-debug - hash-update hash-update!) - (rename old-case case) - (all-from-except racket/private/misc collection-path collection-file-path) - (rename new:collection-path collection-path) - (rename new:collection-file-path collection-file-path) - (all-from-except racket/private/stxcase-scheme _ datum datum-case with-datum) - (all-from-except racket/private/letstx-scheme - -define -define-syntax -define-struct - cond old-cond else =>) - (rename old-cond cond) - define-struct let-struct - identifier? ;; from racket/private/stx - (all-from racket/private/cert) - (all-from-except racket/private/qqstx quasidatum undatum undatum-splicing) - (all-from racket/private/define) - (all-from racket/private/kernstruct) - force delay promise? - (all-from-except '#%kernel #%module-begin #%datum - if make-empty-namespace - syntax->datum datum->syntax - free-identifier=? - free-transformer-identifier=? - free-template-identifier=? - free-label-identifier=? - vector-copy! - thread-send - thread-receive - thread-try-receive - thread-receive-evt - make-hash make-immutable-hash make-weak-hash - make-hasheq make-immutable-hasheq make-weak-hasheq - hash? hash-eq? hash-weak? - hash-ref hash-set! hash-set - hash-remove! hash-remove - hash-copy hash-count - hash-map hash-for-each - hash-iterate-first hash-iterate-next - hash-iterate-value hash-iterate-key - log-message log-level? make-logger logger? current-logger logger-name - make-log-receiver log-receiver? - prop:incomplete-arity) - (rename syntax->datum syntax-object->datum) - (rename datum->syntax datum->syntax-object) - (rename free-identifier=? module-identifier=?) - (rename free-transformer-identifier=? module-transformer-identifier=?) - (rename free-template-identifier=? module-template-identifier=?) - (rename free-label-identifier=? module-label-identifier=?) - (rename free-identifier=?* free-identifier=?) - make-hash-table hash-table? make-immutable-hash-table - (rename hash-ref hash-table-get) - (rename hash-set! hash-table-put!) - (rename hash-remove! hash-table-remove!) - (rename hash-count hash-table-count) - (rename hash-copy hash-table-copy) - (rename hash-map hash-table-map) - (rename hash-for-each hash-table-for-each) - (rename hash-iterate-first hash-table-iterate-first) - (rename hash-iterate-next hash-table-iterate-next) - (rename hash-iterate-value hash-table-iterate-value) - (rename hash-iterate-key hash-table-iterate-key) - namespace-transformer-require - transcript-on transcript-off - (rename cleanse-path expand-path) - (rename if* if) - (rename list list-immutable) - make-namespace - #%top-interaction - map for-each andmap ormap - assq assv assoc reverse memq memv member - (rename old-datum #%datum) - (rename mzscheme-in-stx-module-begin #%module-begin) - (rename #%module-begin #%plain-module-begin) - (rename lambda #%plain-lambda) - (rename #%app #%plain-app) - (all-from racket/tcp) - (all-from racket/udp))) diff --git a/racket/lib/collects/setup/main-doc.rkt b/racket/lib/collects/setup/main-doc.rkt index ba4c4c7fef..6771a16683 100644 --- a/racket/lib/collects/setup/main-doc.rkt +++ b/racket/lib/collects/setup/main-doc.rkt @@ -1,4 +1,4 @@ -#lang mzscheme +#lang s-exp scheme/base (require "dirs.rkt" "path-relativize.rkt") (provide path->main-doc-relative diff --git a/racket/lib/collects/setup/option-sig.rkt b/racket/lib/collects/setup/option-sig.rkt index d9f5b43bf5..2900009479 100644 --- a/racket/lib/collects/setup/option-sig.rkt +++ b/racket/lib/collects/setup/option-sig.rkt @@ -1,5 +1,4 @@ - -(module option-sig mzscheme +(module option-sig scheme/base (require racket/unit) (provide setup-option^) diff --git a/racket/lib/collects/setup/setup-go.rkt b/racket/lib/collects/setup/setup-go.rkt index eeb68160f5..5b75237c74 100644 --- a/racket/lib/collects/setup/setup-go.rkt +++ b/racket/lib/collects/setup/setup-go.rkt @@ -1,4 +1,4 @@ -(module setup-go mzscheme +(module setup-go scheme/base (require "setup-cmdline.rkt" racket/unit diff --git a/racket/lib/collects/setup/unpack.rkt b/racket/lib/collects/setup/unpack.rkt index acc36b2657..707aa3cfc4 100644 --- a/racket/lib/collects/setup/unpack.rkt +++ b/racket/lib/collects/setup/unpack.rkt @@ -7,8 +7,7 @@ racket/bool net/base64 setup/getinfo - "dirs.rkt" - (only-in mzscheme make-namespace)) + "dirs.rkt") (provide unpack fold-plt-archive) @@ -276,7 +275,7 @@ (eq? #\L (read-char p)) (eq? #\T (read-char p))) (error "not an unpackable distribution archive")) - (let* ([n (make-namespace)] + (let* ([n (make-base-namespace)] [info (let ([orig (current-namespace)]) (parameterize ([current-namespace n]) (namespace-require '(lib "mzlib/unit200.ss")) diff --git a/racket/lib/collects/srfi/13/string.rkt b/racket/lib/collects/srfi/13/string.rkt index c970ed2b5c..f79511b82c 100644 --- a/racket/lib/collects/srfi/13/string.rkt +++ b/racket/lib/collects/srfi/13/string.rkt @@ -85,10 +85,9 @@ ;;; Are you still here? Cool, keep reading it gets better: -#lang mzscheme +#lang s-exp racket/base (require srfi/optional - (only racket/base lambda) srfi/8/receive srfi/14/char-set) (provide @@ -174,7 +173,7 @@ ;; Returns three values: rest start end (define (string-parse-start+end proc s args) - (if (not (string? s)) (error proc "Non-string value ~a" s)) + (when (not (string? s)) (error proc "Non-string value ~a" s)) (let ((slen (string-length s))) (if (pair? args) @@ -433,7 +432,7 @@ (let ((j (- j i))) (%string-copy! ans j chunk 0 i) ; Install CHUNK[0,I). (let lp ((j j) (chunks chunks)) ; Install CHUNKS. - (if (pair? chunks) + (when (pair? chunks) (let* ((chunk (car chunks)) (chunks (cdr chunks)) (chunk-len (string-length chunk)) @@ -1393,21 +1392,21 @@ pattern args)))) (let* ((rvlen (- end start)) (rv (make-vector rvlen -1))) - (if (> rvlen 0) + (when (> rvlen 0) (let ((rvlen-1 (- rvlen 1)) (c0 (string-ref pattern start))) ;; Here's the main loop. We have set rv[0] ... rv[i]. ;; K = I + START -- it is the corresponding index into PATTERN. (let lp1 ((i 0) (j -1) (k start)) - (if (< i rvlen-1) + (when (< i rvlen-1) ;; lp2 invariant: ;; pat[(k-j) .. k-1] matches pat[start .. start+j-1] ;; or j = -1. (let lp2 ((j j)) (cond ((= j -1) (let ((i1 (+ 1 i))) - (if (not (c= (string-ref pattern (+ k 1)) c0)) + (when (not (c= (string-ref pattern (+ k 1)) c0)) (vector-set! rv i1 0)) (lp1 i1 0 (+ k 1)))) ;; pat[(k-j) .. k] matches pat[start..start+j]. @@ -1569,7 +1568,7 @@ (else (let ((ans (make-string nchars))) (let lp ((strings first) (i 0)) - (if (pair? strings) + (when (pair? strings) (let* ((s (car strings)) (slen (string-length s))) (%string-copy! ans i s 0 slen) @@ -1588,7 +1587,7 @@ ((not (pair? strings)) i))) (ans (make-string total))) (let lp ((i 0) (strings strings)) - (if (pair? strings) + (when (pair? strings) (let* ((s (car strings)) (slen (string-length s))) (%string-copy! ans i s 0 slen) @@ -1649,7 +1648,7 @@ (let ((ans (make-string (+ end len)))) (%string-copy! ans len final 0 end) (let lp ((i len) (lis string-list)) - (if (pair? lis) + (when (pair? lis) (let* ((s (car lis)) (lis (cdr lis)) (slen (string-length s)) diff --git a/racket/lib/collects/srfi/14/char-set.rkt b/racket/lib/collects/srfi/14/char-set.rkt index 2a889d9d04..e3df219a72 100644 --- a/racket/lib/collects/srfi/14/char-set.rkt +++ b/racket/lib/collects/srfi/14/char-set.rkt @@ -3,13 +3,13 @@ ;; Since Mike Sperber looked carefully at this module, ;; the code and tests are a lot better than they would be. -(module char-set mzscheme +(module char-set racket/base (require data/integer-set racket/contract) ;; Data defn ---------------------------------------- - (define-struct char-set (set/thunk)) + (define-struct char-set (set/thunk) #:mutable) (define (fold-set op init l) (if (null? l) diff --git a/racket/lib/collects/srfi/29/localization.rkt b/racket/lib/collects/srfi/29/localization.rkt index 363261ecf0..49dcb86886 100644 --- a/racket/lib/collects/srfi/29/localization.rkt +++ b/racket/lib/collects/srfi/29/localization.rkt @@ -1,10 +1,11 @@ -(module localization mzscheme +(module localization racket/base (require racket/contract/base racket/file - (only racket/runtime-path define-runtime-path) + (only-in racket/runtime-path define-runtime-path) racket/string racket/format - syntax/modread) + syntax/modread + (for-syntax racket/base)) (provide/contract (current-language (parameter/c symbol?)) (current-country (parameter/c symbol?)) @@ -41,7 +42,7 @@ ;; The association list in which bundles will be stored (define *localization-bundles* - (make-hash-table 'equal)) + (make-hash)) (define current-language (make-parameter (get-from-locale 'language))) @@ -58,11 +59,11 @@ (~v bundle-specifier)))) (define (declare-bundle! bundle-specifier bundle-assoc-list) - (hash-table-put! *localization-bundles* bundle-specifier bundle-assoc-list)) + (hash-set! *localization-bundles* bundle-specifier bundle-assoc-list)) (define (store-bundle! bundle-specifier) (put-preferences (list (make-name bundle-specifier)) - (list (hash-table-get *localization-bundles* bundle-specifier))) + (list (hash-ref *localization-bundles* bundle-specifier))) #t) (define (load-bundle-from-preference! bundle-specifier) @@ -123,7 +124,7 @@ (current-language) (current-country)))) (and (not (null? specifier)) - (let ((bundle (hash-table-get *localization-bundles* specifier #f))) + (let ((bundle (hash-ref *localization-bundles* specifier #f))) (cond ((and bundle (assq template-name bundle)) => cdr) ((null? (cdr specifier)) #f) (else (loop (rdc specifier)))))))) diff --git a/racket/lib/collects/syntax/boundmap.rkt b/racket/lib/collects/syntax/boundmap.rkt index 75a04ace16..bf870a22ba 100644 --- a/racket/lib/collects/syntax/boundmap.rkt +++ b/racket/lib/collects/syntax/boundmap.rkt @@ -1,5 +1,6 @@ -(module boundmap mzscheme +(module boundmap racket/base (require racket/contract/base + (for-syntax racket/base) "private/boundmap.rkt") (define-syntax provide/contract* diff --git a/racket/lib/collects/syntax/moddep.rkt b/racket/lib/collects/syntax/moddep.rkt index 8bced1144b..94c2b17609 100644 --- a/racket/lib/collects/syntax/moddep.rkt +++ b/racket/lib/collects/syntax/moddep.rkt @@ -1,13 +1,13 @@ -(module moddep mzscheme +(module moddep scheme/base (require "modread.rkt" "modcode.rkt" "modcollapse.rkt" "modresolve.rkt") - (provide (all-from "modread.rkt") - (all-from "modcode.rkt") - (all-from "modcollapse.rkt") - (all-from "modresolve.rkt") + (provide (all-from-out "modread.rkt") + (all-from-out "modcode.rkt") + (all-from-out "modcollapse.rkt") + (all-from-out "modresolve.rkt") show-import-tree) (define (show-import-tree module-path) diff --git a/racket/lib/collects/syntax/modread.rkt b/racket/lib/collects/syntax/modread.rkt index 0a90c23c25..51936f9a6c 100644 --- a/racket/lib/collects/syntax/modread.rkt +++ b/racket/lib/collects/syntax/modread.rkt @@ -1,4 +1,4 @@ -(module modread mzscheme +(module modread racket/base (require racket/contract/base) (provide with-module-reading-parameterization) @@ -53,7 +53,7 @@ (unless (eq? (syntax-e #'nm) expected-module) (raise-wrong-module-name filename expected-module (syntax-e #'nm)))) - (datum->syntax-object exp + (datum->syntax exp (cons (namespace-module-identifier) (cdr (syntax-e exp))) exp diff --git a/racket/lib/collects/syntax/primitives.rkt b/racket/lib/collects/syntax/primitives.rkt index 122ca7f053..a09a77c6f2 100644 --- a/racket/lib/collects/syntax/primitives.rkt +++ b/racket/lib/collects/syntax/primitives.rkt @@ -1,5 +1,5 @@ -(module primitives mzscheme +(module primitives racket/base ;; The following primitives either invoke functions, or ;; install functions that can be used later. diff --git a/racket/lib/collects/syntax/private/doctable.rkt b/racket/lib/collects/syntax/private/doctable.rkt index ed498a805b..47ddd383c5 100644 --- a/racket/lib/collects/syntax/private/doctable.rkt +++ b/racket/lib/collects/syntax/private/doctable.rkt @@ -1,6 +1,5 @@ - -(module doctable mzscheme - (define ht (make-hash-table)) +(module doctable racket/base + (define ht (make-hasheq)) (define (register-documentation src-stx label v) (let ([mod (let ([s (syntax-source-module src-stx)]) @@ -8,18 +7,18 @@ (if (module-path-index? s) (module-path-index-resolve s) s)))]) - (let ([mht (hash-table-get ht mod + (let ([mht (hash-ref ht mod (lambda () - (let ([mht (make-hash-table)]) - (hash-table-put! ht mod mht) + (let ([mht (make-hasheq)]) + (hash-set! ht mod mht) mht)))]) - (hash-table-put! mht label v)))) + (hash-set! mht label v)))) (define (lookup-documentation mod label) (let ([mod (resolved-module-path-name mod)]) - (let ([mht (hash-table-get ht mod (lambda () #f))]) + (let ([mht (hash-ref ht mod (lambda () #f))]) (and mht - (hash-table-get mht label (lambda () #f)))))) + (hash-ref mht label (lambda () #f)))))) (provide register-documentation lookup-documentation)) diff --git a/racket/lib/collects/syntax/to-string.rkt b/racket/lib/collects/syntax/to-string.rkt index 492af26747..855452084f 100644 --- a/racket/lib/collects/syntax/to-string.rkt +++ b/racket/lib/collects/syntax/to-string.rkt @@ -1,4 +1,4 @@ -(module to-string mzscheme +(module to-string racket/base (require racket/contract/base syntax/stx) diff --git a/racket/lib/collects/syntax/trusted-xforms.rkt b/racket/lib/collects/syntax/trusted-xforms.rkt index 40af01ac14..d3b979dd2f 100644 --- a/racket/lib/collects/syntax/trusted-xforms.rkt +++ b/racket/lib/collects/syntax/trusted-xforms.rkt @@ -1,2 +1,2 @@ -(module trusted-xforms mzscheme +(module trusted-xforms racket/base (require racket/class)) diff --git a/racket/src/mac/osx_appl.rkt b/racket/src/mac/osx_appl.rkt index 971f780696..49e8555973 100644 --- a/racket/src/mac/osx_appl.rkt +++ b/racket/src/mac/osx_appl.rkt @@ -8,7 +8,7 @@ |# -(module osx_appl mzscheme +(module osx_appl racket/base (require (lib "plist.rkt" "xml") racket/system diff --git a/racket/src/racket/gc2/setup.rkt b/racket/src/racket/gc2/setup.rkt index 51e0f1b01f..2839820c74 100644 --- a/racket/src/racket/gc2/setup.rkt +++ b/racket/src/racket/gc2/setup.rkt @@ -84,7 +84,6 @@ ;; Readers: (map (lambda (r) (go r #f #f)) '(s-exp/lang/reader - mzscheme/lang/reader scheme/base/lang/reader scheme/private/provider/lang/reader racket/base/lang/reader diff --git a/racket/src/racket/gc2/xform-mod.rkt b/racket/src/racket/gc2/xform-mod.rkt index 4bdc71dae2..310451f383 100644 --- a/racket/src/racket/gc2/xform-mod.rkt +++ b/racket/src/racket/gc2/xform-mod.rkt @@ -1,6 +1,5 @@ -(module xform-mod mzscheme - (require (lib "xform.rkt" "compiler" "private") - racket/cmdline) +(module xform-mod racket/base + (require compiler/private/xform racket/cmdline) (define precompiling-header? (getenv "XFORM_PRECOMP")) (define precompiled-header (getenv "XFORM_USE_PRECOMP")) diff --git a/racket/src/racket/src/schvers.h b/racket/src/racket/src/schvers.h index 7b65efcd0a..e20a435bb7 100644 --- a/racket/src/racket/src/schvers.h +++ b/racket/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.3.900.2" +#define MZSCHEME_VERSION "5.3.900.3" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 3 #define MZSCHEME_VERSION_Z 900 -#define MZSCHEME_VERSION_W 2 +#define MZSCHEME_VERSION_W 3 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W)