Remove variable si::*system-directory* and use logical hostname "SYS:" instead.

This commit is contained in:
jjgarcia 2001-07-19 07:45:02 +00:00
parent ea010dee34
commit c8c446db10
17 changed files with 49 additions and 44 deletions

View file

@ -622,8 +622,8 @@ ECLS 0.1a
* SETF revised. Now it, and all accessors are implemented as macros
with no special support from the interpreter.
ECLS 0.1b
=========
ECLS 0.2
========
* Due to human errors, the bytecompiler shipped with 0.1a was not the
finished version. In 0.1b we shipped a more polished files. Some of
@ -661,6 +661,28 @@ ECLS 0.1b
designators, i.e. (nstring-upcase "aa" :start nil :end nil) causes
an error.
ECLS 0.3
========
* Add name mangling to ECLS:
- In the preprocessed files (*.d) @package::symbol can be used to
refer to a lisp function, while @'package::symbol can be used to
refer to a lisp symbol. The preprocessor translates these names
into valid C names.
- Function SI::MANGLE-NAME returns the C name for a lisp symbol
or function, and tells whether that symbol has been defined as
external C function already.
- A new proclamation
(proclaim '(si::c-export-fname union))
advises the lisp->C translator to produce a C function with
mangle named (clLunion in this case), that can be directly called
from other translated files and from user written code.
- The dynamic loader can now reexport symbols from object files,
so that they become available to other files.
* Remove variable si::*system-directory* and use logical hostname
"SYS:" instead.
TODO:
=====

View file

@ -24,10 +24,10 @@
(load "cmp/load.lsp")
;;;
;;; * By redefining *system-directory* ECLS will be able to
;;; * By redefining "SYS:" ECLS will be able to
;;; find headers and libraries in the build directory.
;;;
(setq si::*system-directory* (namestring (sys::chdir "./")))
(si::pathname-translations "SYS" '(("*.*" "./*.*")))
;;;
;;; * Add include path to not yet installed headers

View file

@ -151,7 +151,6 @@ const struct symbol_info all_symbols[] = {
{&siVinhibit_macro_special, "*INHIBIT-MACRO-SPECIAL*", SI_SPECIAL},
/* main.c */
{&siVsystem_directory, "*SYSTEM-DIRECTORY*", SI_SPECIAL},
{&clVfeatures, "*FEATURES*", CL_SPECIAL},
/* num_rand.c */

View file

@ -47,7 +47,7 @@ init_lisp_libs(void)
SYM_VAL(@'*package*') = system_package;
SYM_VAL(@'*features*') = CONS(make_keyword("ECLS-MIN"), SYM_VAL(@'*features*'));
#ifdef RSYM
SYM_VAL(@'si::*symbol_table*') = make_simple_string("ecls_min.sym");
SYM_VAL(@'si::*symbol_table*') = make_simple_string("SYS:ecls_min.sym");
#endif
make_si_function("TOP-LEVEL", @si::simple-toplevel);
}

View file

@ -194,8 +194,7 @@ build_symbol_table()
{
cl_object file;
const char *tmpfile;
file = namestring(@merge-pathnames(2, SYM_VAL(@'si::*symbol-table*'),
SYM_VAL(@'si::*system-directory*')));
file = coerce_to_filename(SYM_VAL(@'si::*symbol-table*'));
tmpfile = file->string.self;
if (!symbol_table_built)
if (read_special_symbols(tmpfile) < 0)
@ -203,15 +202,6 @@ build_symbol_table()
}
#endif
const char *
system_directory()
{
cl_object dir = SYM_VAL(@'si::*system-directory*');
while (type_of(dir) != t_string)
FEerror("The value of sys::*system-directory* is not a string, ~A", 1, dir);
return dir->string.self;
}
/* ---------------------------------------------------------------------- */
#if 0
@ -253,6 +243,6 @@ init_load(void)
CONS(Cnil, load_source));
#ifdef RSYM
SYM_VAL(@'si::*symbol-table*') = make_simple_string("ecl.sym");
SYM_VAL(@'si::*symbol-table*') = make_simple_string("SYS:ecls.sym");
#endif
}

View file

@ -44,7 +44,6 @@ int data_start = (int)&data_start;
/******************************* EXPORTS ******************************/
cl_object clVfeatures;
cl_object @'si::*system-directory*';
const char *ecl_self;
/******************************* ------- ******************************/
@ -196,8 +195,6 @@ init_main(void)
make_ordinary("LISP-IMPLEMENTATION-VERSION");
SYM_VAL(@'si::*system-directory*') = make_simple_string("./");
{ cl_object features;
features =
CONS(make_keyword("ECLS"),

View file

@ -1181,6 +1181,10 @@ translate_logical_pathname(cl_object source)
void
init_pathname(void)
{
register_root(&pathname_translations);
SYM_VAL(@'*default-pathname-defaults*') =
make_pathname(Cnil, Cnil, Cnil, Cnil, Cnil, Cnil);
@si::pathname-translations(2,make_simple_string("SYS"),
list(1,list(2,make_simple_string("*.*"),
make_simple_string("./*.*"))));
}

View file

@ -58,7 +58,7 @@
display) (display))))
;;
:source-directory "@srcdir@/"
:fasl-directory "./"
:library-directory "../")
:fasl-directory "@builddir@/clx/"
:library-directory "@builddir@/")
;;
;;; ----------------------------------------------------------------------

View file

