- if IKARUS_LIBRARY_PATH is set, "." is no longer added to

library-path, so, whereever you set it, you should decide whether
  to include "." or exclude it.
  ["$prefix/lib/ikarus" is still added to the path so that multiple
  versions of ikarus can exist and each uses its own sources dir
  without interference]

- some cleanup in compiler to use the new include library instead of 
  "ikarus.include-src.ss" which is no longer needed.
This commit is contained in:
Abdulaziz Ghuloum 2009-05-30 10:46:45 +03:00
parent ac0e583310
commit eec9453fc7
10 changed files with 18 additions and 45 deletions

View File

@ -37,7 +37,7 @@ EXTRA_DIST=ikarus.boot.4.prebuilt ikarus.boot.8.prebuilt last-revision \
ikarus.string-to-number.ss ikarus.compiler.source-optimizer.ss \ ikarus.string-to-number.ss ikarus.compiler.source-optimizer.ss \
ikarus.compiler.tag-annotation-analysis.ss ikarus.ontology.ss \ ikarus.compiler.tag-annotation-analysis.ss ikarus.ontology.ss \
ikarus.reader.annotated.ss ikarus.pointers.ss ikarus.equal.ss \ ikarus.reader.annotated.ss ikarus.pointers.ss ikarus.equal.ss \
ikarus.symbol-table.ss ikarus.apropos.ss ikarus.include-src.ss \ ikarus.symbol-table.ss ikarus.apropos.ss \
ikarus.debugger.ss \ ikarus.debugger.ss \
tests/SRFI-1.ss \ tests/SRFI-1.ss \
tests/bignum-to-flonum.ss \ tests/bignum-to-flonum.ss \

View File

@ -192,7 +192,7 @@ EXTRA_DIST = ikarus.boot.4.prebuilt ikarus.boot.8.prebuilt last-revision \
ikarus.string-to-number.ss ikarus.compiler.source-optimizer.ss \ ikarus.string-to-number.ss ikarus.compiler.source-optimizer.ss \
ikarus.compiler.tag-annotation-analysis.ss ikarus.ontology.ss \ ikarus.compiler.tag-annotation-analysis.ss ikarus.ontology.ss \
ikarus.reader.annotated.ss ikarus.pointers.ss ikarus.equal.ss \ ikarus.reader.annotated.ss ikarus.pointers.ss ikarus.equal.ss \
ikarus.symbol-table.ss ikarus.apropos.ss ikarus.include-src.ss \ ikarus.symbol-table.ss ikarus.apropos.ss \
ikarus.debugger.ss \ ikarus.debugger.ss \
tests/SRFI-1.ss \ tests/SRFI-1.ss \
tests/bignum-to-flonum.ss \ tests/bignum-to-flonum.ss \

View File

@ -321,7 +321,7 @@
(make-codes (map Clambda code*) (Main body))])) (make-codes (map Clambda code*) (Main body))]))
(Program x)) (Program x))
(include-src "pass-specify-rep.ss") (include "pass-specify-rep.ss")
(define parameter-registers '(%edi)) (define parameter-registers '(%edi))
(define return-value-register '%eax) (define return-value-register '%eax)

View File

