diff --git a/LOG b/LOG index 5cc743bf6a..72276ec978 100644 --- a/LOG +++ b/LOG @@ -59,6 +59,9 @@ object to a time-utc object. stats.c, 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 obviated scale_float in the process. number.c, diff --git a/mats/7.ms b/mats/7.ms index af14b759ce..4617c2e411 100644 --- a/mats/7.ms +++ b/mats/7.ms @@ -1918,6 +1918,40 @@ evaluating module init (equal? (separate-eval '(load "testfile-wpo-ab7-all.so")) "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 @@ -3011,6 +3045,45 @@ evaluating module init (equal? (separate-eval '(load-program "testfile-cwl-c13.so")) "(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") ) diff --git a/s/compile.ss b/s/compile.ss index a14ddb0f10..7a55d5be81 100644 --- a/s/compile.ss +++ b/s/compile.ss @@ -792,7 +792,7 @@ (define read-library (lambda (path libs-visible?) (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) (let-values ([(no-program node*) (process-ir*! (read-input-file who fn) fn #f libs-visible?)]) (values fn node*)))]