Merge branch 'master' of github.com:cisco/chezscheme
original commit: f5a668eeb104edb70c0188c15c2588b3618e0470
This commit is contained in:
commit
83f6c935e9
3
LOG
3
LOG
|
@ -59,6 +59,9 @@
|
||||||
object to a time-utc object.
|
object to a time-utc object.
|
||||||
stats.c,
|
stats.c,
|
||||||
date.ms
|
date.ms
|
||||||
|
- fixed incorrect handling of library-extension when searching wpo files
|
||||||
|
compile.ss,
|
||||||
|
7.ms
|
||||||
- modified floatify_normalize to properly round denormalized results and
|
- modified floatify_normalize to properly round denormalized results and
|
||||||
obviated scale_float in the process.
|
obviated scale_float in the process.
|
||||||
number.c,
|
number.c,
|
||||||
|
|
73
mats/7.ms
73
mats/7.ms
|
@ -1918,6 +1918,40 @@ evaluating module init
|
||||||
(equal?
|
(equal?
|
||||||
(separate-eval '(load "testfile-wpo-ab7-all.so"))
|
(separate-eval '(load "testfile-wpo-ab7-all.so"))
|
||||||
"invoking a\ninvoking c\ninvoking b\n#t\n#t\n#t\n")
|
"invoking a\ninvoking c\ninvoking b\n#t\n#t\n#t\n")
|
||||||
|
|
||||||
|
(begin
|
||||||
|
(with-output-to-file "testfile-wpo-extlib.chezscheme.sls"
|
||||||
|
(lambda ()
|
||||||
|
(pretty-print
|
||||||
|
'(library (testfile-wpo-extlib)
|
||||||
|
(export magic)
|
||||||
|
(import (rnrs))
|
||||||
|
(define magic (cons 9 5)))))
|
||||||
|
'replace)
|
||||||
|
(with-output-to-file "testfile-wpo-ext.ss"
|
||||||
|
(lambda ()
|
||||||
|
(pretty-print '(import (chezscheme) (testfile-wpo-extlib)))
|
||||||
|
(pretty-print '(pretty-print magic)))
|
||||||
|
'replace)
|
||||||
|
(separate-compile
|
||||||
|
'(lambda (x)
|
||||||
|
(parameterize ([compile-imported-libraries #t]
|
||||||
|
[generate-wpo-files #t])
|
||||||
|
(compile-program x)))
|
||||||
|
'wpo-ext)
|
||||||
|
#t)
|
||||||
|
|
||||||
|
(equal?
|
||||||
|
(separate-compile
|
||||||
|
'(lambda (x)
|
||||||
|
(parameterize ([generate-wpo-files #t])
|
||||||
|
(compile-whole-program (format "~a.wpo" x) (format "~a-all.so" x))))
|
||||||
|
'wpo-ext)
|
||||||
|
"()\n")
|
||||||
|
|
||||||
|
(equal?
|
||||||
|
(separate-eval '(load "testfile-wpo-ext-all.so"))
|
||||||
|
"(9 . 5)\n")
|
||||||
)
|
)
|
||||||
|
|
||||||
(mat compile-whole-library
|
(mat compile-whole-library
|
||||||
|
@ -3011,6 +3045,45 @@ evaluating module init
|
||||||
(equal?
|
(equal?
|
||||||
(separate-eval '(load-program "testfile-cwl-c13.so"))
|
(separate-eval '(load-program "testfile-cwl-c13.so"))
|
||||||
"(51 85 119)\n")
|
"(51 85 119)\n")
|
||||||
|
|
||||||
|
(begin
|
||||||
|
(with-output-to-file "testfile-wpo-extlib-1.chezscheme.sls"
|
||||||
|
(lambda ()
|
||||||
|
(pretty-print
|
||||||
|
'(library (testfile-wpo-extlib-1)
|
||||||
|
(export magic)
|
||||||
|
(import (rnrs))
|
||||||
|
(define magic (cons 9 5)))))
|
||||||
|
'replace)
|
||||||
|
(with-output-to-file "testfile-wpo-extlib-2.ss"
|
||||||
|
(lambda ()
|
||||||
|
(pretty-print
|
||||||
|
'(library (testfile-wpo-extlib-2)
|
||||||
|
(export p)
|
||||||
|
(import (chezscheme) (testfile-wpo-extlib))
|
||||||
|
(define p
|
||||||
|
(lambda ()
|
||||||
|
(pretty-print magic))))))
|
||||||
|
'replace)
|
||||||
|
(separate-compile
|
||||||
|
'(lambda (x)
|
||||||
|
(parameterize ([compile-imported-libraries #t]
|
||||||
|
[generate-wpo-files #t])
|
||||||
|
(compile-library x)))
|
||||||
|
'wpo-extlib-2)
|
||||||
|
#t)
|
||||||
|
|
||||||
|
(equal?
|
||||||
|
(separate-compile
|
||||||
|
'(lambda (x)
|
||||||
|
(parameterize ([generate-wpo-files #t])
|
||||||
|
(compile-whole-library (format "~a.wpo" x) (format "~a-all.so" x))))
|
||||||
|
'wpo-extlib-2)
|
||||||
|
"()\n")
|
||||||
|
|
||||||
|
(equal?
|
||||||
|
(separate-eval '(let () (import (testfile-wpo-extlib-2)) (p)))
|
||||||
|
"(9 . 5)\n")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -792,7 +792,7 @@
|
||||||
(define read-library
|
(define read-library
|
||||||
(lambda (path libs-visible?)
|
(lambda (path libs-visible?)
|
||||||
(cond
|
(cond
|
||||||
[(find-library who path "wpo" (map (lambda (ext) (cons (car ext) ".wpo")) (library-extensions))) =>
|
[(find-library who path "wpo" (map (lambda (ext) (cons (car ext) (string-append (path-root (cdr ext)) ".wpo"))) (library-extensions))) =>
|
||||||
(lambda (fn)
|
(lambda (fn)
|
||||||
(let-values ([(no-program node*) (process-ir*! (read-input-file who fn) fn #f libs-visible?)])
|
(let-values ([(no-program node*) (process-ir*! (read-input-file who fn) fn #f libs-visible?)])
|
||||||
(values fn node*)))]
|
(values fn node*)))]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user