@ -29,7 +29,6 @@
(ikarus system $pairs) (ikarus system $pairs)
(only (ikarus system $codes) $code->closure) (only (ikarus system $codes) $code->closure)
(only (ikarus system $structs) $struct-ref $struct/rtd?) (only (ikarus system $structs) $struct-ref $struct/rtd?)
(ikarus.include-src)
(except (ikarus) (except (ikarus)
optimize-level debug-optimizer optimize-level debug-optimizer
fasl-write scc-letrec optimize-cp fasl-write scc-letrec optimize-cp
@ -39,6 +38,7 @@
expand/optimize expand optimizer-output expand/optimize expand optimizer-output
tag-analysis-output perform-tag-analysis tag-analysis-output perform-tag-analysis
current-core-eval) current-core-eval)
(ikarus include)
(ikarus.fasl.write) (ikarus.fasl.write)
(ikarus.intel-assembler)) (ikarus.intel-assembler))
@ -1092,7 +1092,7 @@
;(pretty-print (unparse x)) ;(pretty-print (unparse x))
x)) x))
(include-src "ikarus.compiler.source-optimizer.ss") (include "ikarus.compiler.source-optimizer.ss")
(define (rewrite-assignments x) (define (rewrite-assignments x)
(define who 'rewrite-assignments) (define who 'rewrite-assignments)
@ -1180,7 +1180,7 @@
[else (error who "invalid expression" (unparse x))])) [else (error who "invalid expression" (unparse x))]))
(Expr x)) (Expr x))
(include-src "ikarus.compiler.tag-annotation-analysis.ss") (include "ikarus.compiler.tag-annotation-analysis.ss")
(define (introduce-vars x) (define (introduce-vars x)
(define who 'introduce-vars) (define who 'introduce-vars)
@ -2469,7 +2469,7 @@
(lambda (x) (lambda (x)
((current-core-eval) x))) ((current-core-eval) x)))
(include-src "ikarus.compiler.altcogen.ss") (include "ikarus.compiler.altcogen.ss")
(define current-primitive-locations (define current-primitive-locations
(let ([plocs (lambda (x) #f)]) (let ([plocs (lambda (x) #f)])

View File

@ -16,7 +16,7 @@
;;; THIS IS WIP ;;; THIS IS WIP
(include-src "ikarus.ontology.ss") (include "ikarus.ontology.ss")
(define tag-analysis-output (make-parameter #f)) (define tag-analysis-output (make-parameter #f))

View File

@ -1,28 +0,0 @@
;;; Ikarus Scheme -- A compiler for R6RS Scheme.
;;; Copyright (C) 2009 Abdulaziz Ghuloum
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License version 3 as
;;; published by the Free Software Foundation.
;;;
;;; This program is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;; General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(library (ikarus.include-src)
(export include-src)
(import (ikarus) (ikarus include))
(define-syntax include-src
(lambda (x)
(syntax-case x ()
[(ctxt filename)
(with-syntax ([filename
(string-append
(or (getenv "IKARUS_SRC_DIR") ".")
"/"
(syntax->datum #'filename))])
#'(include/lexical-context filename ctxt))]))))

View File

@ -59,10 +59,11 @@
(define (init-library-path) (define (init-library-path)
(library-path (library-path
(cons "."
(append (append
(split-path (or (getenv "IKARUS_LIBRARY_PATH") "")) (cond
(list ikarus-lib-dir)))) [(getenv "IKARUS_LIBRARY_PATH") => split-path]
[else '(".")])
(list ikarus-lib-dir)))
(let ([prefix (let ([prefix
(lambda (ext ls) (lambda (ext ls)
(append (map (lambda (x) (string-append ext x)) ls) ls))]) (append (map (lambda (x) (string-append ext x)) ls) ls))])

View File

@ -31,7 +31,7 @@
string-ci=? string-ci>? string-ci>=? string-normalize-nfd string-ci=? string-ci>? string-ci>=? string-normalize-nfd
string-normalize-nfkd string-normalize-nfc string-normalize-nfkc ) string-normalize-nfkd string-normalize-nfc string-normalize-nfkc )
(import (import
(ikarus.include-src) (ikarus include)
(except (ikarus) (except (ikarus)
unicode-printable-char? unicode-printable-char?
char-upcase char-downcase char-titlecase char-foldcase char-upcase char-downcase char-titlecase char-foldcase
@ -100,8 +100,8 @@
(define (char- x y) (define (char- x y)
(fx- (char->integer x) (char->integer y))) (fx- (char->integer x) (char->integer y)))
(include-src "unicode/unicode-char-cases.ss") (include "unicode/unicode-char-cases.ss")
(include-src "unicode/unicode-charinfo.ss") (include "unicode/unicode-charinfo.ss")
(define-syntax define-char-op (define-syntax define-char-op
(syntax-rules () (syntax-rules ()

View File

@ -1 +1 @@
1800 1801

View File

@ -590,4 +590,4 @@
(let ([x (Program x)]) (let ([x (Program x)])
x)) x))
(include-src "pass-specify-rep-primops.ss")) (include "pass-specify-rep-primops.ss"))