@ -84,12 +84,12 @@ init_~A(cl_object)
(format nil
*ld-format*
*cc* (namestring o-pathname)
(namestring sys::*system-directory*)
(namestring (translate-logical-pathname "SYS:"))
options *ld-flags*)))
(defun rsym (name)
(let ((output (make-pathname :name (pathname-name name) :type "sym"))
(rsym (make-pathname :name "rsym" :defaults sys::*system-directory*)))
(rsym (translate-logical-pathname "SYS:rsym")))
(cond ((not (probe-file rsym))
(error "rsym executable not found"))
((not (probe-file name))
@ -124,7 +124,7 @@ init_lisp_libs(void)
(error "compiler::build-ecls wrong argument ~A" item))))
(format c-file "
#ifdef RSYM
SYM_VAL(siVsymbol_table) = make_simple_string(\"~A.sym\");
SYM_VAL(siVsymbol_table) = make_simple_string(\"SYS:~A.sym\");
#endif
return;~%}~%" name))
(compiler-cc c-name o-name)
@ -468,7 +468,7 @@ Cannot compile ~a."
(format nil
*cc-format*
*cc* *cc-flags* (>= *speed* 2) *cc-optimize*
(namestring sys::*system-directory*)
(namestring (translate-logical-pathname "SYS:"))
(namestring c-pathname)
(namestring o-pathname))
; Since the SUN4 assembler loops with big files, you might want to use this:

View file

@ -11,7 +11,7 @@
(proclaim '(optimize (safety 2) (space 3)))
(sbt::operate-on-system lsp :library)
(sbt::operate-on-system lsp :load)
(setq si::*system-directory* (namestring (sys::chdir "./")))
(si::pathname-translations "SYS" '(("*.*" "./*.*")))
(setq compiler::*cc-flags* (concatenate 'string compiler::*cc-flags* " -I@srcdir@/h -I@srcdir@/gmp -I@builddir@/h"))
#ifndef RUNTIME

View file

@ -5,12 +5,8 @@
;;; * Learn where we come from and where we go to
;;;
(in-package "SYSTEM")
(*make-special '*ecls-srcdir*) ; defparameter is missing
(*make-special '*ecls-builddir*)
(setq *ecls-srcdir* #P"@srcdir@/")
(setq *ecls-builddir* (sys::chdir *ecls-srcdir*))
(setq *system-directory* *ecls-builddir*)
(setq compiler::*cc-flags* (concatenate 'string compiler::*cc-flags* " -I@srcdir@/h -I@srcdir@/gmp "))
(si::pathname-translations "SYS" '(("*.*" "./*.*")))
(setq compiler::*cc-flags* (concatenate 'string compiler::*cc-flags* " -I@srcdir@/h -I@srcdir@/gmp -I@builddir@/h"))
;;;
;;; * Load system builder tool
@ -34,11 +30,9 @@
;;; * Compile and link MIT CLX extensions
;;;
(push :clx-ansi-common-lisp *features*)
(sys::chdir (merge-pathnames "clx/" sys::*ecls-builddir*))
(load "defsys.lsp")
(sbt::operate-on-system clx :library)
(sys::chdir sys::*ecls-builddir*)
(compiler::build-ecls "eclx"
#ifndef RUNTIME
'cmp

View file

@ -448,7 +448,6 @@ extern void init_list(void);
extern void init_load(void);
extern void load_until_tag(cl_object stream, cl_object end_tag);
extern void build_symbol_table();
extern const char *system_directory();
/* lwp.c */
#ifdef THREADS

View file

@ -480,7 +480,6 @@ extern cl_object clLmacroexpand_1 _ARGS((int narg, cl_object form, ...));
/* main.c */
extern cl_object clVfeatures;
extern cl_object siVsystem_directory;
extern cl_object clLquit _ARGS((int narg, ...));
extern cl_object siLargc _ARGS((int narg));
extern cl_object siLargv _ARGS((int narg, cl_object index));

View file

@ -51,13 +51,13 @@
(unless (sys::specialp var) (return nil)))))
(defun compile-file (&rest args)
(load (merge-pathnames sys:*system-directory* "compiler"))
(load "SYS:compiler")
(apply 'compile-file args))
(defun compile (&rest args)
(load (merge-pathnames sys:*system-directory* "compiler"))
(load "SYS:compiler")
(apply 'compile args))
(defun disassemble (&rest args)
(load (merge-pathnames sys:*system-directory* "compiler"))
(load "SYS:compiler")
(apply 'disassemble args))
)

View file

@ -34,4 +34,4 @@
;; * Set configuration pathnames. Notice the trailing slash!
;; Otherwise it would not be a directory.
;;
(setq sys:*system-directory* "@libdir@/")
(si::pathname-translations "SYS" '(("*.*" "@libdir@/*.*")))

View file

@ -541,7 +541,7 @@ q (or Q): quits the inspection.~%~
;; where F means Function, V Variable and T Type.
;;
(let* ((name (symbol-name symbol))
(path (merge-pathnames *system-directory* "help.doc"))
(path "SYS:help.doc")
(pos 0))
(labels ((bin-search (file start end &aux (delta 0) (middle 0) sym)

View file

@ -354,7 +354,8 @@
(incf i)
(if (= i argc)
(error "Missing directory")
(setq *system-directory* (argv i))))
(setf (logical-pathname-translations "SYS")
`(("SYS:*.*" ,(concatenate (argv i) "*.*"))))))
((string= "-compile" (argv i))
(incf i)
(if (= i argc)