fix mac sdk support; change initial namespace to not have 'module'; set up mzc --c-mods (still need docs)
svn: r8997
This commit is contained in:
parent
6bade7160f
commit
b64d03d932
|
@ -433,7 +433,7 @@
|
|||
(if (path? module-path)
|
||||
(path->complete-path module-path)
|
||||
module-path)])
|
||||
(syntax-case (expand `(module m mzscheme
|
||||
(syntax-case (expand `(,#'module m mzscheme
|
||||
(require (only ,module-path)
|
||||
mzlib/runtime-path)
|
||||
(runtime-paths ,module-path))) (quote)
|
||||
|
@ -493,6 +493,15 @@
|
|||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define (compile-using-kernel e)
|
||||
(let ([ns (make-empty-namespace)])
|
||||
(namespace-attach-module (current-namespace) ''#%kernel ns)
|
||||
(parameterize ([current-namespace ns])
|
||||
(namespace-require ''#%kernel)
|
||||
(compile e))))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define (lib-path->string path)
|
||||
(cond
|
||||
[(null? (cddr path))
|
||||
|
@ -516,89 +525,90 @@
|
|||
|
||||
(define (make-module-name-resolver code-l)
|
||||
(let ([extensions (filter (lambda (m) (extension? (mod-code m))) code-l)])
|
||||
`(let-values ([(orig) (current-module-name-resolver)]
|
||||
[(reg) (namespace-module-registry (current-namespace))]
|
||||
[(mapping-table) (quote
|
||||
,(map
|
||||
(lambda (m)
|
||||
`(,(mod-full-name m)
|
||||
,(mod-mappings m)))
|
||||
code-l))]
|
||||
[(library-table) (quote
|
||||
,(filter values
|
||||
(map (lambda (m)
|
||||
(let ([path (mod-mod-path m)])
|
||||
(if (and (pair? path)
|
||||
(eq? 'lib (car path)))
|
||||
(cons (lib-path->string path)
|
||||
(mod-full-name m))
|
||||
#f)))
|
||||
code-l)))])
|
||||
(letrec-values ([(embedded-resolver)
|
||||
(case-lambda
|
||||
[(name)
|
||||
;; a notification
|
||||
(orig name)]
|
||||
[(name rel-to stx)
|
||||
(embedded-resolver name rel-to stx #t)]
|
||||
[(name rel-to stx load?)
|
||||
(if (not (module-path? name))
|
||||
;; Bad input
|
||||
(orig name rel-to stx load?)
|
||||
(if (not (eq? reg (namespace-module-registry (current-namespace))))
|
||||
;; Wrong registry
|
||||
(orig name rel-to stx load?)
|
||||
;; Have a relative mapping?
|
||||
(let-values ([(a) (if rel-to
|
||||
(assq (resolved-module-path-name rel-to) mapping-table)
|
||||
#f)])
|
||||
(if a
|
||||
(let-values ([(a2) (assoc name (cadr a))])
|
||||
(if a2
|
||||
(make-resolved-module-path (cdr a2))
|
||||
;; No relative mapping found (presumably a lib)
|
||||
(orig name rel-to stx load?)))
|
||||
(let-values ([(lname)
|
||||
;; normalize `lib' to single string (same as lib-path->string):
|
||||
(let-values ([(name)
|
||||
(if (symbol? name)
|
||||
(list 'lib (symbol->string name))
|
||||
name)])
|
||||
(if (pair? name)
|
||||
(if (eq? 'lib (car name))
|
||||
(if (null? (cddr name))
|
||||
(if (regexp-match #rx"^[^/]*[.]" (cadr name))
|
||||
;; mzlib
|
||||
(string-append "mzlib/" (cadr name))
|
||||
;; new-style
|
||||
(if (regexp-match #rx"^[^/.]*$" (cadr name))
|
||||
(string-append (cadr name) "/main.ss")
|
||||
(if (regexp-match #rx"^[^.]*$" (cadr name))
|
||||
;; need a suffix:
|
||||
(string-append (cadr name) ".ss")
|
||||
(cadr name))))
|
||||
;; old-style multi-string
|
||||
(string-append (apply string-append
|
||||
(map (lambda (s)
|
||||
(string-append s "/"))
|
||||
(cddr name)))
|
||||
(cadr name)))
|
||||
#f)
|
||||
#f))])
|
||||
;; A library mapping that we have?
|
||||
(let-values ([(a3) (assoc lname library-table)])
|
||||
(if a3
|
||||
;; Have it:
|
||||
(make-resolved-module-path (cdr a3))
|
||||
;; Let default handler try:
|
||||
(orig name rel-to stx load?))))))))])])
|
||||
(current-module-name-resolver embedded-resolver)))))
|
||||
`(module #%resolver '#%kernel
|
||||
(let-values ([(orig) (current-module-name-resolver)]
|
||||
[(reg) (namespace-module-registry (current-namespace))]
|
||||
[(mapping-table) (quote
|
||||
,(map
|
||||
(lambda (m)
|
||||
`(,(mod-full-name m)
|
||||
,(mod-mappings m)))
|
||||
code-l))]
|
||||
[(library-table) (quote
|
||||
,(filter values
|
||||
(map (lambda (m)
|
||||
(let ([path (mod-mod-path m)])
|
||||
(if (and (pair? path)
|
||||
(eq? 'lib (car path)))
|
||||
(cons (lib-path->string path)
|
||||
(mod-full-name m))
|
||||
#f)))
|
||||
code-l)))])
|
||||
(letrec-values ([(embedded-resolver)
|
||||
(case-lambda
|
||||
[(name)
|
||||
;; a notification
|
||||
(orig name)]
|
||||
[(name rel-to stx)
|
||||
(embedded-resolver name rel-to stx #t)]
|
||||
[(name rel-to stx load?)
|
||||
(if (not (module-path? name))
|
||||
;; Bad input
|
||||
(orig name rel-to stx load?)
|
||||
(if (not (eq? reg (namespace-module-registry (current-namespace))))
|
||||
;; Wrong registry
|
||||
(orig name rel-to stx load?)
|
||||
;; Have a relative mapping?
|
||||
(let-values ([(a) (if rel-to
|
||||
(assq (resolved-module-path-name rel-to) mapping-table)
|
||||
#f)])
|
||||
(if a
|
||||
(let-values ([(a2) (assoc name (cadr a))])
|
||||
(if a2
|
||||
(make-resolved-module-path (cdr a2))
|
||||
;; No relative mapping found (presumably a lib)
|
||||
(orig name rel-to stx load?)))
|
||||
(let-values ([(lname)
|
||||
;; normalize `lib' to single string (same as lib-path->string):
|
||||
(let-values ([(name)
|
||||
(if (symbol? name)
|
||||
(list 'lib (symbol->string name))
|
||||
name)])
|
||||
(if (pair? name)
|
||||
(if (eq? 'lib (car name))
|
||||
(if (null? (cddr name))
|
||||
(if (regexp-match #rx"^[^/]*[.]" (cadr name))
|
||||
;; mzlib
|
||||
(string-append "mzlib/" (cadr name))
|
||||
;; new-style
|
||||
(if (regexp-match #rx"^[^/.]*$" (cadr name))
|
||||
(string-append (cadr name) "/main.ss")
|
||||
(if (regexp-match #rx"^[^.]*$" (cadr name))
|
||||
;; need a suffix:
|
||||
(string-append (cadr name) ".ss")
|
||||
(cadr name))))
|
||||
;; old-style multi-string
|
||||
(string-append (apply string-append
|
||||
(map (lambda (s)
|
||||
(string-append s "/"))
|
||||
(cddr name)))
|
||||
(cadr name)))
|
||||
#f)
|
||||
#f))])
|
||||
;; A library mapping that we have?
|
||||
(let-values ([(a3) (assoc lname library-table)])
|
||||
(if a3
|
||||
;; Have it:
|
||||
(make-resolved-module-path (cdr a3))
|
||||
;; Let default handler try:
|
||||
(orig name rel-to stx load?))))))))])])
|
||||
(current-module-name-resolver embedded-resolver))))))
|
||||
|
||||
;; Write a module bundle that can be loaded with 'load' (do not embed it
|
||||
;; into an executable). The bundle is written to the current output port.
|
||||
(define (write-module-bundle verbose? modules literal-files literal-expression collects-dest
|
||||
on-extension program-name compiler expand-namespace
|
||||
src-filter get-extra-imports)
|
||||
(define (do-write-module-bundle verbose? modules literal-files literal-expressions collects-dest
|
||||
on-extension program-name compiler expand-namespace
|
||||
src-filter get-extra-imports)
|
||||
(let* ([module-paths (map cadr modules)]
|
||||
[files (map
|
||||
(lambda (mp)
|
||||
|
@ -633,9 +643,12 @@
|
|||
collapsed-mps)
|
||||
;; Drop elements of `codes' that just record copied libs:
|
||||
(set-box! codes (filter mod-code (unbox codes)))
|
||||
;; Bind `module' to get started:
|
||||
(write (compile-using-kernel '(namespace-require '(only '#%kernel module))))
|
||||
;; Install a module name resolver that redirects
|
||||
;; to the embedded modules
|
||||
(write (make-module-name-resolver (filter mod-code (unbox codes))))
|
||||
(write (compile-using-kernel '(namespace-require ''#%resolver)))
|
||||
;; Write the extension table and copy module code:
|
||||
(let* ([l (reverse (unbox codes))]
|
||||
[extensions (filter (lambda (m) (extension? (mod-code m))) l)]
|
||||
|
@ -649,41 +662,44 @@
|
|||
[table-path (resolved-module-path-name table-sym)])
|
||||
(assoc (normalize table-path) l)))])
|
||||
(unless (null? extensions)
|
||||
;; The extension table:
|
||||
(write '(#%require '#%utils))
|
||||
;; The extension table:`
|
||||
(write
|
||||
`(let-values ([(eXtEnSiOn-modules) ;; this name is magic for the exe->distribution process
|
||||
(quote ,(map (lambda (m)
|
||||
(let ([p (extension-path (mod-code m))])
|
||||
(when verbose?
|
||||
(fprintf (current-error-port) "Recording extension at ~s~n" p))
|
||||
(list (path->bytes p)
|
||||
(mod-full-name m)
|
||||
;; The program name isn't used. It just helps ensures that
|
||||
;; there's plenty of room in the executable for patching
|
||||
;; the path later when making a distribution.
|
||||
(path->bytes program-name))))
|
||||
extensions))])
|
||||
(for-each (lambda (pr)
|
||||
(current-module-declare-name (make-resolved-module-path (cadr pr)))
|
||||
(let-values ([(p) (bytes->path (car pr))])
|
||||
(load-extension (if (relative-path? p)
|
||||
(let-values ([(d) (current-directory)])
|
||||
(current-directory (find-system-path 'orig-dir))
|
||||
(begin0
|
||||
(let-values ([(p2) (find-executable-path (find-system-path 'exec-file) p #t)])
|
||||
(if p2
|
||||
p2
|
||||
(path->complete-path p (current-directory))))
|
||||
(current-directory d)))
|
||||
p))))
|
||||
eXtEnSiOn-modules))))
|
||||
`(module #%extension-table '#%kernel
|
||||
(#%require '#%utils)
|
||||
(let-values ([(eXtEnSiOn-modules) ;; this name is magic for the exe->distribution process
|
||||
(quote ,(map (lambda (m)
|
||||
(let ([p (extension-path (mod-code m))])
|
||||
(when verbose?
|
||||
(fprintf (current-error-port) "Recording extension at ~s~n" p))
|
||||
(list (path->bytes p)
|
||||
(mod-full-name m)
|
||||
;; The program name isn't used. It just helps ensures that
|
||||
;; there's plenty of room in the executable for patching
|
||||
;; the path later when making a distribution.
|
||||
(path->bytes program-name))))
|
||||
extensions))])
|
||||
(for-each (lambda (pr)
|
||||
(current-module-declare-name (make-resolved-module-path (cadr pr)))
|
||||
(let-values ([(p) (bytes->path (car pr))])
|
||||
(load-extension (if (relative-path? p)
|
||||
(let-values ([(d) (current-directory)])
|
||||
(current-directory (find-system-path 'orig-dir))
|
||||
(begin0
|
||||
(let-values ([(p2) (find-executable-path (find-system-path 'exec-file) p #t)])
|
||||
(if p2
|
||||
p2
|
||||
(path->complete-path p (current-directory))))
|
||||
(current-directory d)))
|
||||
p))))
|
||||
eXtEnSiOn-modules))))
|
||||
(write (compile-using-kernel '(namespace-require ''#%extension-table))))
|
||||
;; Runtime-path table:
|
||||
(unless (null? runtimes)
|
||||
(unless table-mod
|
||||
(error 'create-embedding-executable "cannot find module for runtime-path table"))
|
||||
(write `(current-module-declare-name (make-resolved-module-path
|
||||
',(mod-full-name table-mod))))
|
||||
(write (compile-using-kernel
|
||||
`(current-module-declare-name (make-resolved-module-path
|
||||
',(mod-full-name table-mod)))))
|
||||
(write `(module runtime-path-table '#%kernel
|
||||
(#%provide table)
|
||||
(define-values (table)
|
||||
|
@ -734,27 +750,48 @@
|
|||
(eq? nc table-mod))
|
||||
(when verbose?
|
||||
(fprintf (current-error-port) "Writing module from ~s~n" (mod-file nc)))
|
||||
(write `(current-module-declare-name
|
||||
(make-resolved-module-path
|
||||
',(mod-full-name nc))))
|
||||
(write (compile-using-kernel
|
||||
`(current-module-declare-name
|
||||
(make-resolved-module-path
|
||||
',(mod-full-name nc)))))
|
||||
(if (src-filter (mod-file nc))
|
||||
(with-input-from-file (mod-file nc)
|
||||
(lambda ()
|
||||
(copy-port (current-input-port) (current-output-port))))
|
||||
(write (mod-code nc)))))
|
||||
l))
|
||||
(write '(current-module-declare-name #f))
|
||||
(write (compile-using-kernel '(current-module-declare-name #f)))
|
||||
;; Remove `module' binding before we start running user code:
|
||||
(write (compile-using-kernel '(namespace-set-variable-value! 'module #f #t)))
|
||||
(write (compile-using-kernel '(namespace-undefine-variable! 'module)))
|
||||
(newline)
|
||||
(for-each (lambda (f)
|
||||
(when verbose?
|
||||
(fprintf (current-error-port) "Copying from ~s~n" f))
|
||||
(call-with-input-file*
|
||||
f
|
||||
(call-with-input-file* f
|
||||
(lambda (i)
|
||||
(copy-port i (current-output-port)))))
|
||||
literal-files)
|
||||
(when literal-expression
|
||||
(write literal-expression))))
|
||||
(for-each write literal-expressions)))
|
||||
|
||||
(define (write-module-bundle #:verbose? [verbose? #f]
|
||||
#:modules [modules null]
|
||||
#:literal-files [literal-files null]
|
||||
#:literal-expressions [literal-expressions null]
|
||||
#:on-extension [on-extension #f]
|
||||
#:expand-namespace [expand-namespace (current-namespace)]
|
||||
#:compiler [compiler (lambda (expr)
|
||||
(parameterize ([current-namespace expand-namespace])
|
||||
(compile expr)))]
|
||||
#:src-filter [src-filter (lambda (filename) #f)]
|
||||
#:get-extra-imports [get-extra-imports (lambda (filename code) null)])
|
||||
(do-write-module-bundle verbose? modules literal-files literal-expressions
|
||||
#f ; collects-dest
|
||||
on-extension
|
||||
"?" ; program-name
|
||||
compiler expand-namespace
|
||||
src-filter get-extra-imports))
|
||||
|
||||
|
||||
;; The old interface:
|
||||
(define make-embedding-executable
|
||||
|
@ -783,6 +820,10 @@
|
|||
#:modules [modules null]
|
||||
#:literal-files [literal-files null]
|
||||
#:literal-expression [literal-expression #f]
|
||||
#:literal-expressions [literal-expressions
|
||||
(if literal-expression
|
||||
(list literal-expression)
|
||||
null)]
|
||||
#:cmdline [cmdline null]
|
||||
#:aux [aux null]
|
||||
#:launcher? [launcher? #f]
|
||||
|
@ -890,13 +931,13 @@
|
|||
(update-dll-dir dest (build-path orig-dir dir))))))))
|
||||
(let ([write-module
|
||||
(lambda ()
|
||||
(write-module-bundle verbose? modules literal-files literal-expression collects-dest
|
||||
on-extension
|
||||
(file-name-from-path dest)
|
||||
compiler
|
||||
expand-namespace
|
||||
src-filter
|
||||
get-extra-imports))])
|
||||
(do-write-module-bundle verbose? modules literal-files literal-expressions collects-dest
|
||||
on-extension
|
||||
(file-name-from-path dest)
|
||||
compiler
|
||||
expand-namespace
|
||||
src-filter
|
||||
get-extra-imports))])
|
||||
(let-values ([(start end)
|
||||
(if (and (eq? (system-type) 'macosx)
|
||||
(not unix-starter?))
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
|
||||
(define exe-dir-output (make-parameter #f))
|
||||
|
||||
(define mods-output (make-parameter #f))
|
||||
|
||||
(define module-mode (make-parameter #f))
|
||||
|
||||
(define default-plt-name "archive")
|
||||
|
@ -112,6 +114,10 @@
|
|||
,(lambda (f name) (exe-dir-output name) 'exe-dir)
|
||||
((,(format "Combine executables with support files in <dir>") "")
|
||||
"dir")]
|
||||
[("--c-mods")
|
||||
,(lambda (f name) (mods-output name) 'c-mods)
|
||||
((,(format "Write C-embeddable module bytecode to <file>") "")
|
||||
"file")]
|
||||
[("--collection-plt")
|
||||
,(lambda (f name) (plt-output name) 'plt-collect)
|
||||
(,(format "Create .plt <archive> containing collections")
|
||||
|
@ -287,7 +293,7 @@
|
|||
,(lambda (f l) (exe-embedded-libraries
|
||||
(append (exe-embedded-libraries)
|
||||
(list l))))
|
||||
("Embed <lib> from <collect> in --[gui-]exe executable" "lib")]
|
||||
("Embed <lib> in --[gui-]exe executable" "lib")]
|
||||
[("++collects-copy")
|
||||
,(lambda (f d) (exe-dir-add-collects-dirs
|
||||
(append (exe-dir-add-collects-dirs)
|
||||
|
@ -384,14 +390,14 @@
|
|||
[("--debug")
|
||||
,(lambda (f) (compiler:option:debug #t))
|
||||
("Write debugging output to dump.txt")]])
|
||||
(lambda (accum file . files)
|
||||
(lambda (accum . files)
|
||||
(let ([mode (let ([l (filter symbol? accum)])
|
||||
(if (null? l)
|
||||
'make-zo
|
||||
(car l)))])
|
||||
(values
|
||||
mode
|
||||
(cons file files)
|
||||
files
|
||||
(let ([prefixes (filter string? accum)])
|
||||
(unless (memq mode '(compile compile-c zo))
|
||||
(unless (null? prefixes)
|
||||
|
@ -411,7 +417,7 @@
|
|||
(require compiler/cffi)
|
||||
,@(map (lambda (s) `(load ,s)) prefixes)
|
||||
(void)))))))
|
||||
(list "file/directory/collection" "file/directory/sub-collection")))
|
||||
(list "file/directory/collection")))
|
||||
|
||||
(printf "mzc v~a [~a], Copyright (c) 2004-2008 PLT Scheme Inc.~n"
|
||||
(version)
|
||||
|
@ -544,16 +550,68 @@
|
|||
(map (lambda (l)
|
||||
`(#t (lib ,l)))
|
||||
(exe-embedded-libraries)))
|
||||
#:literal-expression `(#%require ',(string->symbol
|
||||
(format
|
||||
"#%mzc:~a"
|
||||
(let-values ([(base name dir?) (split-path (car source-files))])
|
||||
(path->bytes (path-replace-suffix name #""))))))
|
||||
#:literal-expression (parameterize ([current-namespace (make-base-namespace)])
|
||||
(compile
|
||||
`(namespace-require
|
||||
'',(string->symbol
|
||||
(format
|
||||
"#%mzc:~a"
|
||||
(let-values ([(base name dir?) (split-path (car source-files))])
|
||||
(path->bytes (path-replace-suffix name #""))))))))
|
||||
#:cmdline (exe-embedded-flags)
|
||||
#:collects-path (exe-embedded-collects-path)
|
||||
#:collects-dest (exe-embedded-collects-dest)
|
||||
#:aux (exe-aux))
|
||||
(printf " [output to \"~a\"]~n" dest))]
|
||||
[(c-mods)
|
||||
(let ([dest (mods-output)])
|
||||
(let-values ([(in out) (make-pipe)])
|
||||
(parameterize ([current-output-port out])
|
||||
((dynamic-require '(lib "embed.ss" "compiler")
|
||||
'write-module-bundle)
|
||||
#:modules
|
||||
(append
|
||||
(map (lambda (l)
|
||||
`(#f (file ,l)))
|
||||
source-files)
|
||||
(map (lambda (l)
|
||||
`(#t (lib ,l)))
|
||||
(exe-embedded-libraries)))))
|
||||
(close-output-port out)
|
||||
(let ([out (open-output-file
|
||||
dest
|
||||
#:exists 'truncate/replace)])
|
||||
(fprintf out "#ifdef MZ_XFORM\n")
|
||||
(fprintf out "XFORM_START_SKIP;\n")
|
||||
(fprintf out "#endif\n")
|
||||
(fprintf out "static void declare_modules(Scheme_Env *env) {\n")
|
||||
(fprintf out " static unsigned char data[] = {")
|
||||
(let loop ([pos 0])
|
||||
(let ([b (read-byte in)])
|
||||
(when (zero? (modulo pos 20))
|
||||
(fprintf out "\n "))
|
||||
(unless (eof-object? b)
|
||||
(fprintf out "~a," b)
|
||||
(loop (add1 pos)))))
|
||||
(fprintf out "0\n };\n")
|
||||
(fprintf out " Scheme_Object *eload = NULL, *a[3] = {NULL, NULL, NULL};\n")
|
||||
(fprintf out " MZ_GC_DECL_REG(4);\n")
|
||||
(fprintf out " MZ_GC_VAR_IN_REG(0, eload);\n")
|
||||
(fprintf out " MZ_GC_ARRAY_VAR_IN_REG(1, a, 3);\n")
|
||||
(fprintf out " MZ_GC_REG();\n")
|
||||
(fprintf out " eload = scheme_builtin_value(\"embedded-load\");\n")
|
||||
(fprintf out " a[0] = scheme_false;\n")
|
||||
(fprintf out " a[1] = scheme_false;\n")
|
||||
(fprintf out " a[2] = scheme_make_sized_byte_string((char *)data, ~a, 0);\n"
|
||||
(file-position in))
|
||||
(fprintf out " scheme_apply(eload, 3, a);\n")
|
||||
(fprintf out " MZ_GC_UNREG();\n")
|
||||
(fprintf out "}\n")
|
||||
(fprintf out "#ifdef MZ_XFORM\n")
|
||||
(fprintf out "XFORM_END_SKIP;\n")
|
||||
(fprintf out "#endif\n")
|
||||
(close-output-port out)))
|
||||
(printf " [output to \"~a\"]~n" dest))]
|
||||
[(exe-dir)
|
||||
((dynamic-require 'compiler/distribute
|
||||
'assemble-distribution)
|
||||
|
|
|
@ -213,9 +213,11 @@
|
|||
#f ;; verbose?
|
||||
(list (list #f program-filename))
|
||||
null
|
||||
null
|
||||
(list "-nqe-"
|
||||
(format "~s" `(#%require ',(string->symbol (path->string short-program-name)))))))))
|
||||
(parameterize ([current-namespace (make-namespace 'empty)])
|
||||
(namespace-require 'mzscheme)
|
||||
(compile
|
||||
`(namespace-require '',(string->symbol (path->string short-program-name)))))
|
||||
null))))
|
||||
(let ([make-launcher (if gui? make-mred-launcher make-mzscheme-launcher)])
|
||||
(make-launcher (list "-qt-" (path->string program-filename))
|
||||
executable-filename))))))))
|
||||
|
|
|
@ -889,7 +889,7 @@
|
|||
;; any structure defined in the user's namespace
|
||||
(define drscheme-inspector (current-inspector))
|
||||
|
||||
(eval `(module drscheme-secrets mzscheme
|
||||
(eval `(,#'module drscheme-secrets mzscheme
|
||||
(provide drscheme-inspector)
|
||||
(define drscheme-inspector ,drscheme-inspector)))
|
||||
(namespace-require ''drscheme-secrets)
|
||||
|
|
|
@ -73,6 +73,10 @@
|
|||
(else
|
||||
(compile-java-internal port loc type-recs #f level)))))
|
||||
|
||||
(define (compile-module expr)
|
||||
(parameterize ([current-namespace (make-namespace)])
|
||||
(compile expr)))
|
||||
|
||||
;compile-to-file: port location level -> void
|
||||
;Should have side-effect of writing to file all files needed for compilation
|
||||
(define (compile-to-file port location level)
|
||||
|
@ -98,7 +102,7 @@
|
|||
(build-path (send type-recs get-compilation-location)
|
||||
(file-name-from-path
|
||||
(send type-recs get-composite-location (car names))))
|
||||
(lambda (port) (write (compile (car syntaxes)) port)) 'truncate/replace)
|
||||
(lambda (port) (write (compile-module (car syntaxes)) port)) 'truncate/replace)
|
||||
(set! syntaxes (cdr syntaxes)))
|
||||
(unless (= (length names) (length syntaxes) (length locations))
|
||||
(error 'compile-to-file "Internal error: compilation unit not represented as expected"))
|
||||
|
@ -109,7 +113,7 @@
|
|||
(unless (directory-exists? directory) (make-directory directory))
|
||||
(call-with-output-zo-file* location
|
||||
(build-path directory (string-append name "_ss.zo"))
|
||||
(lambda (port) (write (compile code) port))
|
||||
(lambda (port) (write (compile-module code) port))
|
||||
'truncate/replace)
|
||||
(call-with-output-file* (build-path directory (string-append name ".jinfo"))
|
||||
(lambda (port) (write-record (send type-recs get-class-record
|
||||
|
|
|
@ -49,3 +49,18 @@ embedded:
|
|||
calls @cppi{scheme_console_output}.}
|
||||
|
||||
}
|
||||
|
||||
@function[(void scheme_set_collects_path
|
||||
[Scheme_Object* path])]{
|
||||
|
||||
Sets the path to be returned by @scheme[(find-system-path
|
||||
'collects-dir)].}
|
||||
|
||||
|
||||
@function[(void scheme_init_collection_paths
|
||||
[Scheme_Env* env]
|
||||
[Scheme_Object* extra_paths])]{
|
||||
|
||||
Initializes the @scheme[current-library-collection-paths] parameter
|
||||
using @scheme[find-library-collection-paths]. The @var{extra_paths}
|
||||
argument is propagated to @scheme[find-library-collection-paths].}
|
||||
|
|
|
@ -85,12 +85,11 @@ times).
|
|||
|
||||
With conservative collection, no registration is needed for the global
|
||||
or static variables of an embedding program, unless it calls
|
||||
@cppi{scheme_set_stack_base} with a non-zero second argument. (Under
|
||||
Mac OS X or with 3m, @cpp{scheme_set_stack_base} must be called
|
||||
always.) In that case, global and static variables containing
|
||||
collectable pointers must be registered with
|
||||
@cppi{scheme_register_static}. The @cppi{MZ_REGISTER_STATIC} macro
|
||||
takes any variable name and registers it with
|
||||
@cpp{scheme_setup} or @cppi{scheme_set_stack_base} with a non-zero
|
||||
first or second (respectively) argument. In that case, global and
|
||||
static variables containing collectable pointers must be registered
|
||||
with @cppi{scheme_register_static}. The @cppi{MZ_REGISTER_STATIC}
|
||||
macro takes any variable name and registers it with
|
||||
@cppi{scheme_register_static}. The @cppi{scheme_register_static}
|
||||
function can be safely called even when it's not needed, but it must
|
||||
not be called multiple times for a single memory address.
|
||||
|
@ -141,7 +140,7 @@ Pointers are registered in three different ways:
|
|||
|
||||
A pointer must never refer to the interior of an allocated object
|
||||
(when a garbage collection is possible), unless the object was
|
||||
allocated with {@cppi{scheme_malloc_allow_interior}}. For this reason,
|
||||
allocated with @cppi{scheme_malloc_allow_interior}. For this reason,
|
||||
pointer arithmetic must usually be avoided, unless the variable
|
||||
holding the generated pointer is @cpp{NULL}ed before a collection.
|
||||
|
||||
|
@ -313,7 +312,8 @@ can be supplied as well:
|
|||
|
||||
In general, the only constraint on the second argument to
|
||||
@cppi{MZ_GC_VAR_IN_REG} or @cppi{MZ_GC_ARRAY_VAR_IN_REG} is that
|
||||
@cpp{&} must produce the relevant address.
|
||||
@cpp{&} must produce the relevant address, and that address must be on
|
||||
the stack.
|
||||
|
||||
Pointer information is not actually registered with the collector
|
||||
until the @cppi{MZ_GC_REG} macro is used. The @cppi{MZ_GC_UNREG} macro
|
||||
|
@ -685,6 +685,32 @@ Registers an extension's global variable that can contain Scheme
|
|||
collector would otherwise treat as atomic. A garbage collection can
|
||||
occur during the registration.}
|
||||
|
||||
|
||||
@function[(int scheme_setup
|
||||
[int no_auto_statics]
|
||||
[Scheme_Main main]
|
||||
[int argc]
|
||||
[char** argv])]{
|
||||
|
||||
Initializes the GC stack base, creates the initial namespace by
|
||||
calling @cpp{scheme_basic_env}, and then calls @var{main} with the
|
||||
namespace, @var{argc}, and @var{argv}. (The @var{argc} and @var{argv}
|
||||
are just passed on to @var{main}, and are not inspected in any way.)
|
||||
|
||||
The @cpp{Scheme_Main} type is defined as follows:
|
||||
|
||||
@verbatim[#:indent 4]{
|
||||
typedef int (*Scheme_Main)(Scheme_Env *env,
|
||||
int argc, char **argv);
|
||||
}
|
||||
|
||||
The result of @var{main} is the result of @cpp{scheme_setup}.
|
||||
|
||||
If @var{no_auto_statics} is non-zero, then static variables must be
|
||||
explicitly registered with the garbage collector; see
|
||||
@secref["im:memoryalloc"] for more information.}
|
||||
|
||||
|
||||
@function[(void scheme_set_stack_base
|
||||
[void* stack_addr]
|
||||
[int no_auto_statics])]{
|
||||
|
@ -697,7 +723,8 @@ Overrides the GC's auto-determined stack base, and/or disables the
|
|||
should be called only once, and before any other @cpp{scheme_}
|
||||
function is called. It never triggers a garbage collection.
|
||||
|
||||
The following example shows a typical use for setting the stack base:
|
||||
The following example shows a typical use for setting the stack base
|
||||
for CGC:
|
||||
|
||||
@verbatim[#:indent 4]{
|
||||
int main(int argc, char **argv) {
|
||||
|
@ -705,7 +732,14 @@ The following example shows a typical use for setting the stack base:
|
|||
scheme_set_stack_base(&dummy, 0);
|
||||
real_main(argc, argv); /* calls scheme_basic_env(), etc. */
|
||||
}
|
||||
}}
|
||||
}
|
||||
|
||||
Under 3m, the above code does not quite work, because @var{stack_addr}
|
||||
must be the beginning or end of a local-frame registration. Worse, in
|
||||
CGC or 3m, if @cpp{real_main} is declared @cpp{static}, the compiler
|
||||
may inline it and place variables containing collectable values deeper
|
||||
in the stack than @cpp{dummy}. To avoid these problems, use
|
||||
@cpp{scheme_setup}, instead.}
|
||||
|
||||
@function[(void scheme_set_stack_bounds
|
||||
[void* stack_addr]
|
||||
|
|
|
@ -134,6 +134,19 @@ Returns the contents of the given box.}
|
|||
|
||||
Sets the contents of the given box.}
|
||||
|
||||
@function[(Scheme_Object* scheme_dynamic_require
|
||||
[int argc]
|
||||
[Scheme_Object** argv])]{
|
||||
|
||||
The same as @scheme[dynamic-require]. The @var{argc} argument must be
|
||||
@scheme[2], and @var{argv} contains the arguments.}
|
||||
|
||||
@function[(Scheme_Object* scheme_namespace_require
|
||||
[Scheme_Object* prim_req_spec])]{
|
||||
|
||||
The same as @scheme[namespace-require].}
|
||||
|
||||
|
||||
@function[(Scheme_Object* scheme_load
|
||||
[char* file])]{
|
||||
|
||||
|
|
|
@ -11,9 +11,10 @@ and syntax.
|
|||
|
||||
The @cpp{scheme_basic_env} function must be called once by an
|
||||
embedding program, before any other PLT Scheme function is called
|
||||
(except @cpp{scheme_make_param}). The returned namespace is the
|
||||
initial current namespace for the main Scheme thread. Scheme
|
||||
extensions cannot call @cpp{scheme_basic_env}.
|
||||
(except @cpp{scheme_make_param}), but @cpp{scheme_setup} automatically
|
||||
calls @cpp{scheme_basic_env}. The returned namespace is the initial
|
||||
current namespace for the main Scheme thread. Scheme extensions cannot
|
||||
call @cpp{scheme_basic_env}.
|
||||
|
||||
The current thread's current namespace is available from
|
||||
@cppi{scheme_get_env}, given the current parameterization (see
|
||||
|
|
|
@ -296,13 +296,33 @@ To embed PLT Scheme CGC in a program, follow these steps:
|
|||
installing from source also places this file in the installation's
|
||||
@filepath{include} directory.}
|
||||
|
||||
@item{In your main program, obtain a global MzScheme environment
|
||||
@cpp{Scheme_Env*} by calling @cppi{scheme_basic_env}. This function
|
||||
must be called before any other function in the MzScheme library
|
||||
(except @cpp{scheme_make_param}).}
|
||||
@item{Start your main program through the @cpp{scheme_setup}
|
||||
trampoline, and put all uses of MzScheme functions inside the
|
||||
function passed to @cpp{scheme_setup}. The @cpp{scheme_setup}
|
||||
function registers the current C stack location with the memory
|
||||
manager. It also creates the initial namespace @cpp{Scheme_Env*} by
|
||||
calling @cppi{scheme_basic_env} and passing the result to the
|
||||
function provided to @cpp{scheme_setup}.}
|
||||
|
||||
@item{Access MzScheme through @cppi{scheme_load},
|
||||
@cppi{scheme_eval}, and/or other top-level MzScheme functions
|
||||
@item{Configure the namespace by adding module declarations. The
|
||||
initial namespace contains declarations only for a few primitive
|
||||
modules, such as @scheme['#%kernel], and no bindings are imported
|
||||
into the top-level environment.
|
||||
|
||||
To embed a module like @schememodname[scheme/base] (along with all
|
||||
its dependencies), use @exec{mzc --c-mods}, which generates a C file
|
||||
that contains modules in bytecode form as encapsulated in a static
|
||||
array. The generated C file defines a @cppi{declare_modules}
|
||||
function that takes a @cpp{Scheme_Env*}, installs the modules into
|
||||
the environment, and adjusts the module name resolver to access the
|
||||
embedded declarations.
|
||||
|
||||
Alternately, use @cpp{scheme_set_collects_path} and
|
||||
@cpp{scheme_init_collection_paths} to configure and install a path
|
||||
for finding modules at run time.}
|
||||
|
||||
@item{Access Scheme through @cppi{scheme_dynamic_require},
|
||||
@cppi{scheme_load}, @cppi{scheme_eval}, and/or other functions
|
||||
described in this manual.}
|
||||
|
||||
@item{Compile the program and link it with the MzScheme libraries.}
|
||||
|
@ -320,21 +340,29 @@ specific to Mac OS X and Windows).
|
|||
For example, the following is a simple embedding program which
|
||||
evaluates all expressions provided on the command line and displays
|
||||
the results, then runs a @scheme[read]-@scheme[eval]-@scheme[print]
|
||||
loop:
|
||||
loop. Run
|
||||
|
||||
@verbatim{
|
||||
@commandline{mzc --c-mods base.c ++lib scheme/base}
|
||||
|
||||
to generate @filepath{base.c}, which encapsulates @scheme[scheme/base]
|
||||
and all of its transitive imports (so that they need not be found
|
||||
separately a run time).
|
||||
|
||||
@verbatim[#:indent 2]{
|
||||
#include "scheme.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
#include "base.c"
|
||||
|
||||
static int run(Scheme_Env *e, int argc, char *argv[])
|
||||
{
|
||||
Scheme_Env *e;
|
||||
Scheme_Object *curout;
|
||||
int i;
|
||||
mz_jmp_buf * volatile save, fresh;
|
||||
|
||||
scheme_set_stack_base(NULL, 1); /* required for OS X, only */
|
||||
/* Declare embedded modules in "base.c": */
|
||||
declare_modules(e);
|
||||
|
||||
e = scheme_basic_env();
|
||||
scheme_namespace_require(scheme_intern_symbol("scheme/base"));
|
||||
|
||||
curout = scheme_get_param(scheme_current_config(),
|
||||
MZCONFIG_OUTPUT_PORT);
|
||||
|
@ -346,44 +374,49 @@ int main(int argc, char *argv[])
|
|||
scheme_current_thread->error_buf = save;
|
||||
return -1; /* There was an error */
|
||||
} else {
|
||||
Scheme_Object *v = scheme_eval_string(argv[i], e);
|
||||
Scheme_Object *v, *a[2];
|
||||
v = scheme_eval_string(argv[i], e);
|
||||
scheme_display(v, curout);
|
||||
scheme_display(scheme_make_character('\n'), curout);
|
||||
scheme_display(scheme_make_char('\n'), curout);
|
||||
/* read-eval-print loop, uses initial Scheme_Env: */
|
||||
scheme_apply(scheme_builtin_value("read-eval-print-loop"),
|
||||
0, NULL);
|
||||
a[0] = scheme_intern_symbol("scheme/base");
|
||||
a[1] = scheme_intern_symbol("read-eval-print-loop");
|
||||
scheme_apply(scheme_dynamic_require(2, a), 0, NULL);
|
||||
scheme_current_thread->error_buf = save;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return scheme_setup(1, run, argc, argv);
|
||||
}
|
||||
}
|
||||
|
||||
Under Mac OS X, or under Windows when MzScheme is compiled to a DLL
|
||||
using Cygwin, the garbage collector cannot find static variables
|
||||
automatically. In that case, @cppi{scheme_set_stack_base} must be
|
||||
called with a non-zero second argument before calling any
|
||||
@cpp{scheme_} function.
|
||||
automatically. In that case, @cppi{scheme_setup} must be called with a
|
||||
non-zero first argument.
|
||||
|
||||
Under Windows (for any other build mode), the garbage collector finds
|
||||
static variables in an embedding program by examining all memory
|
||||
pages. This strategy fails if a program contains multiple Windows
|
||||
threads; a page may get unmapped by a thread while the collector is
|
||||
examining the page, causing the collector to crash. To avoid this
|
||||
problem, call @cpp{scheme_set_stack_base} with a non-zero second
|
||||
argument before calling any @cpp{scheme_} function.
|
||||
problem, call @cpp{scheme_setup} with a non-zero first argument.
|
||||
|
||||
When an embedding application calls @cpp{scheme_set_stack_base} with a
|
||||
non-zero second argument, it must register each of its static
|
||||
variables with @cppi{MZ_REGISTER_STATIC} if the variable can contain a
|
||||
GCable pointer. For example, if @cpp{e} above is made @cpp{static},
|
||||
then @cpp{MZ_REGISTER_STATIC(e)} should be inserted before the call to
|
||||
@cpp{scheme_basic_env}.
|
||||
When an embedding application calls @cpp{scheme_setup} with a non-zero
|
||||
first argument, it must register each of its static variables with
|
||||
@cppi{MZ_REGISTER_STATIC} if the variable can contain a GCable
|
||||
pointer. For example, if @cpp{curout} above is made @cpp{static}, then
|
||||
@cpp{MZ_REGISTER_STATIC(curout)} should be inserted before the call to
|
||||
@cpp{scheme_get_param}.
|
||||
|
||||
When building an embedded MzSchemeCGC to use SenoraGC (SGC) instead of
|
||||
the default collector, @cpp{scheme_set_stack_base} must be called both
|
||||
with a non-zero second argument and with a stack-base pointer in the
|
||||
first argument. See @secref["im:memoryalloc"] for more information.
|
||||
the default collector, @cpp{scheme_setup} must be called with a
|
||||
non-zero first argument. See @secref["im:memoryalloc"] for more
|
||||
information.
|
||||
|
||||
|
||||
@subsection{3m Embedding}
|
||||
|
@ -421,44 +454,41 @@ In addition, some library details are different:
|
|||
|
||||
}
|
||||
|
||||
For MzScheme3m, an embedding application must call
|
||||
@cpp{scheme_set_stack_base} with non-zero arguments. Furthermore, the
|
||||
first argument must be @cpp{&__gc_var_stack__}, where
|
||||
@cpp{__gc_var_stack__} is bound by a @cpp{MZ_GC_DECL_REG}.
|
||||
For MzScheme3m, an embedding application must call @cpp{scheme_setup}
|
||||
with a non-zero first argument.
|
||||
|
||||
The simple embedding program from the previous section can be
|
||||
extended to work with either CGC or 3m, dependong on whether
|
||||
@cpp{MZ_PRECISE_GC} is specified on the compiler's command line:
|
||||
processed by @exec{mzc --xform}, then compiled and linked with
|
||||
MzScheme3m. Alternately, the source code can be extended to work with
|
||||
either CGC or 3m depending on whether @cpp{MZ_PRECISE_GC} is defined
|
||||
on the compiler's command line:
|
||||
|
||||
@verbatim{
|
||||
@verbatim[#:indent 2]{
|
||||
#include "scheme.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
#include "base.c"
|
||||
|
||||
static int run(Scheme_Env *e, int argc, char *argv[])
|
||||
{
|
||||
Scheme_Env *e = NULL;
|
||||
Scheme_Object *curout = NULL, *v = NULL;
|
||||
Scheme_Object *curout = NULL, *v = NULL, *a[2] = {NULL, NULL};
|
||||
Scheme_Config *config = NULL;
|
||||
int i;
|
||||
mz_jmp_buf * volatile save = NULL, fresh;
|
||||
|
||||
MZ_GC_DECL_REG(5);
|
||||
MZ_GC_DECL_REG(8);
|
||||
MZ_GC_VAR_IN_REG(0, e);
|
||||
MZ_GC_VAR_IN_REG(1, curout);
|
||||
MZ_GC_VAR_IN_REG(2, save);
|
||||
MZ_GC_VAR_IN_REG(3, config);
|
||||
MZ_GC_VAR_IN_REG(4, v);
|
||||
|
||||
# ifdef MZ_PRECISE_GC
|
||||
# define STACK_BASE &__gc_var_stack__
|
||||
# else
|
||||
# define STACK_BASE NULL
|
||||
# endif
|
||||
|
||||
scheme_set_stack_base(STACK_BASE, 1);
|
||||
MZ_GC_ARRAY_VAR_IN_REG(5, a, 2);
|
||||
|
||||
MZ_GC_REG();
|
||||
|
||||
e = scheme_basic_env();
|
||||
declare_modules(e);
|
||||
|
||||
v = scheme_intern_symbol("scheme/base");
|
||||
scheme_namespace_require(v);
|
||||
|
||||
config = scheme_current_config();
|
||||
curout = scheme_get_param(config, MZCONFIG_OUTPUT_PORT);
|
||||
|
@ -472,10 +502,12 @@ int main(int argc, char *argv[])
|
|||
} else {
|
||||
v = scheme_eval_string(argv[i], e);
|
||||
scheme_display(v, curout);
|
||||
v = scheme_make_character('\n');
|
||||
v = scheme_make_char('\n');
|
||||
scheme_display(v, curout);
|
||||
/* read-eval-print loop, uses initial Scheme_Env: */
|
||||
v = scheme_builtin_value("read-eval-print-loop");
|
||||
a[0] = scheme_intern_symbol("scheme/base");
|
||||
a[1] = scheme_intern_symbol("read-eval-print-loop");
|
||||
v = scheme_dynamic_require(2, a);
|
||||
scheme_apply(v, 0, NULL);
|
||||
scheme_current_thread->error_buf = save;
|
||||
}
|
||||
|
@ -485,15 +517,18 @@ int main(int argc, char *argv[])
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return scheme_setup(1, run, argc, argv);
|
||||
}
|
||||
}
|
||||
|
||||
Strictly speaking, the @cpp{config} and @cpp{v} variables above need not be
|
||||
registered with the garbage collector, since their values are not needed
|
||||
across function calls that allocate. That is, the original example could have
|
||||
been left alone starting with the @cpp{scheme_base_env} call, except for the
|
||||
addition of @cpp{MZ_GC_UNREG}. The code is much easier to maintain, however,
|
||||
when all local variables are regsistered and when all temporary values are
|
||||
put into variables.
|
||||
Strictly speaking, the @cpp{config} and @cpp{v} variables above need
|
||||
not be registered with the garbage collector, since their values are
|
||||
not needed across function calls that allocate. The code is much
|
||||
easier to maintain, however, when all local variables are registered
|
||||
and when all temporary values are put into variables.
|
||||
|
||||
@; ----------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -51,7 +51,12 @@ parameter is true.
|
|||
null]
|
||||
[#:literal-expression literal-sexp
|
||||
any/c
|
||||
null]
|
||||
#f]
|
||||
[#:literal-expressions literal-sexps
|
||||
list?
|
||||
(if literal-sexp
|
||||
(list literal-sexp)
|
||||
null)]
|
||||
[#:cmdline cmdline (listof string?)
|
||||
null]
|
||||
[#:mred? mred? any/c #f]
|
||||
|
@ -99,17 +104,20 @@ namespace except as specified in @scheme[mod-list], other modules
|
|||
generated prefix, so that they are not directly accessible.
|
||||
|
||||
The @scheme[#:modules] argument @scheme[mod-list] designates modules
|
||||
to be embedded, as described below. The @scheme[literal-files] and
|
||||
@scheme[literal-sexp] arguments specify literal code to be copied into
|
||||
the executable: the content of each file in @scheme[literal-files]
|
||||
is copied in order (with no intervening space), followed by
|
||||
@scheme[literal-sexp]. The @scheme[literal-files] files or
|
||||
@scheme[literal-sexp] can contain compiled bytecode, and it's possible
|
||||
that the content of the @scheme[literal-files] files only parse
|
||||
when concatenated; the files and expression are not compiled or
|
||||
inspected in any way during the embedding process. If
|
||||
to be embedded, as described below. The @scheme[#:literal-files] and
|
||||
@scheme[#:literal-expressions] arguments specify literal code to be
|
||||
copied into the executable: the content of each file in
|
||||
@scheme[literal-files] is copied in order (with no intervening space),
|
||||
followed by each element of @scheme[literal-sexps]. The
|
||||
@scheme[literal-files] files or @scheme[literal-sexps] list can
|
||||
contain compiled bytecode, and it's possible that the content of the
|
||||
@scheme[literal-files] files only parse when concatenated; the files
|
||||
and expression are not compiled or inspected in any way during the
|
||||
embedding process. Beware that the initial namespace contains no
|
||||
bindings; use compiled expressions to bootstrap the namespace. If
|
||||
@scheme[literal-sexp] is @scheme[#f], no literal expression is
|
||||
included in the executable.
|
||||
included in the executable. The @scheme[#:literal-expression]
|
||||
(singular) argument is for backward compatibility.
|
||||
|
||||
The @scheme[#:cmdline] argument @scheme[cmdline] contains command-line
|
||||
strings that are prefixed onto any actual command-line arguments that
|
||||
|
@ -130,14 +138,14 @@ embeds the module @scheme[m] from the file @filepath{m.ss}, without
|
|||
prefixing the name of the module; the @scheme[literal-sexpr] argument
|
||||
to go with the above might be @scheme['(require m)].
|
||||
|
||||
All modules are compiled before they are embedded into the target
|
||||
executable; see also @scheme[compile-proc] below. When a module
|
||||
declares run-time paths via @scheme[define-runtime-path], the
|
||||
generated executable records the path (for use both by immediate
|
||||
execution and for creating a distribution that contains the
|
||||
executable).
|
||||
Modules are normally compiled before they are embedded into the target
|
||||
executable; see also @scheme[#:compiler] and @scheme[#:src-filter]
|
||||
below. When a module declares run-time paths via
|
||||
@scheme[define-runtime-path], the generated executable records the
|
||||
path (for use both by immediate execution and for creating a
|
||||
distribution that contains the executable).
|
||||
|
||||
The optional @scheme[aux] argument is an association list for
|
||||
The optional @scheme[#:aux] argument is an association list for
|
||||
platform-specific options (i.e., it is a list of pairs where the first
|
||||
element of the pair is a key symbol and the second element is the
|
||||
value for that key). The currently supported keys are as follows:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"common.ss"
|
||||
(for-label scheme/runtime-path))
|
||||
|
||||
@title{Stand-Alone Executables from Scheme Code}
|
||||
@title[#:tag "exe"]{Stand-Alone Executables from Scheme Code}
|
||||
|
||||
The command-line flag @DFlag{exe} directs @|mzc| to embed a
|
||||
module, from source or byte code, into a copy of the MzScheme
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
@(require scribble/manual
|
||||
"common.ss")
|
||||
|
||||
@title[#:tag "exe" #:style 'toc]{Creating and Distributing Stand-Alone Executables}
|
||||
@title[#:tag "sa" #:style 'toc]{Creating and Distributing Stand-Alone Executables}
|
||||
|
||||
Whether bytecode or native code, the compiled code produced by @|mzc|
|
||||
relies on MzScheme (or MrEd) to provide run-time support to the
|
||||
|
|
|
@ -40,7 +40,12 @@ The core PLT Scheme run-time system is available in two main variants:
|
|||
@section[#:tag "init-actions"]{Initialization}
|
||||
|
||||
On startup, the top-level environment contains no bindings---not even
|
||||
for function application.
|
||||
for function application. Primitive modules with names that start with
|
||||
@schemeidfont{#%} are defined, but they are not meant for direct use,
|
||||
and the set of such modules can change. For example, the
|
||||
@indexed-scheme['#%kernel] module is eventually used to bootstrap the
|
||||
implemetation of @schememodname[scheme/base], and
|
||||
@scheme['#%mred-kernel] is used for @schememodname[scheme/gui/base].
|
||||
|
||||
The first action of MzScheme or MrEd is to initialize
|
||||
@scheme[current-library-collection-paths] to the result of
|
||||
|
@ -97,7 +102,7 @@ the exit status is @scheme[0] or determined by a call to
|
|||
|
||||
@; ----------------------------------------------------------------------
|
||||
|
||||
@section{Command Line}
|
||||
@section["mz-cmdline"]{Command Line}
|
||||
|
||||
The MzScheme and MrEd executables recognize the following command-line
|
||||
flags:
|
||||
|
@ -142,8 +147,8 @@ flags:
|
|||
|
||||
@item{@FlagFirst{k} @nonterm{n} @nonterm{m} : Loads code embedded in
|
||||
the executable from file position @nonterm{n} to
|
||||
@nonterm{m}. This option normally embedded in a stand-alone
|
||||
binary that embeds Scheme code.}
|
||||
@nonterm{m}. This option is normally embedded in a stand-alone
|
||||
binary that also embeds Scheme code.}
|
||||
|
||||
@item{@FlagFirst{m} or @DFlagFirst{main} : Evaluates a call to
|
||||
@scheme[main] in the top-level environment. All of the
|
||||
|
|
|
@ -86,6 +86,14 @@
|
|||
expect mred?)
|
||||
(delete-directory/files dist-dir)]))
|
||||
|
||||
(define (base-compile e)
|
||||
(parameterize ([current-namespace (make-base-namespace)])
|
||||
(compile e)))
|
||||
(define (kernel-compile e)
|
||||
(parameterize ([current-namespace (make-base-empty-namespace)])
|
||||
(namespace-require ''#%kernel)
|
||||
(compile e)))
|
||||
|
||||
(define (mz-tests mred?)
|
||||
(define dest (if mred? mr-dest mz-dest))
|
||||
(define (flags s)
|
||||
|
@ -97,7 +105,7 @@
|
|||
dest mred? #f
|
||||
`((#t (lib ,filename "tests" "mzscheme")))
|
||||
null
|
||||
null
|
||||
#f
|
||||
`(,(flags "l") ,(string-append "tests/mzscheme/" filename)))
|
||||
(try-exe dest expect mred?)
|
||||
|
||||
|
@ -111,9 +119,10 @@
|
|||
`((,pfx (lib ,filename "tests" "mzscheme"))
|
||||
(#t (lib "scheme/init")))
|
||||
null
|
||||
null
|
||||
`(,(flags "ne")
|
||||
,(format "(#%require '~a~a)"
|
||||
#f
|
||||
`(,(flags "lne")
|
||||
"scheme/base"
|
||||
,(format "(require '~a~a)"
|
||||
(or pfx "")
|
||||
(regexp-replace #rx"[.].*$" filename ""))))
|
||||
(try-exe dest expect mred?))])
|
||||
|
@ -128,7 +137,8 @@
|
|||
dest mred? #f
|
||||
`((#t ,path))
|
||||
null
|
||||
`(#%require (file ,(path->string path)))
|
||||
(base-compile
|
||||
`(namespace-require '(file ,(path->string path))))
|
||||
`(,(flags ""))))
|
||||
(try-exe dest expect mred?)
|
||||
|
||||
|
@ -140,7 +150,8 @@
|
|||
dest mred? #f
|
||||
`((#t (file ,(path->string path))))
|
||||
null
|
||||
`(#%require (file ,(path->string path)))
|
||||
(base-compile
|
||||
`(namespace-require '(file ,(path->string path))))
|
||||
`(,(flags ""))))
|
||||
(try-exe dest expect mred?)
|
||||
|
||||
|
@ -152,7 +163,8 @@
|
|||
dest mred? #f
|
||||
`((#f ,filename))
|
||||
null
|
||||
`(#%require ',(string->symbol (regexp-replace #rx"[.].*$" filename "")))
|
||||
(base-compile
|
||||
`(namespace-require '',(string->symbol (regexp-replace #rx"[.].*$" filename ""))))
|
||||
`(,(flags ""))))
|
||||
(try-exe dest expect mred?)
|
||||
|
||||
|
@ -164,23 +176,33 @@
|
|||
`((#t (lib ,filename "tests" "mzscheme"))
|
||||
(#t (lib "embed-me3.ss" "tests" "mzscheme")))
|
||||
null
|
||||
`(begin
|
||||
(#%require (lib "embed-me3.ss" "tests" "mzscheme"))
|
||||
(#%require (lib ,filename "tests" "mzscheme")))
|
||||
(base-compile
|
||||
`(begin
|
||||
(namespace-require '(lib "embed-me3.ss" "tests" "mzscheme"))
|
||||
(namespace-require '(lib ,filename "tests" "mzscheme"))))
|
||||
`(,(flags "")))
|
||||
(try-exe dest (string-append "3 is here, too? #t\n" expect) mred?)
|
||||
|
||||
;; Try a literal file
|
||||
(printf ">>>literal\n")
|
||||
(prepare dest filename)
|
||||
(make-embedding-executable
|
||||
dest mred? #f
|
||||
`((#t (lib ,filename "tests" "mzscheme")))
|
||||
(list (build-path (collection-path "tests" "mzscheme") "embed-me4.ss"))
|
||||
`(with-output-to-file "stdout"
|
||||
(lambda () (display "... and more!\n"))
|
||||
'append)
|
||||
`(,(flags "l") ,(string-append "tests/mzscheme/" filename)))
|
||||
(let ([tmp (make-temporary-file)])
|
||||
(with-output-to-file tmp
|
||||
#:exists 'truncate
|
||||
(lambda ()
|
||||
(write (kernel-compile
|
||||
'(namespace-require ''#%kernel)))))
|
||||
(make-embedding-executable
|
||||
dest mred? #f
|
||||
`((#t (lib ,filename "tests" "mzscheme")))
|
||||
(list
|
||||
tmp
|
||||
(build-path (collection-path "tests" "mzscheme") "embed-me4.ss"))
|
||||
`(with-output-to-file "stdout"
|
||||
(lambda () (display "... and more!\n"))
|
||||
'append)
|
||||
`(,(flags "l") ,(string-append "tests/mzscheme/" filename)))
|
||||
(delete-file tmp))
|
||||
(try-exe dest (string-append
|
||||
"This is the literal expression 4.\n"
|
||||
"... and more!\n"
|
||||
|
@ -196,13 +218,14 @@
|
|||
dest mred? #f
|
||||
'((#t scheme/base))
|
||||
null
|
||||
`(begin
|
||||
(#%require scheme/base)
|
||||
(define (out s)
|
||||
(with-output-to-file "stdout"
|
||||
(lambda () (printf s))
|
||||
#:exists 'append))
|
||||
(out "\uA9, \u7238, and \U1D670\n"))
|
||||
(base-compile
|
||||
'(begin
|
||||
(require scheme/base)
|
||||
(eval '(define (out s)
|
||||
(with-output-to-file "stdout"
|
||||
(lambda () (printf s))
|
||||
#:exists 'append)))
|
||||
(out "\uA9, \u7238, and \U1D670\n")))
|
||||
`(,(flags "ne") "(out \"\u7237...\U1D671\n\")"))
|
||||
(try-exe dest "\uA9, \u7238, and \U1D670\n\u7237...\U1D671\n" mred?))
|
||||
|
||||
|
@ -215,7 +238,7 @@
|
|||
mr-dest #t #f
|
||||
`((#t (lib "embed-me5.ss" "tests" "mzscheme")))
|
||||
null
|
||||
null
|
||||
#f
|
||||
`("-l" "tests/mzscheme/embed-me5.ss"))
|
||||
(try-exe mr-dest "This is 5: #<class:button%>\n" #t))
|
||||
|
||||
|
@ -278,10 +301,8 @@
|
|||
|
||||
(void)))
|
||||
|
||||
#| REMOVEME
|
||||
(mzc-tests #f)
|
||||
(mzc-tests #t)
|
||||
|#
|
||||
|
||||
(require dynext/file)
|
||||
(define (extension-test mred?)
|
||||
|
|
|
@ -88,11 +88,17 @@
|
|||
(define (capture-output thunk)
|
||||
(if (file-exists? "tmp-catch-out")
|
||||
(delete-file "tmp-catch-out"))
|
||||
(with-output-to-file "tmp-catch-out"
|
||||
thunk)
|
||||
(call-with-input-file "tmp-catch-out"
|
||||
(lambda (p)
|
||||
(get-string-n p 1024))))
|
||||
(dynamic-wind
|
||||
(lambda () 'nothing)
|
||||
(lambda ()
|
||||
(with-output-to-file "tmp-catch-out"
|
||||
thunk)
|
||||
(call-with-input-file "tmp-catch-out"
|
||||
(lambda (p)
|
||||
(get-string-n p 1024))))
|
||||
(lambda ()
|
||||
(if (file-exists? "tmp-catch-out")
|
||||
(delete-file "tmp-catch-out")))))
|
||||
|
||||
(define (check-test expr got expected)
|
||||
(set! checked (+ 1 checked))
|
||||
|
|
8
src/configure
vendored
8
src/configure
vendored
|
@ -1360,7 +1360,7 @@ Optional Features:
|
|||
--enable-gprof compile for profiling with gprof (gcc only)
|
||||
--enable-gcov compile to gather gcov statistics (gcc3 only)
|
||||
--enable-noopt drop -O C flags
|
||||
--enable-sdk=<path> use Mac OS X SDK directory
|
||||
--enable-sdk=<path> use Mac OS X 10.4 SDK directory
|
||||
--enable-xonx compile X11 (not Quartz) MrEd for Mac OS X
|
||||
--enable-libfw install Mac OS X frameworks to /Library/Frameworks
|
||||
--enable-userfw install Mac OS X frameworks to ~/Library/Frameworks
|
||||
|
@ -5849,10 +5849,8 @@ case $OS in
|
|||
Darwin)
|
||||
|
||||
if test "${enable_sdk}" != "" ; then
|
||||
PREFLAGS="$PREFLAGS -I${enable_sdk}/usr/include"
|
||||
PREFLAGS="$PREFLAGS -F${enable_sdk}/System/Library/Frameworks/"
|
||||
LDFLAGS="$LDFLAGS -L${enable_sdk}/usr/lib"
|
||||
LDFLAGS="$LDFLAGS -F${enable_sdk}/System/Library/Frameworks/"
|
||||
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4 -DEXTRA_EXCEPTION_STUBS"
|
||||
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4"
|
||||
fi
|
||||
|
||||
PREFLAGS="$PREFLAGS -DOS_X -D_DARWIN_UNLIMITED_SELECT"
|
||||
|
|
|
@ -134,7 +134,7 @@ $(MRFW) : $(MZSCHEMEDEPS) $(MREDOBJECTS) $(@WXLIBS@) $(MRSTATIC_STUB) $(MRFWRES)
|
|||
$(MREDLINKER) $(MREDLDFLAGS) -dynamiclib -o $(MRFW) -Wl,-headerpad_max_install_names ../mzscheme/libmzscheme.@LIBSFX@ ../mzscheme/libmzgc.@LIBSFX@ $(@WXLIBS@) $(GUILIBS_@WXVARIANT@) @X_EXTRA_LIBS@
|
||||
|
||||
MrEd@CGC@.app/Contents/MacOS/MrEd@CGC@: $(MRFWRES) $(MRFW) mrmain.@LTO@
|
||||
$(MREDLINKER) -o MrEd@CGC@.app/Contents/MacOS/MrEd@CGC@ mrmain.@LTO@ -Wl,-headerpad_max_install_names -F. -framework PLT_MrEd -framework Carbon -framework Cocoa @PROFFLAGS@
|
||||
$(MREDLINKER) $(MREDLDFLAGS) -o MrEd@CGC@.app/Contents/MacOS/MrEd@CGC@ mrmain.@LTO@ -Wl,-headerpad_max_install_names -F. -framework PLT_MrEd -framework Carbon -framework Cocoa @PROFFLAGS@
|
||||
/usr/bin/install_name_tool -change "PLT_MrEd.framework/Versions/$(FWVERSION)/PLT_MrEd" "@executable_path/../../../PLT_MrEd.framework/Versions/$(FWVERSION)/PLT_MrEd" MrEd@CGC@.app/Contents/MacOS/MrEd@CGC@
|
||||
|
||||
$(MRFWRES): $(srcdir)/../mac/osx_appl.ss $(srcdir)/../mac/cw/MrEd.r
|
||||
|
|
|
@ -1372,7 +1372,7 @@ MRFW = PLT_MrEd.framework/Versions/$(FWVERSION)_3m/PLT_MrEd
|
|||
MRFWRES = PLT_MrEd.framework/Versions/$(FWVERSION)_3m/Resources/PLT_MrEd.rsrc
|
||||
|
||||
../MrEd@MMM@.app/Contents/MacOS/MrEd@MMM@: $(MRFWRES) $(MRFW) mrmain.@LTO@
|
||||
$(MREDLINKER) -o ../MrEd@MMM@.app/Contents/MacOS/MrEd@MMM@ mrmain.@LTO@ -Wl,-headerpad_max_install_names -F. -framework PLT_MrEd -framework Carbon -framework Cocoa
|
||||
$(MREDLINKER) $(LDFLAGS) -o ../MrEd@MMM@.app/Contents/MacOS/MrEd@MMM@ mrmain.@LTO@ -Wl,-headerpad_max_install_names -F. -framework PLT_MrEd -framework Carbon -framework Cocoa
|
||||
mkdir -p "../PLT_MrEd.framework/Versions/$(FWVERSION)_3m"
|
||||
cp "$(MRFW)" "../$(MRFW)"
|
||||
rm -rf "../PLT_MrEd.framework/Versions/$(FWVERSION)_3m/Resources"
|
||||
|
@ -1380,7 +1380,7 @@ MRFWRES = PLT_MrEd.framework/Versions/$(FWVERSION)_3m/Resources/PLT_MrEd.rsrc
|
|||
/usr/bin/install_name_tool -change "PLT_MrEd.framework/Versions/$(FWVERSION)_3m/PLT_MrEd" "@executable_path/../../../PLT_MrEd.framework/Versions/$(FWVERSION)_3m/PLT_MrEd" "../MrEd@MMM@.app/Contents/MacOS/MrEd@MMM@"
|
||||
|
||||
$(MRFW) : $(XOBJS) $(@WXVARIANT@_PLAIN_OBJS) ../../mzscheme/libmzscheme3m.@LIBSFX@ wx_font.o $(MRFWRES)
|
||||
$(MREDLINKER) -dynamiclib -o $(MRFW) -Wl,-headerpad_max_install_names $(XOBJS) $(@WXVARIANT@_PLAIN_OBJS) ../../mzscheme/libmzscheme3m.@LIBSFX@ $(@WXVARIANT@_LIBS) @X_EXTRA_LIBS@ wx_font.o
|
||||
$(MREDLINKER) $(LDFLAGS) -dynamiclib -o $(MRFW) -Wl,-headerpad_max_install_names $(XOBJS) $(@WXVARIANT@_PLAIN_OBJS) ../../mzscheme/libmzscheme3m.@LIBSFX@ $(@WXVARIANT@_LIBS) @X_EXTRA_LIBS@ wx_font.o
|
||||
|
||||
$(MRFWRES): $(srcdir)/../../mac/osx_appl.ss $(srcdir)/../../mac/cw/MrEd.r
|
||||
rm -rf PLT_MrEd.framework/Resources PLT_MrEd.framework/PLT_MrEd
|
||||
|
|
|
@ -139,12 +139,12 @@ MZFW = PLT_MzScheme.framework/Versions/$(FWVERSION)/PLT_MzScheme
|
|||
|
||||
$(MZFW): libmzscheme.@LIBSFX@ libmzgc.@LIBSFX@ $(SPECIALIZINGOBJECTS)
|
||||
mkdir -p PLT_MzScheme.framework/Versions/$(FWVERSION)
|
||||
@MZLINKER@ -o $(MZFW) -framework CoreFoundation -dynamiclib -all_load $(SPECIALIZINGOBJECTS) libmzscheme.@LIBSFX@ libmzgc.@LIBSFX@ @LDFLAGS@ @LIBS@
|
||||
@MZLINKER@ -o $(MZFW) @LDFLAGS@ -framework CoreFoundation -dynamiclib -all_load $(SPECIALIZINGOBJECTS) libmzscheme.@LIBSFX@ libmzgc.@LIBSFX@ @LIBS@
|
||||
rm -f PLT_MzScheme.framework/PLT_MzScheme
|
||||
ln -s Versions/$(FWVERSION)/PLT_MzScheme PLT_MzScheme.framework/PLT_MzScheme
|
||||
|
||||
mzscheme@CGC@@OSX@: $(MZFW) main.@LTO@
|
||||
@MZLINKER@ -o mzscheme@CGC@ @PROFFLAGS@ main.@LTO@ -Wl,-headerpad_max_install_names -F. -framework PLT_MzScheme
|
||||
@MZLINKER@ -o mzscheme@CGC@ @PROFFLAGS@ @LDFLAGS@ main.@LTO@ -Wl,-headerpad_max_install_names -F. -framework PLT_MzScheme @LIBS@
|
||||
/usr/bin/install_name_tool -change "PLT_MzScheme.framework/Versions/$(FWVERSION)/PLT_MzScheme" "@executable_path/PLT_MzScheme.framework/Versions/$(FWVERSION)/PLT_MzScheme" "mzscheme@CGC@"
|
||||
|
||||
# OSKit ----------------------------------------
|
||||
|
|
|
@ -262,13 +262,14 @@ static int finish_cmd_line_run(FinishArgs *fa, Repl_Proc repl)
|
|||
if (fa->eval_kind[i] == mzcmd_EVAL) {
|
||||
scheme_eval_string_all_with_prompt(fa->evals_and_loads[i], fa->global_env, 2);
|
||||
} else if (fa->eval_kind[i] == mzcmd_EMBEDDED) {
|
||||
Scheme_Object *s, *e, *a[2], *eload;
|
||||
Scheme_Object *s, *e, *a[3], *eload;
|
||||
eload = scheme_builtin_value("embedded-load");
|
||||
s = scheme_make_utf8_string(fa->evals_and_loads[i]);
|
||||
e = scheme_make_utf8_string(fa->evals_and_loads[i] + strlen(fa->evals_and_loads[i]) + 1);
|
||||
a[0] = s;
|
||||
a[1] = e;
|
||||
scheme_apply(eload, 2, a);
|
||||
a[2] = scheme_make_false();
|
||||
scheme_apply(eload, 3, a);
|
||||
} else {
|
||||
Scheme_Object *a[1], *nsreq;
|
||||
nsreq = scheme_builtin_value("namespace-require");
|
||||
|
@ -428,30 +429,6 @@ static int finish_cmd_line_run(FinishArgs *fa, Repl_Proc repl)
|
|||
return exit_val;
|
||||
}
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
static void init_collection_paths(Scheme_Env *global_env, Scheme_Object *extra_dirs)
|
||||
{
|
||||
mz_jmp_buf * volatile save, newbuf;
|
||||
Scheme_Thread * volatile p;
|
||||
p = scheme_get_current_thread();
|
||||
save = p->error_buf;
|
||||
p->error_buf = &newbuf;
|
||||
if (!scheme_setjmp(newbuf)) {
|
||||
Scheme_Object *clcp, *flcp, *a[1];
|
||||
|
||||
clcp = scheme_builtin_value("current-library-collection-paths");
|
||||
flcp = scheme_builtin_value("find-library-collection-paths");
|
||||
|
||||
if (clcp && flcp) {
|
||||
a[0] = extra_dirs;
|
||||
a[0] = _scheme_apply(flcp, 1, a);
|
||||
_scheme_apply(clcp, 1, a);
|
||||
}
|
||||
}
|
||||
p->error_buf = save;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_OSKIT_CONSOLE
|
||||
/* Hack to disable normal input mode: */
|
||||
int osk_not_console = 0;
|
||||
|
@ -1058,7 +1035,7 @@ static int run_from_cmd_line(int argc, char *_argv[],
|
|||
l = SCHEME_CDR(l);
|
||||
}
|
||||
|
||||
init_collection_paths(global_env, r);
|
||||
scheme_init_collection_paths(global_env, r);
|
||||
}
|
||||
#endif /* NO_FILE_SYSTEM_UTILS */
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ AC_ARG_ENABLE(gcov, [ --enable-gcov compile to gather gcov statist
|
|||
|
||||
AC_ARG_ENABLE(noopt, [ --enable-noopt drop -O C flags])
|
||||
|
||||
AC_ARG_ENABLE(noopt, [ --enable-sdk=<path> use Mac OS X SDK directory])
|
||||
AC_ARG_ENABLE(noopt, [ --enable-sdk=<path> use Mac OS X 10.4 SDK directory])
|
||||
|
||||
AC_ARG_ENABLE(xonx, [ --enable-xonx compile X11 (not Quartz) MrEd for Mac OS X])
|
||||
AC_ARG_ENABLE(libfw, [ --enable-libfw install Mac OS X frameworks to /Library/Frameworks])
|
||||
|
@ -591,10 +591,8 @@ case $OS in
|
|||
Darwin)
|
||||
|
||||
if test "${enable_sdk}" != "" ; then
|
||||
PREFLAGS="$PREFLAGS -I${enable_sdk}/usr/include"
|
||||
PREFLAGS="$PREFLAGS -F${enable_sdk}/System/Library/Frameworks/"
|
||||
LDFLAGS="$LDFLAGS -L${enable_sdk}/usr/lib"
|
||||
LDFLAGS="$LDFLAGS -F${enable_sdk}/System/Library/Frameworks/"
|
||||
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4 -DEXTRA_EXCEPTION_STUBS"
|
||||
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4"
|
||||
fi
|
||||
|
||||
PREFLAGS="$PREFLAGS -DOS_X -D_DARWIN_UNLIMITED_SELECT"
|
||||
|
|
|
@ -340,7 +340,7 @@ $(MZFWMMM): ../libmzscheme3m.@LIBSFX@
|
|||
ln -s Versions/$(FWVERSION)_3m/PLT_MzScheme PLT_MzScheme.framework/PLT_MzScheme
|
||||
|
||||
../mzscheme@MMM@@OSX@: $(MZFWMMM) main.@LTO@
|
||||
@MZLINKER@ -o ../mzscheme@MMM@ @PROFFLAGS@ main.@LTO@ -Wl,-headerpad_max_install_names -F. -framework PLT_MzScheme
|
||||
@MZLINKER@ -o ../mzscheme@MMM@ @PROFFLAGS@ @LDFLAGS@ main.@LTO@ -Wl,-headerpad_max_install_names -F. -framework PLT_MzScheme
|
||||
mkdir -p "../PLT_MzScheme.framework/Versions/$(FWVERSION)_3m"
|
||||
cp "PLT_MzScheme.framework/Versions/$(FWVERSION)_3m/PLT_MzScheme" "../PLT_MzScheme.framework/Versions/$(FWVERSION)_3m/PLT_MzScheme"
|
||||
/usr/bin/install_name_tool -change "PLT_MzScheme.framework/Versions/$(FWVERSION)_3m/PLT_MzScheme" "@executable_path/PLT_MzScheme.framework/Versions/$(FWVERSION)_3m/PLT_MzScheme" "../mzscheme@MMM@"
|
||||
|
|
|
@ -128,6 +128,7 @@ scheme_eval_string_all
|
|||
scheme_eval_string_with_prompt
|
||||
scheme_eval_string_multi_with_prompt
|
||||
scheme_eval_string_all_with_prompt
|
||||
scheme_eval_module_string
|
||||
_scheme_apply_known_prim_closure
|
||||
_scheme_apply_known_prim_closure_multi
|
||||
_scheme_apply_prim_closure
|
||||
|
|
|
@ -128,6 +128,7 @@ scheme_eval_string_all
|
|||
scheme_eval_string_with_prompt
|
||||
scheme_eval_string_multi_with_prompt
|
||||
scheme_eval_string_all_with_prompt
|
||||
scheme_eval_module_string
|
||||
_scheme_apply_known_prim_closure
|
||||
_scheme_apply_known_prim_closure_multi
|
||||
_scheme_apply_prim_closure
|
||||
|
|
|
@ -126,6 +126,7 @@ EXPORTS
|
|||
scheme_eval_string_with_prompt
|
||||
scheme_eval_string_multi_with_prompt
|
||||
scheme_eval_string_all_with_prompt
|
||||
scheme_eval_module_string
|
||||
scheme_call_with_prompt
|
||||
scheme_call_with_prompt_multi
|
||||
scheme_values
|
||||
|
|
|
@ -126,6 +126,7 @@ EXPORTS
|
|||
scheme_eval_string_with_prompt
|
||||
scheme_eval_string_multi_with_prompt
|
||||
scheme_eval_string_all_with_prompt
|
||||
scheme_eval_module_string
|
||||
scheme_call_with_prompt
|
||||
scheme_call_with_prompt_multi
|
||||
scheme_values
|
||||
|
|
|
@ -1665,6 +1665,8 @@ MZ_EXTERN Scheme_Object *scheme_set_run_cmd(char *s);
|
|||
MZ_EXTERN void scheme_set_collects_path(Scheme_Object *p);
|
||||
MZ_EXTERN void scheme_set_original_dir(Scheme_Object *d);
|
||||
|
||||
MZ_EXTERN void scheme_init_collection_paths(Scheme_Env *global_env, Scheme_Object *extra_dirs);
|
||||
|
||||
/* Initialization */
|
||||
MZ_EXTERN Scheme_Env *scheme_basic_env(void);
|
||||
MZ_EXTERN void scheme_reset_overflow(void);
|
||||
|
@ -1686,6 +1688,11 @@ MZ_EXTERN void scheme_set_actual_main(int (*m)(int argc, char **argv));
|
|||
MZ_EXTERN void scheme_set_stack_base(void *base, int no_auto_statics);
|
||||
MZ_EXTERN void scheme_set_stack_bounds(void *base, void *deepest, int no_auto_statics);
|
||||
|
||||
/* More automatic start-up: */
|
||||
typedef int (*Scheme_Main)(Scheme_Env *env, int argc, char **argv);
|
||||
MZ_EXTERN int scheme_setup(int no_auto_statics, Scheme_Main _main, int argc, char **argv);
|
||||
|
||||
|
||||
MZ_EXTERN void scheme_register_static(void *ptr, long size);
|
||||
#if defined(MUST_REGISTER_GLOBALS) || defined(GC_MIGHT_USE_REGISTERED_STATICS)
|
||||
# define MZ_REGISTER_STATIC(x) scheme_register_static((void *)&x, sizeof(x))
|
||||
|
|
|
@ -323,8 +323,12 @@ static void do_scheme_rep(Scheme_Env *env)
|
|||
{
|
||||
/* enter read-eval-print loop */
|
||||
{
|
||||
Scheme_Object *rep;
|
||||
rep = scheme_builtin_value("read-eval-print-loop");
|
||||
Scheme_Object *rep, *a[2];
|
||||
|
||||
a[0] = scheme_intern_symbol("scheme/base");
|
||||
a[1] = scheme_intern_symbol("read-eval-print-loop");
|
||||
rep = scheme_dynamic_require(2, a);
|
||||
|
||||
if (rep) {
|
||||
scheme_apply(rep, 0, NULL);
|
||||
printf("\n");
|
||||
|
|
|
@ -64,7 +64,7 @@ Scheme_Object *scheme_eval_compiled_sized_string(const char *str, int len, Schem
|
|||
|
||||
void scheme_add_embedded_builtins(Scheme_Env *env)
|
||||
{
|
||||
#define EVAL_ONE_STR(str) scheme_eval_string(str, env)
|
||||
#define EVAL_ONE_STR(str) scheme_eval_module_string(str, env)
|
||||
#define EVAL_ONE_SIZED_STR(str, len) scheme_eval_compiled_sized_string(str, len, env)
|
||||
|
||||
#if USE_COMPILED_STARTUP
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
117,101,115,61,120,73,108,101,116,114,101,99,45,118,97,108,117,101,115,66,108,
|
||||
97,109,98,100,97,1,20,112,97,114,97,109,101,116,101,114,105,122,97,116,105,
|
||||
111,110,45,107,101,121,61,118,73,100,101,102,105,110,101,45,118,97,108,117,101,
|
||||
115,98,10,34,11,8,167,184,94,159,2,16,34,34,159,2,15,34,34,16,20,
|
||||
115,98,10,34,11,8,191,184,94,159,2,16,34,34,159,2,15,34,34,16,20,
|
||||
2,3,2,2,2,5,2,2,2,6,2,2,2,7,2,2,2,8,2,2,2,
|
||||
9,2,2,2,4,2,2,2,10,2,2,2,11,2,2,2,12,2,2,97,35,
|
||||
11,8,167,184,93,159,2,15,34,35,16,2,2,13,161,2,2,35,2,13,2,
|
||||
2,2,13,97,10,11,11,8,167,184,16,0,97,10,36,11,8,167,184,16,0,
|
||||
11,8,191,184,93,159,2,15,34,35,16,2,2,13,161,2,2,35,2,13,2,
|
||||
2,2,13,97,10,11,11,8,191,184,16,0,97,10,36,11,8,191,184,16,0,
|
||||
13,16,4,34,29,11,11,2,2,11,18,98,64,104,101,114,101,8,31,8,30,
|
||||
8,29,8,28,8,27,27,248,22,180,3,23,196,1,249,22,173,3,80,158,37,
|
||||
34,251,22,73,2,17,248,22,88,23,200,2,12,249,22,63,2,1,248,22,90,
|
||||
|
@ -28,14 +28,14 @@
|
|||
35,34,35,28,248,22,71,248,22,65,23,195,2,248,22,64,193,249,22,173,3,
|
||||
80,158,37,34,251,22,73,2,17,248,22,64,23,200,2,249,22,63,2,12,248,
|
||||
22,65,23,202,1,11,18,100,10,8,31,8,30,8,29,8,28,8,27,16,4,
|
||||
11,11,2,18,3,1,7,101,110,118,55,50,57,52,16,4,11,11,2,19,3,
|
||||
1,7,101,110,118,55,50,57,53,27,248,22,65,248,22,180,3,23,197,1,28,
|
||||
11,11,2,18,3,1,7,101,110,118,55,51,48,52,16,4,11,11,2,19,3,
|
||||
1,7,101,110,118,55,51,48,53,27,248,22,65,248,22,180,3,23,197,1,28,
|
||||
248,22,71,23,194,2,20,15,159,35,34,35,28,248,22,71,248,22,65,23,195,
|
||||
2,248,22,64,193,249,22,173,3,80,158,37,34,250,22,73,2,20,248,22,73,
|
||||
249,22,73,248,22,73,2,21,248,22,64,23,202,2,251,22,73,2,17,2,21,
|
||||
2,21,249,22,63,2,4,248,22,65,23,205,1,18,100,11,8,31,8,30,8,
|
||||
29,8,28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,55,50,57,55,
|
||||
16,4,11,11,2,19,3,1,7,101,110,118,55,50,57,56,248,22,180,3,193,
|
||||
29,8,28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,55,51,48,55,
|
||||
16,4,11,11,2,19,3,1,7,101,110,118,55,51,48,56,248,22,180,3,193,
|
||||
27,248,22,180,3,194,249,22,63,248,22,73,248,22,64,196,248,22,65,195,27,
|
||||
248,22,65,248,22,180,3,23,197,1,249,22,173,3,80,158,37,34,28,248,22,
|
||||
51,248,22,174,3,248,22,64,23,198,2,27,249,22,2,32,0,89,162,8,44,
|
||||
|
@ -65,8 +65,8 @@
|
|||
65,202,251,22,73,2,17,28,249,22,140,8,248,22,174,3,248,22,64,23,201,
|
||||
2,64,101,108,115,101,10,248,22,64,23,198,2,250,22,74,2,20,9,248,22,
|
||||
65,23,201,1,249,22,63,2,3,248,22,65,23,203,1,99,8,31,8,30,8,
|
||||
29,8,28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,55,51,50,48,
|
||||
16,4,11,11,2,19,3,1,7,101,110,118,55,51,50,49,18,158,94,10,64,
|
||||
29,8,28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,55,51,51,48,
|
||||
16,4,11,11,2,19,3,1,7,101,110,118,55,51,51,49,18,158,94,10,64,
|
||||
118,111,105,100,8,47,27,248,22,65,248,22,180,3,196,249,22,173,3,80,158,
|
||||
37,34,28,248,22,51,248,22,174,3,248,22,64,197,250,22,73,2,26,248,22,
|
||||
73,248,22,64,199,248,22,88,198,27,248,22,174,3,248,22,64,197,250,22,73,
|
||||
|
@ -100,246 +100,246 @@
|
|||
EVAL_ONE_SIZED_STR((char *)expr, 2046);
|
||||
}
|
||||
{
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,51,46,57,57,46,48,46,49,56,61,0,0,0,1,0,0,3,0,
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,51,46,57,57,46,48,46,49,56,60,0,0,0,1,0,0,3,0,
|
||||
16,0,21,0,38,0,53,0,71,0,87,0,97,0,115,0,135,0,151,0,169,
|
||||
0,200,0,229,0,251,0,9,1,15,1,29,1,34,1,44,1,52,1,80,1,
|
||||
112,1,157,1,202,1,226,1,9,2,11,2,20,2,77,2,167,3,176,3,217,
|
||||
3,51,5,155,5,3,6,119,6,133,6,176,6,192,6,42,8,56,8,219,8,
|
||||
226,9,232,10,239,10,245,10,117,11,130,11,243,11,89,12,102,12,124,12,76,
|
||||
13,236,13,51,15,59,15,67,15,93,15,195,15,0,0,0,19,0,0,29,11,
|
||||
11,72,112,97,116,104,45,115,116,114,105,110,103,63,64,98,115,98,115,76,110,
|
||||
111,114,109,97,108,45,99,97,115,101,45,112,97,116,104,74,45,99,104,101,99,
|
||||
107,45,114,101,108,112,97,116,104,77,45,99,104,101,99,107,45,99,111,108,108,
|
||||
101,99,116,105,111,110,75,99,111,108,108,101,99,116,105,111,110,45,112,97,116,
|
||||
104,69,45,102,105,110,100,45,99,111,108,77,99,104,101,99,107,45,115,117,102,
|
||||
102,105,120,45,99,97,108,108,79,112,97,116,104,45,114,101,112,108,97,99,101,
|
||||
45,115,117,102,102,105,120,75,112,97,116,104,45,97,100,100,45,115,117,102,102,
|
||||
105,120,77,108,111,97,100,47,117,115,101,45,99,111,109,112,105,108,101,100,1,
|
||||
29,102,105,110,100,45,108,105,98,114,97,114,121,45,99,111,108,108,101,99,116,
|
||||
105,111,110,45,112,97,116,104,115,1,27,112,97,116,104,45,108,105,115,116,45,
|
||||
115,116,114,105,110,103,45,62,112,97,116,104,45,108,105,115,116,1,20,102,105,
|
||||
110,100,45,101,120,101,99,117,116,97,98,108,101,45,112,97,116,104,73,101,109,
|
||||
98,101,100,100,101,100,45,108,111,97,100,65,113,117,111,116,101,29,94,2,17,
|
||||
68,35,37,112,97,114,97,109,122,11,64,108,111,111,112,69,101,120,101,99,45,
|
||||
102,105,108,101,67,119,105,110,100,111,119,115,6,25,25,112,97,116,104,32,111,
|
||||
114,32,118,97,108,105,100,45,112,97,116,104,32,115,116,114,105,110,103,6,29,
|
||||
29,126,97,58,32,105,110,118,97,108,105,100,32,114,101,108,97,116,105,118,101,
|
||||
32,112,97,116,104,58,32,126,115,6,42,42,126,97,58,32,99,111,108,108,101,
|
||||
99,116,105,111,110,32,110,111,116,32,102,111,117,110,100,58,32,126,115,32,105,
|
||||
110,32,97,110,121,32,111,102,58,32,126,115,6,42,42,112,97,116,104,32,40,
|
||||
102,111,114,32,97,110,121,32,115,121,115,116,101,109,41,32,111,114,32,118,97,
|
||||
108,105,100,45,112,97,116,104,32,115,116,114,105,110,103,6,21,21,115,116,114,
|
||||
105,110,103,32,111,114,32,98,121,116,101,32,115,116,114,105,110,103,6,36,36,
|
||||
99,97,110,110,111,116,32,97,100,100,32,97,32,115,117,102,102,105,120,32,116,
|
||||
111,32,97,32,114,111,111,116,32,112,97,116,104,58,32,5,0,68,35,37,107,
|
||||
101,114,110,101,108,27,20,14,159,80,158,35,49,250,80,158,38,50,249,22,27,
|
||||
11,80,158,40,49,22,142,12,10,248,22,188,4,23,196,2,28,248,22,166,5,
|
||||
23,194,2,12,87,94,248,22,143,8,23,194,1,248,80,159,36,53,35,195,28,
|
||||
248,22,71,23,195,2,9,27,248,22,64,23,196,2,27,28,248,22,187,12,23,
|
||||
195,2,23,194,1,28,248,22,186,12,23,195,2,249,22,188,12,23,196,1,250,
|
||||
80,158,41,47,248,22,138,13,2,20,11,10,250,80,158,39,47,248,22,138,13,
|
||||
2,20,23,197,1,10,28,23,193,2,249,22,63,248,22,190,12,249,22,188,12,
|
||||
23,198,1,247,22,139,13,27,248,22,65,23,200,1,28,248,22,71,23,194,2,
|
||||
9,27,248,22,64,23,195,2,27,28,248,22,187,12,23,195,2,23,194,1,28,
|
||||
248,22,186,12,23,195,2,249,22,188,12,23,196,1,250,80,158,46,47,248,22,
|
||||
138,13,2,20,11,10,250,80,158,44,47,248,22,138,13,2,20,23,197,1,10,
|
||||
28,23,193,2,249,22,63,248,22,190,12,249,22,188,12,23,198,1,247,22,139,
|
||||
13,248,80,159,44,52,35,248,22,65,23,199,1,87,94,23,193,1,248,80,159,
|
||||
42,52,35,248,22,65,23,197,1,87,94,23,193,1,27,248,22,65,23,198,1,
|
||||
28,248,22,71,23,194,2,9,27,248,22,64,23,195,2,27,28,248,22,187,12,
|
||||
23,195,2,23,194,1,28,248,22,186,12,23,195,2,249,22,188,12,23,196,1,
|
||||
250,80,158,44,47,248,22,138,13,2,20,11,10,250,80,158,42,47,248,22,138,
|
||||
13,2,20,23,197,1,10,28,23,193,2,249,22,63,248,22,190,12,249,22,188,
|
||||
12,23,198,1,247,22,139,13,248,80,159,42,52,35,248,22,65,23,199,1,248,
|
||||
80,159,40,52,35,248,22,65,196,249,80,159,36,37,35,2,7,195,27,248,22,
|
||||
163,12,23,195,2,28,23,193,2,192,87,94,23,193,1,28,248,22,135,6,23,
|
||||
195,2,27,248,22,185,12,195,28,192,192,248,22,186,12,195,11,87,94,28,28,
|
||||
248,22,164,12,23,195,2,10,27,248,22,163,12,23,196,2,28,23,193,2,192,
|
||||
87,94,23,193,1,28,248,22,135,6,23,196,2,27,248,22,185,12,23,197,2,
|
||||
28,23,193,2,192,87,94,23,193,1,248,22,186,12,23,197,2,11,12,250,22,
|
||||
170,8,76,110,111,114,109,97,108,45,112,97,116,104,45,99,97,115,101,6,42,
|
||||
42,112,97,116,104,32,40,102,111,114,32,97,110,121,32,115,121,115,116,101,109,
|
||||
41,32,111,114,32,118,97,108,105,100,45,112,97,116,104,32,115,116,114,105,110,
|
||||
103,23,197,2,28,28,248,22,164,12,23,195,2,249,22,140,8,248,22,165,12,
|
||||
23,197,2,2,21,249,22,140,8,247,22,154,7,2,21,27,28,248,22,135,6,
|
||||
23,196,2,23,195,2,248,22,144,7,248,22,168,12,23,197,2,28,249,22,151,
|
||||
13,0,21,35,114,120,34,94,91,92,92,93,91,92,92,93,91,63,93,91,92,
|
||||
92,93,34,23,195,2,28,248,22,135,6,195,248,22,171,12,195,194,27,248,22,
|
||||
174,6,23,195,1,249,22,172,12,248,22,147,7,250,22,157,13,0,6,35,114,
|
||||
120,34,47,34,28,249,22,151,13,0,22,35,114,120,34,91,47,92,92,93,91,
|
||||
46,32,93,43,91,47,92,92,93,42,36,34,23,201,2,23,199,1,250,22,157,
|
||||
13,0,19,35,114,120,34,91,32,46,93,43,40,91,47,92,92,93,42,41,36,
|
||||
34,23,202,1,6,2,2,92,49,80,158,42,35,2,21,28,248,22,135,6,194,
|
||||
248,22,171,12,194,193,87,94,28,27,248,22,163,12,23,196,2,28,23,193,2,
|
||||
192,87,94,23,193,1,28,248,22,135,6,23,196,2,27,248,22,185,12,23,197,
|
||||
2,28,23,193,2,192,87,94,23,193,1,248,22,186,12,23,197,2,11,12,250,
|
||||
22,170,8,23,196,2,2,22,23,197,2,28,248,22,185,12,23,195,2,12,248,
|
||||
22,187,10,249,22,132,10,248,22,164,6,250,22,183,6,2,23,23,200,1,23,
|
||||
201,1,247,22,23,87,94,28,27,248,22,163,12,23,196,2,28,23,193,2,192,
|
||||
87,94,23,193,1,28,248,22,135,6,23,196,2,27,248,22,185,12,23,197,2,
|
||||
28,23,193,2,192,87,94,23,193,1,248,22,186,12,23,197,2,11,12,250,22,
|
||||
170,8,23,196,2,2,22,23,197,2,28,248,22,185,12,23,195,2,12,248,22,
|
||||
187,10,249,22,132,10,248,22,164,6,250,22,183,6,2,23,23,200,1,23,201,
|
||||
1,247,22,23,87,94,87,94,28,27,248,22,163,12,23,196,2,28,23,193,2,
|
||||
192,87,94,23,193,1,28,248,22,135,6,23,196,2,27,248,22,185,12,23,197,
|
||||
2,28,23,193,2,192,87,94,23,193,1,248,22,186,12,23,197,2,11,12,250,
|
||||
22,170,8,195,2,22,23,197,2,28,248,22,185,12,23,195,2,12,248,22,187,
|
||||
10,249,22,132,10,248,22,164,6,250,22,183,6,2,23,199,23,201,1,247,22,
|
||||
23,249,22,3,89,162,42,35,48,9,223,2,33,36,196,248,22,187,10,249,22,
|
||||
162,10,23,196,1,247,22,23,87,94,87,94,249,80,159,36,37,35,2,7,195,
|
||||
249,22,3,80,159,36,51,35,196,251,80,159,38,40,35,2,7,32,0,89,162,
|
||||
42,35,43,9,222,33,38,197,198,32,40,89,162,42,40,57,65,99,108,111,111,
|
||||
112,222,33,41,28,248,22,71,23,199,2,87,94,23,198,1,248,23,196,1,251,
|
||||
22,183,6,2,24,23,199,1,28,248,22,71,23,203,2,87,94,23,202,1,23,
|
||||
201,1,250,22,1,22,181,12,23,204,1,23,205,1,23,198,1,27,249,22,181,
|
||||
12,248,22,64,23,202,2,23,199,2,28,248,22,176,12,23,194,2,27,250,22,
|
||||
1,22,181,12,23,197,1,23,202,2,28,248,22,176,12,23,194,2,192,87,94,
|
||||
23,193,1,27,248,22,65,23,202,1,28,248,22,71,23,194,2,87,94,23,193,
|
||||
1,248,23,199,1,251,22,183,6,2,24,23,202,1,28,248,22,71,23,206,2,
|
||||
87,94,23,205,1,23,204,1,250,22,1,22,181,12,23,207,1,23,208,1,23,
|
||||
201,1,27,249,22,181,12,248,22,64,23,197,2,23,202,2,28,248,22,176,12,
|
||||
23,194,2,27,250,22,1,22,181,12,23,197,1,204,28,248,22,176,12,193,192,
|
||||
253,2,40,203,204,205,206,23,15,248,22,65,201,253,2,40,202,203,204,205,206,
|
||||
248,22,65,200,87,94,23,193,1,27,248,22,65,23,201,1,28,248,22,71,23,
|
||||
194,2,87,94,23,193,1,248,23,198,1,251,22,183,6,2,24,23,201,1,28,
|
||||
248,22,71,23,205,2,87,94,23,204,1,23,203,1,250,22,1,22,181,12,23,
|
||||
206,1,23,207,1,23,200,1,27,249,22,181,12,248,22,64,23,197,2,23,201,
|
||||
2,28,248,22,176,12,23,194,2,27,250,22,1,22,181,12,23,197,1,203,28,
|
||||
248,22,176,12,193,192,253,2,40,202,203,204,205,206,248,22,65,201,253,2,40,
|
||||
201,202,203,204,205,248,22,65,200,27,247,22,140,13,253,2,40,198,199,200,201,
|
||||
202,198,87,95,28,28,248,22,164,12,23,194,2,10,27,248,22,163,12,23,195,
|
||||
2,28,23,193,2,192,87,94,23,193,1,28,248,22,135,6,23,195,2,27,248,
|
||||
22,185,12,23,196,2,28,23,193,2,192,87,94,23,193,1,248,22,186,12,23,
|
||||
196,2,11,12,252,22,170,8,23,200,2,2,25,34,23,198,2,23,199,2,28,
|
||||
28,248,22,135,6,23,195,2,10,248,22,187,6,23,195,2,87,94,23,194,1,
|
||||
12,252,22,170,8,23,200,2,2,26,35,23,198,2,23,199,1,91,159,37,11,
|
||||
90,161,37,34,11,248,22,184,12,23,197,2,87,94,23,195,1,87,94,28,192,
|
||||
12,250,22,171,8,23,201,1,2,27,23,199,1,249,22,7,194,195,91,159,36,
|
||||
112,1,157,1,202,1,226,1,9,2,11,2,68,2,158,3,167,3,208,3,42,
|
||||
5,146,5,250,5,110,6,124,6,167,6,183,6,33,8,47,8,210,8,217,9,
|
||||
223,10,230,10,236,10,108,11,121,11,234,11,80,12,93,12,115,12,67,13,227,
|
||||
13,42,15,50,15,58,15,84,15,194,15,0,0,6,19,0,0,29,11,11,72,
|
||||
112,97,116,104,45,115,116,114,105,110,103,63,64,98,115,98,115,76,110,111,114,
|
||||
109,97,108,45,99,97,115,101,45,112,97,116,104,74,45,99,104,101,99,107,45,
|
||||
114,101,108,112,97,116,104,77,45,99,104,101,99,107,45,99,111,108,108,101,99,
|
||||
116,105,111,110,75,99,111,108,108,101,99,116,105,111,110,45,112,97,116,104,69,
|
||||
45,102,105,110,100,45,99,111,108,77,99,104,101,99,107,45,115,117,102,102,105,
|
||||
120,45,99,97,108,108,79,112,97,116,104,45,114,101,112,108,97,99,101,45,115,
|
||||
117,102,102,105,120,75,112,97,116,104,45,97,100,100,45,115,117,102,102,105,120,
|
||||
77,108,111,97,100,47,117,115,101,45,99,111,109,112,105,108,101,100,1,29,102,
|
||||
105,110,100,45,108,105,98,114,97,114,121,45,99,111,108,108,101,99,116,105,111,
|
||||
110,45,112,97,116,104,115,1,27,112,97,116,104,45,108,105,115,116,45,115,116,
|
||||
114,105,110,103,45,62,112,97,116,104,45,108,105,115,116,1,20,102,105,110,100,
|
||||
45,101,120,101,99,117,116,97,98,108,101,45,112,97,116,104,73,101,109,98,101,
|
||||
100,100,101,100,45,108,111,97,100,65,113,117,111,116,101,29,94,2,17,68,35,
|
||||
37,112,97,114,97,109,122,11,64,108,111,111,112,69,101,120,101,99,45,102,105,
|
||||
108,101,67,119,105,110,100,111,119,115,6,25,25,112,97,116,104,32,111,114,32,
|
||||
118,97,108,105,100,45,112,97,116,104,32,115,116,114,105,110,103,6,29,29,126,
|
||||
97,58,32,105,110,118,97,108,105,100,32,114,101,108,97,116,105,118,101,32,112,
|
||||
97,116,104,58,32,126,115,6,42,42,126,97,58,32,99,111,108,108,101,99,116,
|
||||
105,111,110,32,110,111,116,32,102,111,117,110,100,58,32,126,115,32,105,110,32,
|
||||
97,110,121,32,111,102,58,32,126,115,6,42,42,112,97,116,104,32,40,102,111,
|
||||
114,32,97,110,121,32,115,121,115,116,101,109,41,32,111,114,32,118,97,108,105,
|
||||
100,45,112,97,116,104,32,115,116,114,105,110,103,6,21,21,115,116,114,105,110,
|
||||
103,32,111,114,32,98,121,116,101,32,115,116,114,105,110,103,6,36,36,99,97,
|
||||
110,110,111,116,32,97,100,100,32,97,32,115,117,102,102,105,120,32,116,111,32,
|
||||
97,32,114,111,111,116,32,112,97,116,104,58,32,5,0,27,20,14,159,80,158,
|
||||
35,49,250,80,158,38,50,249,22,27,11,80,158,40,49,22,142,12,10,248,22,
|
||||
188,4,23,196,2,28,248,22,166,5,23,194,2,12,87,94,248,22,143,8,23,
|
||||
194,1,248,80,159,36,53,35,195,28,248,22,71,23,195,2,9,27,248,22,64,
|
||||
23,196,2,27,28,248,22,187,12,23,195,2,23,194,1,28,248,22,186,12,23,
|
||||
195,2,249,22,188,12,23,196,1,250,80,158,41,47,248,22,138,13,2,20,11,
|
||||
10,250,80,158,39,47,248,22,138,13,2,20,23,197,1,10,28,23,193,2,249,
|
||||
22,63,248,22,190,12,249,22,188,12,23,198,1,247,22,139,13,27,248,22,65,
|
||||
23,200,1,28,248,22,71,23,194,2,9,27,248,22,64,23,195,2,27,28,248,
|
||||
22,187,12,23,195,2,23,194,1,28,248,22,186,12,23,195,2,249,22,188,12,
|
||||
23,196,1,250,80,158,46,47,248,22,138,13,2,20,11,10,250,80,158,44,47,
|
||||
248,22,138,13,2,20,23,197,1,10,28,23,193,2,249,22,63,248,22,190,12,
|
||||
249,22,188,12,23,198,1,247,22,139,13,248,80,159,44,52,35,248,22,65,23,
|
||||
199,1,87,94,23,193,1,248,80,159,42,52,35,248,22,65,23,197,1,87,94,
|
||||
23,193,1,27,248,22,65,23,198,1,28,248,22,71,23,194,2,9,27,248,22,
|
||||
64,23,195,2,27,28,248,22,187,12,23,195,2,23,194,1,28,248,22,186,12,
|
||||
23,195,2,249,22,188,12,23,196,1,250,80,158,44,47,248,22,138,13,2,20,
|
||||
11,10,250,80,158,42,47,248,22,138,13,2,20,23,197,1,10,28,23,193,2,
|
||||
249,22,63,248,22,190,12,249,22,188,12,23,198,1,247,22,139,13,248,80,159,
|
||||
42,52,35,248,22,65,23,199,1,248,80,159,40,52,35,248,22,65,196,249,80,
|
||||
159,36,37,35,2,7,195,27,248,22,163,12,23,195,2,28,23,193,2,192,87,
|
||||
94,23,193,1,28,248,22,135,6,23,195,2,27,248,22,185,12,195,28,192,192,
|
||||
248,22,186,12,195,11,87,94,28,28,248,22,164,12,23,195,2,10,27,248,22,
|
||||
163,12,23,196,2,28,23,193,2,192,87,94,23,193,1,28,248,22,135,6,23,
|
||||
196,2,27,248,22,185,12,23,197,2,28,23,193,2,192,87,94,23,193,1,248,
|
||||
22,186,12,23,197,2,11,12,250,22,170,8,76,110,111,114,109,97,108,45,112,
|
||||
97,116,104,45,99,97,115,101,6,42,42,112,97,116,104,32,40,102,111,114,32,
|
||||
97,110,121,32,115,121,115,116,101,109,41,32,111,114,32,118,97,108,105,100,45,
|
||||
112,97,116,104,32,115,116,114,105,110,103,23,197,2,28,28,248,22,164,12,23,
|
||||
195,2,249,22,140,8,248,22,165,12,23,197,2,2,21,249,22,140,8,247,22,
|
||||
154,7,2,21,27,28,248,22,135,6,23,196,2,23,195,2,248,22,144,7,248,
|
||||
22,168,12,23,197,2,28,249,22,151,13,0,21,35,114,120,34,94,91,92,92,
|
||||
93,91,92,92,93,91,63,93,91,92,92,93,34,23,195,2,28,248,22,135,6,
|
||||
195,248,22,171,12,195,194,27,248,22,174,6,23,195,1,249,22,172,12,248,22,
|
||||
147,7,250,22,157,13,0,6,35,114,120,34,47,34,28,249,22,151,13,0,22,
|
||||
35,114,120,34,91,47,92,92,93,91,46,32,93,43,91,47,92,92,93,42,36,
|
||||
34,23,201,2,23,199,1,250,22,157,13,0,19,35,114,120,34,91,32,46,93,
|
||||
43,40,91,47,92,92,93,42,41,36,34,23,202,1,6,2,2,92,49,80,158,
|
||||
42,35,2,21,28,248,22,135,6,194,248,22,171,12,194,193,87,94,28,27,248,
|
||||
22,163,12,23,196,2,28,23,193,2,192,87,94,23,193,1,28,248,22,135,6,
|
||||
23,196,2,27,248,22,185,12,23,197,2,28,23,193,2,192,87,94,23,193,1,
|
||||
248,22,186,12,23,197,2,11,12,250,22,170,8,23,196,2,2,22,23,197,2,
|
||||
28,248,22,185,12,23,195,2,12,248,22,187,10,249,22,132,10,248,22,164,6,
|
||||
250,22,183,6,2,23,23,200,1,23,201,1,247,22,23,87,94,28,27,248,22,
|
||||
163,12,23,196,2,28,23,193,2,192,87,94,23,193,1,28,248,22,135,6,23,
|
||||
196,2,27,248,22,185,12,23,197,2,28,23,193,2,192,87,94,23,193,1,248,
|
||||
22,186,12,23,197,2,11,12,250,22,170,8,23,196,2,2,22,23,197,2,28,
|
||||
248,22,185,12,23,195,2,12,248,22,187,10,249,22,132,10,248,22,164,6,250,
|
||||
22,183,6,2,23,23,200,1,23,201,1,247,22,23,87,94,87,94,28,27,248,
|
||||
22,163,12,23,196,2,28,23,193,2,192,87,94,23,193,1,28,248,22,135,6,
|
||||
23,196,2,27,248,22,185,12,23,197,2,28,23,193,2,192,87,94,23,193,1,
|
||||
248,22,186,12,23,197,2,11,12,250,22,170,8,195,2,22,23,197,2,28,248,
|
||||
22,185,12,23,195,2,12,248,22,187,10,249,22,132,10,248,22,164,6,250,22,
|
||||
183,6,2,23,199,23,201,1,247,22,23,249,22,3,89,162,42,35,48,9,223,
|
||||
2,33,35,196,248,22,187,10,249,22,162,10,23,196,1,247,22,23,87,94,87,
|
||||
94,249,80,159,36,37,35,2,7,195,249,22,3,80,159,36,51,35,196,251,80,
|
||||
159,38,40,35,2,7,32,0,89,162,42,35,43,9,222,33,37,197,198,32,39,
|
||||
89,162,42,40,57,65,99,108,111,111,112,222,33,40,28,248,22,71,23,199,2,
|
||||
87,94,23,198,1,248,23,196,1,251,22,183,6,2,24,23,199,1,28,248,22,
|
||||
71,23,203,2,87,94,23,202,1,23,201,1,250,22,1,22,181,12,23,204,1,
|
||||
23,205,1,23,198,1,27,249,22,181,12,248,22,64,23,202,2,23,199,2,28,
|
||||
248,22,176,12,23,194,2,27,250,22,1,22,181,12,23,197,1,23,202,2,28,
|
||||
248,22,176,12,23,194,2,192,87,94,23,193,1,27,248,22,65,23,202,1,28,
|
||||
248,22,71,23,194,2,87,94,23,193,1,248,23,199,1,251,22,183,6,2,24,
|
||||
23,202,1,28,248,22,71,23,206,2,87,94,23,205,1,23,204,1,250,22,1,
|
||||
22,181,12,23,207,1,23,208,1,23,201,1,27,249,22,181,12,248,22,64,23,
|
||||
197,2,23,202,2,28,248,22,176,12,23,194,2,27,250,22,1,22,181,12,23,
|
||||
197,1,204,28,248,22,176,12,193,192,253,2,39,203,204,205,206,23,15,248,22,
|
||||
65,201,253,2,39,202,203,204,205,206,248,22,65,200,87,94,23,193,1,27,248,
|
||||
22,65,23,201,1,28,248,22,71,23,194,2,87,94,23,193,1,248,23,198,1,
|
||||
251,22,183,6,2,24,23,201,1,28,248,22,71,23,205,2,87,94,23,204,1,
|
||||
23,203,1,250,22,1,22,181,12,23,206,1,23,207,1,23,200,1,27,249,22,
|
||||
181,12,248,22,64,23,197,2,23,201,2,28,248,22,176,12,23,194,2,27,250,
|
||||
22,1,22,181,12,23,197,1,203,28,248,22,176,12,193,192,253,2,39,202,203,
|
||||
204,205,206,248,22,65,201,253,2,39,201,202,203,204,205,248,22,65,200,27,247,
|
||||
22,140,13,253,2,39,198,199,200,201,202,198,87,95,28,28,248,22,164,12,23,
|
||||
194,2,10,27,248,22,163,12,23,195,2,28,23,193,2,192,87,94,23,193,1,
|
||||
28,248,22,135,6,23,195,2,27,248,22,185,12,23,196,2,28,23,193,2,192,
|
||||
87,94,23,193,1,248,22,186,12,23,196,2,11,12,252,22,170,8,23,200,2,
|
||||
2,25,34,23,198,2,23,199,2,28,28,248,22,135,6,23,195,2,10,248,22,
|
||||
187,6,23,195,2,87,94,23,194,1,12,252,22,170,8,23,200,2,2,26,35,
|
||||
23,198,2,23,199,1,91,159,37,11,90,161,37,34,11,248,22,184,12,23,197,
|
||||
2,87,94,23,195,1,87,94,28,192,12,250,22,171,8,23,201,1,2,27,23,
|
||||
199,1,249,22,7,194,195,91,159,36,11,90,161,36,34,11,87,95,28,28,248,
|
||||
22,164,12,23,196,2,10,27,248,22,163,12,23,197,2,28,23,193,2,192,87,
|
||||
94,23,193,1,28,248,22,135,6,23,197,2,27,248,22,185,12,23,198,2,28,
|
||||
23,193,2,192,87,94,23,193,1,248,22,186,12,23,198,2,11,12,252,22,170,
|
||||
8,2,10,2,25,34,23,200,2,23,201,2,28,28,248,22,135,6,23,197,2,
|
||||
10,248,22,187,6,23,197,2,12,252,22,170,8,2,10,2,26,35,23,200,2,
|
||||
23,201,2,91,159,37,11,90,161,37,34,11,248,22,184,12,23,199,2,87,94,
|
||||
23,195,1,87,94,28,23,193,2,12,250,22,171,8,2,10,2,27,23,201,2,
|
||||
249,22,7,23,195,1,23,196,1,27,249,22,173,12,250,22,156,13,0,18,35,
|
||||
114,120,35,34,40,91,46,93,91,94,46,93,42,124,41,36,34,248,22,169,12,
|
||||
23,201,1,28,248,22,135,6,23,203,2,249,22,147,7,23,204,1,8,63,23,
|
||||
202,1,28,248,22,164,12,23,199,2,248,22,165,12,23,199,1,87,94,23,198,
|
||||
1,247,22,166,12,28,248,22,163,12,194,249,22,181,12,195,194,192,91,159,36,
|
||||
11,90,161,36,34,11,87,95,28,28,248,22,164,12,23,196,2,10,27,248,22,
|
||||
163,12,23,197,2,28,23,193,2,192,87,94,23,193,1,28,248,22,135,6,23,
|
||||
197,2,27,248,22,185,12,23,198,2,28,23,193,2,192,87,94,23,193,1,248,
|
||||
22,186,12,23,198,2,11,12,252,22,170,8,2,10,2,25,34,23,200,2,23,
|
||||
22,186,12,23,198,2,11,12,252,22,170,8,2,11,2,25,34,23,200,2,23,
|
||||
201,2,28,28,248,22,135,6,23,197,2,10,248,22,187,6,23,197,2,12,252,
|
||||
22,170,8,2,10,2,26,35,23,200,2,23,201,2,91,159,37,11,90,161,37,
|
||||
22,170,8,2,11,2,26,35,23,200,2,23,201,2,91,159,37,11,90,161,37,
|
||||
34,11,248,22,184,12,23,199,2,87,94,23,195,1,87,94,28,23,193,2,12,
|
||||
250,22,171,8,2,10,2,27,23,201,2,249,22,7,23,195,1,23,196,1,27,
|
||||
249,22,173,12,250,22,156,13,0,18,35,114,120,35,34,40,91,46,93,91,94,
|
||||
46,93,42,124,41,36,34,248,22,169,12,23,201,1,28,248,22,135,6,23,203,
|
||||
2,249,22,147,7,23,204,1,8,63,23,202,1,28,248,22,164,12,23,199,2,
|
||||
248,22,165,12,23,199,1,87,94,23,198,1,247,22,166,12,28,248,22,163,12,
|
||||
194,249,22,181,12,195,194,192,91,159,36,11,90,161,36,34,11,87,95,28,28,
|
||||
248,22,164,12,23,196,2,10,27,248,22,163,12,23,197,2,28,23,193,2,192,
|
||||
87,94,23,193,1,28,248,22,135,6,23,197,2,27,248,22,185,12,23,198,2,
|
||||
28,23,193,2,192,87,94,23,193,1,248,22,186,12,23,198,2,11,12,252,22,
|
||||
170,8,2,11,2,25,34,23,200,2,23,201,2,28,28,248,22,135,6,23,197,
|
||||
2,10,248,22,187,6,23,197,2,12,252,22,170,8,2,11,2,26,35,23,200,
|
||||
2,23,201,2,91,159,37,11,90,161,37,34,11,248,22,184,12,23,199,2,87,
|
||||
94,23,195,1,87,94,28,23,193,2,12,250,22,171,8,2,11,2,27,23,201,
|
||||
2,249,22,7,23,195,1,23,196,1,27,249,22,173,12,249,22,133,7,250,22,
|
||||
157,13,0,9,35,114,120,35,34,91,46,93,34,248,22,169,12,23,203,1,6,
|
||||
1,1,95,28,248,22,135,6,23,202,2,249,22,147,7,23,203,1,8,63,23,
|
||||
201,1,28,248,22,164,12,23,199,2,248,22,165,12,23,199,1,87,94,23,198,
|
||||
1,247,22,166,12,28,248,22,163,12,194,249,22,181,12,195,194,192,249,247,22,
|
||||
186,5,194,11,248,80,158,35,45,9,27,247,22,142,13,249,80,158,37,46,28,
|
||||
23,195,2,27,248,22,152,7,6,11,11,80,76,84,67,79,76,76,69,67,84,
|
||||
83,28,192,192,6,0,0,6,0,0,27,28,23,196,1,250,22,181,12,248,22,
|
||||
138,13,69,97,100,100,111,110,45,100,105,114,247,22,150,7,6,8,8,99,111,
|
||||
108,108,101,99,116,115,11,27,248,80,159,40,52,35,249,22,77,23,202,1,248,
|
||||
22,73,248,22,138,13,72,99,111,108,108,101,99,116,115,45,100,105,114,28,23,
|
||||
194,2,249,22,63,23,196,1,23,195,1,192,32,49,89,162,8,44,37,49,2,
|
||||
19,222,33,50,27,249,22,149,13,23,197,2,23,198,2,28,23,193,2,87,94,
|
||||
23,196,1,27,248,22,88,23,195,2,27,250,2,49,23,199,2,23,200,1,248,
|
||||
22,97,23,199,1,28,249,22,129,7,23,196,2,2,28,249,22,77,197,194,87,
|
||||
94,23,196,1,249,22,63,248,22,172,12,23,197,1,194,87,95,23,195,1,23,
|
||||
193,1,28,249,22,129,7,23,198,2,2,28,249,22,77,195,9,87,94,23,194,
|
||||
1,249,22,63,248,22,172,12,23,199,1,9,87,95,28,28,248,22,187,6,194,
|
||||
10,248,22,135,6,194,12,250,22,170,8,2,14,6,21,21,98,121,116,101,32,
|
||||
115,116,114,105,110,103,32,111,114,32,115,116,114,105,110,103,196,28,28,248,22,
|
||||
72,195,249,22,4,22,163,12,196,11,12,250,22,170,8,2,14,6,13,13,108,
|
||||
105,115,116,32,111,102,32,112,97,116,104,115,197,250,2,49,197,195,28,248,22,
|
||||
135,6,197,248,22,146,7,197,196,32,52,89,162,8,44,38,56,2,19,222,33,
|
||||
55,32,53,89,162,8,44,37,53,70,102,111,117,110,100,45,101,120,101,99,222,
|
||||
33,54,28,23,193,2,91,159,37,11,90,161,37,34,11,248,22,184,12,23,199,
|
||||
2,87,95,23,195,1,23,194,1,27,28,23,198,2,27,248,22,189,12,23,201,
|
||||
2,28,249,22,142,8,23,195,2,23,202,2,11,28,248,22,185,12,23,194,2,
|
||||
250,2,53,23,201,2,23,202,2,249,22,181,12,23,200,2,23,198,1,250,2,
|
||||
53,23,201,2,23,202,2,23,196,1,11,28,23,193,2,192,87,94,23,193,1,
|
||||
27,28,248,22,163,12,23,196,2,27,249,22,181,12,23,198,2,23,201,2,28,
|
||||
28,248,22,176,12,193,10,248,22,175,12,193,192,11,11,28,23,193,2,192,87,
|
||||
94,23,193,1,28,23,199,2,11,27,248,22,189,12,23,202,2,28,249,22,142,
|
||||
8,23,195,2,23,203,1,11,28,248,22,185,12,23,194,2,250,2,53,23,202,
|
||||
1,23,203,1,249,22,181,12,23,201,1,23,198,1,250,2,53,201,202,195,194,
|
||||
28,248,22,71,23,197,2,11,27,248,22,188,12,248,22,64,23,199,2,27,249,
|
||||
22,181,12,23,196,1,23,197,2,28,248,22,175,12,23,194,2,250,2,53,198,
|
||||
199,195,87,94,23,193,1,27,248,22,65,23,200,1,28,248,22,71,23,194,2,
|
||||
11,27,248,22,188,12,248,22,64,23,196,2,27,249,22,181,12,23,196,1,23,
|
||||
200,2,28,248,22,175,12,23,194,2,250,2,53,201,202,195,87,94,23,193,1,
|
||||
27,248,22,65,23,197,1,28,248,22,71,23,194,2,11,27,248,22,188,12,248,
|
||||
22,64,195,27,249,22,181,12,23,196,1,202,28,248,22,175,12,193,250,2,53,
|
||||
204,205,195,251,2,52,204,205,206,248,22,65,199,87,95,28,27,248,22,163,12,
|
||||
23,196,2,28,23,193,2,192,87,94,23,193,1,28,248,22,135,6,23,196,2,
|
||||
27,248,22,185,12,23,197,2,28,23,193,2,192,87,94,23,193,1,248,22,186,
|
||||
12,23,197,2,11,12,250,22,170,8,2,15,6,25,25,112,97,116,104,32,111,
|
||||
114,32,115,116,114,105,110,103,32,40,115,97,110,115,32,110,117,108,41,23,197,
|
||||
2,28,28,23,195,2,28,27,248,22,163,12,23,197,2,28,23,193,2,192,87,
|
||||
94,23,193,1,28,248,22,135,6,23,197,2,27,248,22,185,12,23,198,2,28,
|
||||
23,193,2,192,87,94,23,193,1,248,22,186,12,23,198,2,11,248,22,185,12,
|
||||
23,196,2,11,10,12,250,22,170,8,2,15,6,29,29,35,102,32,111,114,32,
|
||||
114,101,108,97,116,105,118,101,32,112,97,116,104,32,111,114,32,115,116,114,105,
|
||||
110,103,23,198,2,28,28,248,22,185,12,23,195,2,91,159,37,11,90,161,37,
|
||||
34,11,248,22,184,12,23,198,2,249,22,140,8,194,68,114,101,108,97,116,105,
|
||||
118,101,11,27,248,22,152,7,6,4,4,80,65,84,72,251,2,52,23,199,1,
|
||||
23,200,1,23,201,1,28,23,197,2,27,249,80,158,42,46,23,200,1,9,28,
|
||||
249,22,140,8,247,22,154,7,2,21,249,22,63,248,22,172,12,5,1,46,23,
|
||||
195,1,192,9,27,248,22,188,12,23,196,1,28,248,22,175,12,193,250,2,53,
|
||||
198,199,195,11,250,80,158,37,47,196,197,11,250,80,158,37,47,196,11,11,87,
|
||||
94,249,22,191,5,247,22,168,4,195,248,22,142,5,249,22,153,3,34,249,22,
|
||||
137,3,197,198,27,248,22,138,13,2,20,27,249,80,158,38,47,23,196,1,11,
|
||||
27,27,248,22,156,3,23,199,1,28,192,192,34,27,27,248,22,156,3,23,201,
|
||||
1,28,192,192,34,27,249,22,185,4,23,198,1,83,158,38,20,96,95,89,162,
|
||||
8,44,34,46,9,224,4,3,33,59,23,196,1,23,197,1,27,248,22,172,4,
|
||||
23,195,1,87,94,248,22,136,4,21,94,2,17,2,29,248,80,159,41,53,35,
|
||||
193,159,34,20,102,159,34,16,1,20,24,65,98,101,103,105,110,16,0,83,158,
|
||||
40,20,99,137,67,35,37,117,116,105,108,115,2,1,11,10,10,41,80,158,34,
|
||||
34,20,102,159,37,16,17,30,2,1,2,2,193,30,2,1,2,3,193,30,2,
|
||||
1,2,4,193,30,2,1,2,5,193,30,2,1,2,6,193,30,2,1,2,7,
|
||||
193,30,2,1,2,8,193,30,2,1,2,9,193,30,2,1,2,10,193,30,2,
|
||||
1,2,11,193,30,2,1,2,12,193,30,2,1,2,13,193,30,2,1,2,14,
|
||||
193,30,2,1,2,15,193,30,2,1,2,16,193,30,2,18,1,20,112,97,114,
|
||||
97,109,101,116,101,114,105,122,97,116,105,111,110,45,107,101,121,4,30,2,18,
|
||||
1,23,101,120,116,101,110,100,45,112,97,114,97,109,101,116,101,114,105,122,97,
|
||||
116,105,111,110,3,16,0,11,11,16,4,2,6,2,5,2,3,2,9,38,11,
|
||||
37,34,11,16,11,9,9,9,9,9,9,9,9,9,9,9,16,11,2,8,2,
|
||||
7,2,16,2,15,2,13,2,12,2,4,2,11,2,14,2,10,2,2,16,11,
|
||||
11,11,11,11,11,11,11,11,11,11,11,16,11,2,8,2,7,2,16,2,15,
|
||||
2,13,2,12,2,4,2,11,2,14,2,10,2,2,45,45,35,11,11,16,0,
|
||||
16,0,16,0,34,34,11,11,11,16,0,16,0,16,0,34,34,16,0,16,18,
|
||||
83,158,34,16,2,89,162,42,35,47,2,19,223,0,33,30,80,159,34,53,35,
|
||||
83,158,34,16,2,89,162,8,44,35,54,2,19,223,0,33,31,80,159,34,52,
|
||||
35,83,158,34,16,2,89,162,8,44,35,43,9,223,0,33,32,80,159,34,51,
|
||||
35,83,158,34,16,2,32,0,89,162,42,35,43,2,2,222,33,33,80,159,34,
|
||||
34,35,83,158,34,16,2,249,22,137,6,7,92,7,92,80,159,34,35,35,83,
|
||||
158,34,16,2,89,162,42,35,52,2,4,223,0,33,34,80,159,34,36,35,83,
|
||||
158,34,16,2,32,0,89,162,42,36,48,2,5,222,33,35,80,159,34,37,35,
|
||||
83,158,34,16,2,32,0,89,162,8,44,37,49,2,6,222,33,37,80,159,34,
|
||||
38,35,83,158,34,16,2,89,162,8,45,36,46,2,7,223,0,33,39,80,159,
|
||||
34,39,35,83,158,34,16,2,32,0,89,162,42,38,50,2,8,222,33,42,80,
|
||||
159,34,40,35,83,158,34,16,2,32,0,89,162,42,37,48,2,9,222,33,43,
|
||||
80,159,34,41,35,83,158,34,16,2,32,0,89,162,42,36,51,2,10,222,33,
|
||||
44,80,159,34,42,35,83,158,34,16,2,32,0,89,162,42,36,52,2,11,222,
|
||||
33,45,80,159,34,43,35,83,158,34,16,2,32,0,89,162,42,35,42,2,12,
|
||||
222,33,46,80,159,34,44,35,83,158,34,16,2,83,158,37,20,95,95,2,13,
|
||||
89,162,42,34,41,9,223,0,33,47,89,162,42,35,51,9,223,0,33,48,80,
|
||||
159,34,45,35,83,158,34,16,2,27,248,22,145,13,248,22,146,7,27,28,249,
|
||||
22,140,8,247,22,154,7,2,21,6,1,1,59,6,1,1,58,250,22,183,6,
|
||||
6,14,14,40,91,94,126,97,93,42,41,126,97,40,46,42,41,23,196,2,23,
|
||||
196,1,89,162,8,44,36,46,2,14,223,0,33,51,80,159,34,46,35,83,158,
|
||||
34,16,2,83,158,37,20,95,96,2,15,89,162,8,44,37,52,9,223,0,33,
|
||||
56,89,162,42,36,45,9,223,0,33,57,89,162,42,35,44,9,223,0,33,58,
|
||||
80,159,34,47,35,83,158,34,16,2,89,162,42,36,49,2,16,223,0,33,60,
|
||||
80,159,34,48,35,94,29,94,2,17,2,29,11,29,94,2,17,69,35,37,109,
|
||||
105,110,45,115,116,120,11,9,9,9,34,0};
|
||||
EVAL_ONE_SIZED_STR((char *)expr, 5009);
|
||||
250,22,171,8,2,11,2,27,23,201,2,249,22,7,23,195,1,23,196,1,27,
|
||||
249,22,173,12,249,22,133,7,250,22,157,13,0,9,35,114,120,35,34,91,46,
|
||||
93,34,248,22,169,12,23,203,1,6,1,1,95,28,248,22,135,6,23,202,2,
|
||||
249,22,147,7,23,203,1,8,63,23,201,1,28,248,22,164,12,23,199,2,248,
|
||||
22,165,12,23,199,1,87,94,23,198,1,247,22,166,12,28,248,22,163,12,194,
|
||||
249,22,181,12,195,194,192,249,247,22,186,5,194,11,248,80,158,35,45,9,27,
|
||||
247,22,142,13,249,80,158,37,46,28,23,195,2,27,248,22,152,7,6,11,11,
|
||||
80,76,84,67,79,76,76,69,67,84,83,28,192,192,6,0,0,6,0,0,27,
|
||||
28,23,196,1,250,22,181,12,248,22,138,13,69,97,100,100,111,110,45,100,105,
|
||||
114,247,22,150,7,6,8,8,99,111,108,108,101,99,116,115,11,27,248,80,159,
|
||||
40,52,35,249,22,77,23,202,1,248,22,73,248,22,138,13,72,99,111,108,108,
|
||||
101,99,116,115,45,100,105,114,28,23,194,2,249,22,63,23,196,1,23,195,1,
|
||||
192,32,48,89,162,8,44,37,49,2,19,222,33,49,27,249,22,149,13,23,197,
|
||||
2,23,198,2,28,23,193,2,87,94,23,196,1,27,248,22,88,23,195,2,27,
|
||||
250,2,48,23,199,2,23,200,1,248,22,97,23,199,1,28,249,22,129,7,23,
|
||||
196,2,2,28,249,22,77,197,194,87,94,23,196,1,249,22,63,248,22,172,12,
|
||||
23,197,1,194,87,95,23,195,1,23,193,1,28,249,22,129,7,23,198,2,2,
|
||||
28,249,22,77,195,9,87,94,23,194,1,249,22,63,248,22,172,12,23,199,1,
|
||||
9,87,95,28,28,248,22,187,6,194,10,248,22,135,6,194,12,250,22,170,8,
|
||||
2,14,6,21,21,98,121,116,101,32,115,116,114,105,110,103,32,111,114,32,115,
|
||||
116,114,105,110,103,196,28,28,248,22,72,195,249,22,4,22,163,12,196,11,12,
|
||||
250,22,170,8,2,14,6,13,13,108,105,115,116,32,111,102,32,112,97,116,104,
|
||||
115,197,250,2,48,197,195,28,248,22,135,6,197,248,22,146,7,197,196,32,51,
|
||||
89,162,8,44,38,56,2,19,222,33,54,32,52,89,162,8,44,37,53,70,102,
|
||||
111,117,110,100,45,101,120,101,99,222,33,53,28,23,193,2,91,159,37,11,90,
|
||||
161,37,34,11,248,22,184,12,23,199,2,87,95,23,195,1,23,194,1,27,28,
|
||||
23,198,2,27,248,22,189,12,23,201,2,28,249,22,142,8,23,195,2,23,202,
|
||||
2,11,28,248,22,185,12,23,194,2,250,2,52,23,201,2,23,202,2,249,22,
|
||||
181,12,23,200,2,23,198,1,250,2,52,23,201,2,23,202,2,23,196,1,11,
|
||||
28,23,193,2,192,87,94,23,193,1,27,28,248,22,163,12,23,196,2,27,249,
|
||||
22,181,12,23,198,2,23,201,2,28,28,248,22,176,12,193,10,248,22,175,12,
|
||||
193,192,11,11,28,23,193,2,192,87,94,23,193,1,28,23,199,2,11,27,248,
|
||||
22,189,12,23,202,2,28,249,22,142,8,23,195,2,23,203,1,11,28,248,22,
|
||||
185,12,23,194,2,250,2,52,23,202,1,23,203,1,249,22,181,12,23,201,1,
|
||||
23,198,1,250,2,52,201,202,195,194,28,248,22,71,23,197,2,11,27,248,22,
|
||||
188,12,248,22,64,23,199,2,27,249,22,181,12,23,196,1,23,197,2,28,248,
|
||||
22,175,12,23,194,2,250,2,52,198,199,195,87,94,23,193,1,27,248,22,65,
|
||||
23,200,1,28,248,22,71,23,194,2,11,27,248,22,188,12,248,22,64,23,196,
|
||||
2,27,249,22,181,12,23,196,1,23,200,2,28,248,22,175,12,23,194,2,250,
|
||||
2,52,201,202,195,87,94,23,193,1,27,248,22,65,23,197,1,28,248,22,71,
|
||||
23,194,2,11,27,248,22,188,12,248,22,64,195,27,249,22,181,12,23,196,1,
|
||||
202,28,248,22,175,12,193,250,2,52,204,205,195,251,2,51,204,205,206,248,22,
|
||||
65,199,87,95,28,27,248,22,163,12,23,196,2,28,23,193,2,192,87,94,23,
|
||||
193,1,28,248,22,135,6,23,196,2,27,248,22,185,12,23,197,2,28,23,193,
|
||||
2,192,87,94,23,193,1,248,22,186,12,23,197,2,11,12,250,22,170,8,2,
|
||||
15,6,25,25,112,97,116,104,32,111,114,32,115,116,114,105,110,103,32,40,115,
|
||||
97,110,115,32,110,117,108,41,23,197,2,28,28,23,195,2,28,27,248,22,163,
|
||||
12,23,197,2,28,23,193,2,192,87,94,23,193,1,28,248,22,135,6,23,197,
|
||||
2,27,248,22,185,12,23,198,2,28,23,193,2,192,87,94,23,193,1,248,22,
|
||||
186,12,23,198,2,11,248,22,185,12,23,196,2,11,10,12,250,22,170,8,2,
|
||||
15,6,29,29,35,102,32,111,114,32,114,101,108,97,116,105,118,101,32,112,97,
|
||||
116,104,32,111,114,32,115,116,114,105,110,103,23,198,2,28,28,248,22,185,12,
|
||||
23,195,2,91,159,37,11,90,161,37,34,11,248,22,184,12,23,198,2,249,22,
|
||||
140,8,194,68,114,101,108,97,116,105,118,101,11,27,248,22,152,7,6,4,4,
|
||||
80,65,84,72,251,2,51,23,199,1,23,200,1,23,201,1,28,23,197,2,27,
|
||||
249,80,158,42,46,23,200,1,9,28,249,22,140,8,247,22,154,7,2,21,249,
|
||||
22,63,248,22,172,12,5,1,46,23,195,1,192,9,27,248,22,188,12,23,196,
|
||||
1,28,248,22,175,12,193,250,2,52,198,199,195,11,250,80,158,37,47,196,197,
|
||||
11,250,80,158,37,47,196,11,11,87,94,249,22,191,5,247,22,168,4,195,248,
|
||||
22,142,5,249,22,153,3,34,249,22,137,3,197,198,27,28,23,197,2,87,95,
|
||||
23,196,1,23,195,1,23,197,1,87,94,23,197,1,27,248,22,138,13,2,20,
|
||||
27,249,80,158,39,47,23,196,1,11,27,27,248,22,156,3,23,200,1,28,192,
|
||||
192,34,27,27,248,22,156,3,23,202,1,28,192,192,34,249,22,185,4,23,197,
|
||||
1,83,158,38,20,96,95,89,162,8,44,34,46,9,224,3,2,33,58,23,195,
|
||||
1,23,196,1,27,248,22,172,4,23,195,1,248,80,159,37,53,35,193,159,34,
|
||||
20,102,159,34,16,1,20,24,65,98,101,103,105,110,16,0,83,158,40,20,99,
|
||||
137,67,35,37,117,116,105,108,115,2,1,11,10,10,41,80,158,34,34,20,102,
|
||||
159,37,16,17,30,2,1,2,2,193,30,2,1,2,3,193,30,2,1,2,4,
|
||||
193,30,2,1,2,5,193,30,2,1,2,6,193,30,2,1,2,7,193,30,2,
|
||||
1,2,8,193,30,2,1,2,9,193,30,2,1,2,10,193,30,2,1,2,11,
|
||||
193,30,2,1,2,12,193,30,2,1,2,13,193,30,2,1,2,14,193,30,2,
|
||||
1,2,15,193,30,2,1,2,16,193,30,2,18,1,20,112,97,114,97,109,101,
|
||||
116,101,114,105,122,97,116,105,111,110,45,107,101,121,4,30,2,18,1,23,101,
|
||||
120,116,101,110,100,45,112,97,114,97,109,101,116,101,114,105,122,97,116,105,111,
|
||||
110,3,16,0,11,11,16,4,2,6,2,5,2,3,2,9,38,11,37,34,11,
|
||||
16,11,9,9,9,9,9,9,9,9,9,9,9,16,11,2,8,2,7,2,16,
|
||||
2,15,2,13,2,12,2,4,2,11,2,14,2,10,2,2,16,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,16,11,2,8,2,7,2,16,2,15,2,13,2,
|
||||
12,2,4,2,11,2,14,2,10,2,2,45,45,35,11,11,16,0,16,0,16,
|
||||
0,34,34,11,11,11,16,0,16,0,16,0,34,34,16,0,16,18,83,158,34,
|
||||
16,2,89,162,42,35,47,2,19,223,0,33,29,80,159,34,53,35,83,158,34,
|
||||
16,2,89,162,8,44,35,54,2,19,223,0,33,30,80,159,34,52,35,83,158,
|
||||
34,16,2,89,162,8,44,35,43,9,223,0,33,31,80,159,34,51,35,83,158,
|
||||
34,16,2,32,0,89,162,42,35,43,2,2,222,33,32,80,159,34,34,35,83,
|
||||
158,34,16,2,249,22,137,6,7,92,7,92,80,159,34,35,35,83,158,34,16,
|
||||
2,89,162,42,35,52,2,4,223,0,33,33,80,159,34,36,35,83,158,34,16,
|
||||
2,32,0,89,162,42,36,48,2,5,222,33,34,80,159,34,37,35,83,158,34,
|
||||
16,2,32,0,89,162,8,44,37,49,2,6,222,33,36,80,159,34,38,35,83,
|
||||
158,34,16,2,89,162,8,45,36,46,2,7,223,0,33,38,80,159,34,39,35,
|
||||
83,158,34,16,2,32,0,89,162,42,38,50,2,8,222,33,41,80,159,34,40,
|
||||
35,83,158,34,16,2,32,0,89,162,42,37,48,2,9,222,33,42,80,159,34,
|
||||
41,35,83,158,34,16,2,32,0,89,162,42,36,51,2,10,222,33,43,80,159,
|
||||
34,42,35,83,158,34,16,2,32,0,89,162,42,36,52,2,11,222,33,44,80,
|
||||
159,34,43,35,83,158,34,16,2,32,0,89,162,42,35,42,2,12,222,33,45,
|
||||
80,159,34,44,35,83,158,34,16,2,83,158,37,20,95,95,2,13,89,162,42,
|
||||
34,41,9,223,0,33,46,89,162,42,35,51,9,223,0,33,47,80,159,34,45,
|
||||
35,83,158,34,16,2,27,248,22,145,13,248,22,146,7,27,28,249,22,140,8,
|
||||
247,22,154,7,2,21,6,1,1,59,6,1,1,58,250,22,183,6,6,14,14,
|
||||
40,91,94,126,97,93,42,41,126,97,40,46,42,41,23,196,2,23,196,1,89,
|
||||
162,8,44,36,46,2,14,223,0,33,50,80,159,34,46,35,83,158,34,16,2,
|
||||
83,158,37,20,95,96,2,15,89,162,8,44,37,52,9,223,0,33,55,89,162,
|
||||
42,36,45,9,223,0,33,56,89,162,42,35,44,9,223,0,33,57,80,159,34,
|
||||
47,35,83,158,34,16,2,89,162,42,37,50,2,16,223,0,33,59,80,159,34,
|
||||
48,35,94,29,94,2,17,68,35,37,107,101,114,110,101,108,11,29,94,2,17,
|
||||
69,35,37,109,105,110,45,115,116,120,11,9,9,9,34,0};
|
||||
EVAL_ONE_SIZED_STR((char *)expr, 5013);
|
||||
}
|
||||
{
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,51,46,57,57,46,48,46,49,56,8,0,0,0,1,0,0,6,0,
|
||||
|
@ -347,7 +347,7 @@
|
|||
111,116,101,29,94,2,1,67,35,37,117,116,105,108,115,11,29,94,2,1,69,
|
||||
35,37,110,101,116,119,111,114,107,11,29,94,2,1,68,35,37,112,97,114,97,
|
||||
109,122,11,29,94,2,1,68,35,37,101,120,112,111,98,115,11,29,94,2,1,
|
||||
68,35,37,107,101,114,110,101,108,11,98,10,34,11,8,168,186,97,159,2,2,
|
||||
68,35,37,107,101,114,110,101,108,11,98,10,34,11,8,129,187,97,159,2,2,
|
||||
34,34,159,2,3,34,34,159,2,4,34,34,159,2,5,34,34,159,2,6,34,
|
||||
34,16,0,159,34,20,102,159,34,16,1,20,24,65,98,101,103,105,110,16,0,
|
||||
83,158,40,20,99,137,69,35,37,98,117,105,108,116,105,110,29,11,11,10,10,
|
||||
|
|
|
@ -369,7 +369,6 @@ Scheme_Env *scheme_basic_env()
|
|||
make_init_env();
|
||||
|
||||
env = scheme_make_empty_env();
|
||||
scheme_require_from_original_env(env, 1); /* Need kernel syntax... */
|
||||
|
||||
scheme_set_param(scheme_current_config(), MZCONFIG_ENV,
|
||||
(Scheme_Object *)env);
|
||||
|
|
|
@ -9093,7 +9093,8 @@ expand_stx_to_top_form(int argc, Scheme_Object **argv)
|
|||
}
|
||||
|
||||
static Scheme_Object *do_eval_string_all(const char *str, Scheme_Env *env, int cont, int w_prompt)
|
||||
/* cont == -1 => single result
|
||||
/* cont == -2 => module (no result)
|
||||
cont == -1 => single result
|
||||
cont == 1 -> multiple result ok
|
||||
cont == 2 -> multiple result ok, use current_print to show results */
|
||||
{
|
||||
|
@ -9102,6 +9103,22 @@ static Scheme_Object *do_eval_string_all(const char *str, Scheme_Env *env, int c
|
|||
port = scheme_make_byte_string_input_port(str);
|
||||
do {
|
||||
expr = scheme_read_syntax(port, scheme_false);
|
||||
|
||||
if (cont == -2) {
|
||||
if (SCHEME_STXP(expr)) {
|
||||
Scheme_Object *m;
|
||||
m = SCHEME_STX_VAL(expr);
|
||||
if (SCHEME_PAIRP(m)) {
|
||||
m = scheme_make_pair(scheme_datum_to_syntax(module_symbol,
|
||||
SCHEME_CAR(m),
|
||||
scheme_sys_wraps(NULL),
|
||||
0, 0),
|
||||
SCHEME_CDR(m));
|
||||
expr = scheme_datum_to_syntax(m, expr, expr, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (SAME_OBJ(expr, scheme_eof))
|
||||
cont = 0;
|
||||
else if (cont < 0) {
|
||||
|
@ -9153,6 +9170,11 @@ Scheme_Object *scheme_eval_string(const char *str, Scheme_Env *env)
|
|||
return do_eval_string_all(str, env, -1, 0);
|
||||
}
|
||||
|
||||
Scheme_Object *scheme_eval_module_string(const char *str, Scheme_Env *env)
|
||||
{
|
||||
return do_eval_string_all(str, env, -2, 0);
|
||||
}
|
||||
|
||||
Scheme_Object *scheme_eval_string_multi(const char *str, Scheme_Env *env)
|
||||
{
|
||||
return do_eval_string_all(str, env, 0, 0);
|
||||
|
@ -9173,6 +9195,28 @@ Scheme_Object *scheme_eval_string_multi_with_prompt(const char *str, Scheme_Env
|
|||
return do_eval_string_all(str, env, 0, 1);
|
||||
}
|
||||
|
||||
void scheme_init_collection_paths(Scheme_Env *global_env, Scheme_Object *extra_dirs)
|
||||
{
|
||||
mz_jmp_buf * volatile save, newbuf;
|
||||
Scheme_Thread * volatile p;
|
||||
p = scheme_get_current_thread();
|
||||
save = p->error_buf;
|
||||
p->error_buf = &newbuf;
|
||||
if (!scheme_setjmp(newbuf)) {
|
||||
Scheme_Object *clcp, *flcp, *a[1];
|
||||
|
||||
clcp = scheme_builtin_value("current-library-collection-paths");
|
||||
flcp = scheme_builtin_value("find-library-collection-paths");
|
||||
|
||||
if (clcp && flcp) {
|
||||
a[0] = extra_dirs;
|
||||
a[0] = _scheme_apply(flcp, 1, a);
|
||||
_scheme_apply(clcp, 1, a);
|
||||
}
|
||||
}
|
||||
p->error_buf = save;
|
||||
}
|
||||
|
||||
static Scheme_Object *allow_set_undefined(int argc, Scheme_Object **argv)
|
||||
{
|
||||
return scheme_param_config("compile-allow-set!-undefined",
|
||||
|
|
|
@ -642,17 +642,6 @@ int scheme_is_kernel_modname(Scheme_Object *modname)
|
|||
return SAME_OBJ(modname, kernel_modname);
|
||||
}
|
||||
|
||||
void scheme_require_from_original_env(Scheme_Env *env, int syntax_only)
|
||||
{
|
||||
Scheme_Object *rn, *mod_sym;
|
||||
|
||||
scheme_prepare_env_renames(env, mzMOD_RENAME_TOPLEVEL);
|
||||
rn = scheme_get_module_rename_from_set(env->rename_set, scheme_make_integer(0), 1);
|
||||
|
||||
mod_sym = scheme_intern_symbol("module");
|
||||
scheme_extend_module_rename(rn, kernel_modidx, mod_sym, mod_sym, kernel_modidx, mod_sym, 0, NULL, NULL, 0);
|
||||
}
|
||||
|
||||
Scheme_Object *scheme_sys_wraps(Scheme_Comp_Env *env)
|
||||
{
|
||||
Scheme_Object *rn, *w;
|
||||
|
@ -3936,10 +3925,7 @@ Scheme_Object *scheme_builtin_value(const char *name)
|
|||
if (v)
|
||||
return v;
|
||||
|
||||
/* FIXME... */
|
||||
/* Last resort: 'mzscheme */
|
||||
a[0] = scheme_intern_symbol("mzscheme");
|
||||
return _dynamic_require(2, a, initial_modules_env, 0, 0, 0, 0, 0, -1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Scheme_Module *scheme_extract_compiled_module(Scheme_Object *o)
|
||||
|
|
|
@ -88,6 +88,24 @@ void scheme_set_stack_base(void *base, int no_auto_statics)
|
|||
use_registered_statics = no_auto_statics;
|
||||
}
|
||||
|
||||
int scheme_setup(int no_auto_statics, Scheme_Main _main, int argc, char **argv)
|
||||
{
|
||||
void *start_addr = &start_addr;
|
||||
|
||||
#ifdef MZ_PRECISE_GC
|
||||
start_addr = &__gc_var_stack__;
|
||||
#endif
|
||||
|
||||
scheme_set_stack_base(start_addr, no_auto_statics);
|
||||
|
||||
#ifdef MZ_PRECISE_GC
|
||||
/* Trick xform conversion to keep start_addr: */
|
||||
start_addr = start_addr;
|
||||
#endif
|
||||
|
||||
return _main(scheme_basic_env(), argc, argv);
|
||||
}
|
||||
|
||||
void scheme_set_stack_bounds(void *base, void *deepest, int no_auto_statics)
|
||||
{
|
||||
scheme_set_stack_base(base, no_auto_statics);
|
||||
|
|
|
@ -264,6 +264,7 @@ MZ_EXTERN Scheme_Object *scheme_eval_string_all(const char *str, Scheme_Env *env
|
|||
MZ_EXTERN Scheme_Object *scheme_eval_string_with_prompt(const char *str, Scheme_Env *env);
|
||||
MZ_EXTERN Scheme_Object *scheme_eval_string_multi_with_prompt(const char *str, Scheme_Env *env);
|
||||
MZ_EXTERN Scheme_Object *scheme_eval_string_all_with_prompt(const char *str, Scheme_Env *env, int all);
|
||||
MZ_EXTERN Scheme_Object *scheme_eval_module_string(const char *str, Scheme_Env *env);
|
||||
|
||||
MZ_EXTERN Scheme_Object *_scheme_apply_known_prim_closure(Scheme_Object *rator, int argc,
|
||||
Scheme_Object **argv);
|
||||
|
|
|
@ -215,6 +215,7 @@ Scheme_Object *(*scheme_eval_string_all)(const char *str, Scheme_Env *env, int a
|
|||
Scheme_Object *(*scheme_eval_string_with_prompt)(const char *str, Scheme_Env *env);
|
||||
Scheme_Object *(*scheme_eval_string_multi_with_prompt)(const char *str, Scheme_Env *env);
|
||||
Scheme_Object *(*scheme_eval_string_all_with_prompt)(const char *str, Scheme_Env *env, int all);
|
||||
Scheme_Object *(*scheme_eval_module_string)(const char *str, Scheme_Env *env);
|
||||
Scheme_Object *(*_scheme_apply_known_prim_closure)(Scheme_Object *rator, int argc,
|
||||
Scheme_Object **argv);
|
||||
Scheme_Object *(*_scheme_apply_known_prim_closure_multi)(Scheme_Object *rator, int argc,
|
||||
|
|
|
@ -136,6 +136,7 @@
|
|||
scheme_extension_table->scheme_eval_string_with_prompt = scheme_eval_string_with_prompt;
|
||||
scheme_extension_table->scheme_eval_string_multi_with_prompt = scheme_eval_string_multi_with_prompt;
|
||||
scheme_extension_table->scheme_eval_string_all_with_prompt = scheme_eval_string_all_with_prompt;
|
||||
scheme_extension_table->scheme_eval_module_string = scheme_eval_module_string;
|
||||
scheme_extension_table->_scheme_apply_known_prim_closure = _scheme_apply_known_prim_closure;
|
||||
scheme_extension_table->_scheme_apply_known_prim_closure_multi = _scheme_apply_known_prim_closure_multi;
|
||||
scheme_extension_table->_scheme_apply_prim_closure = _scheme_apply_prim_closure;
|
||||
|
|
|
@ -136,6 +136,7 @@
|
|||
#define scheme_eval_string_with_prompt (scheme_extension_table->scheme_eval_string_with_prompt)
|
||||
#define scheme_eval_string_multi_with_prompt (scheme_extension_table->scheme_eval_string_multi_with_prompt)
|
||||
#define scheme_eval_string_all_with_prompt (scheme_extension_table->scheme_eval_string_all_with_prompt)
|
||||
#define scheme_eval_module_string (scheme_extension_table->scheme_eval_module_string)
|
||||
#define _scheme_apply_known_prim_closure (scheme_extension_table->_scheme_apply_known_prim_closure)
|
||||
#define _scheme_apply_known_prim_closure_multi (scheme_extension_table->_scheme_apply_known_prim_closure_multi)
|
||||
#define _scheme_apply_prim_closure (scheme_extension_table->_scheme_apply_prim_closure)
|
||||
|
|
|
@ -478,8 +478,6 @@ scheme_get_primitive_global(Scheme_Object *var, Scheme_Env *env,
|
|||
void scheme_add_bucket_to_table(Scheme_Bucket_Table *table, Scheme_Bucket *b);
|
||||
Scheme_Bucket *scheme_bucket_or_null_from_table(Scheme_Bucket_Table *table, const char *key, int add);
|
||||
|
||||
void scheme_require_from_original_env(Scheme_Env *env, int syntax_only);
|
||||
|
||||
/*========================================================================*/
|
||||
/* structs */
|
||||
/*========================================================================*/
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
(define DIGS-PER-LINE 20)
|
||||
|
||||
(namespace-require ''#%kernel)
|
||||
|
||||
(let loop ()
|
||||
(let ([expr (read)])
|
||||
(unless (eof-object? expr)
|
||||
|
|
|
@ -366,21 +366,24 @@
|
|||
"(and(file-exists? p)(found-exec p))))))"
|
||||
"((program libpath)(find-executable-path program libpath #f))"
|
||||
"((program)(find-executable-path program #f #f))))"
|
||||
"(define(embedded-load start end)"
|
||||
"(define(embedded-load start end str)"
|
||||
"(let*((s(if str"
|
||||
" str"
|
||||
"(let*((sp(find-system-path 'exec-file)) "
|
||||
"(exe(find-executable-path sp #f))"
|
||||
"(start(or(string->number start) 0))"
|
||||
"(end(or(string->number end) 0))"
|
||||
"(s(with-input-from-file exe "
|
||||
"(end(or(string->number end) 0)))"
|
||||
"(with-input-from-file exe "
|
||||
"(lambda()"
|
||||
"(file-position(current-input-port) start)"
|
||||
"(read-bytes(max 0(- end start))))))"
|
||||
"(read-bytes(max 0(- end start))))))))"
|
||||
"(p(open-input-bytes s)))"
|
||||
"(namespace-require ''#%kernel)"
|
||||
"(let loop()"
|
||||
"(let((e(parameterize((read-accept-compiled #t))"
|
||||
"(read p))))"
|
||||
"(unless(eof-object? e)(eval e)(loop)))))))"
|
||||
"(unless(eof-object? e)"
|
||||
"(eval e)"
|
||||
"(loop)))))))"
|
||||
);
|
||||
EVAL_ONE_STR(
|
||||
"(module #%builtin '#%kernel"
|
||||
|
|
|
@ -434,21 +434,24 @@
|
|||
[(program) (find-executable-path program #f #f)]))
|
||||
|
||||
;; used for the -k command-line argument:
|
||||
(define (embedded-load start end)
|
||||
(let* ([sp (find-system-path 'exec-file)]
|
||||
[exe (find-executable-path sp #f)]
|
||||
[start (or (string->number start) 0)]
|
||||
[end (or (string->number end) 0)]
|
||||
[s (with-input-from-file exe
|
||||
(lambda ()
|
||||
(file-position (current-input-port) start)
|
||||
(read-bytes (max 0 (- end start)))))]
|
||||
(define (embedded-load start end str)
|
||||
(let* ([s (if str
|
||||
str
|
||||
(let* ([sp (find-system-path 'exec-file)]
|
||||
[exe (find-executable-path sp #f)]
|
||||
[start (or (string->number start) 0)]
|
||||
[end (or (string->number end) 0)])
|
||||
(with-input-from-file exe
|
||||
(lambda ()
|
||||
(file-position (current-input-port) start)
|
||||
(read-bytes (max 0 (- end start)))))))]
|
||||
[p (open-input-bytes s)])
|
||||
(namespace-require ''#%kernel)
|
||||
(let loop ()
|
||||
(let ([e (parameterize ([read-accept-compiled #t])
|
||||
(read p))])
|
||||
(unless (eof-object? e) (eval e) (loop)))))))
|
||||
(unless (eof-object? e)
|
||||
(eval e)
|
||||
(loop)))))))
|
||||
|
||||
;; ----------------------------------------
|
||||
;; A module that collects all the built-in modules,
|
||||
|
|
|
@ -40,6 +40,13 @@
|
|||
#ifndef XPMP_h
|
||||
#define XPMP_h
|
||||
|
||||
/* We don't want all those "deprecated" messages: */
|
||||
#ifndef WX_KEEP_DEPRECATED_WARNINGS
|
||||
# include <AvailabilityMacros.h>
|
||||
# undef DEPRECATED_ATTRIBUTE
|
||||
# define DEPRECATED_ATTRIBUTE /**/
|
||||
#endif
|
||||
|
||||
#include "xpm34.h"
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user