From 9995c4454f37aa63690a691b0be2b569d9744839 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 19 Aug 2012 21:32:25 +0000 Subject: * configure.ac: Define Automake conditional OA_DELAYED_FFI. * config/open-axiom.m4 (OPENAXIOM_CHECK_DELAYED_FFI): New. (OPENAXIOM_HOST_COMPILERS): Call it. src/ * lisp/core.lisp.in (primitiveLoad): New. Export. ($delayedFFI): Likewise. * lisp/Makefile.in (oa_delay_ffi): New. (edit): Update. * interp/sys-utility.boot: import sys-constants instead of sys-os. * interp/sys-driver.boot (%sysInit): Do not loadSystemRuntimeCore. (loadDelayedFFI): New. (executeSpadScript): Call it. (compileSpadLibrary): Likewise. (buildInitdbHandler): Likewise. (systemMain): Likewise. * interp/util.lisp (BUILD-INTERPSYS): Likewise. * interp/Makefile.in (oa_target_moddir): New. (OA_FFI_MOD): Likewise. (OA_FFI_OBJ): Define conditionally. (OBJS): Use it. ($(oa_target_delayed)): New rule. (oa_target_delayed): New. (oa_target_ffi): Define conditionally. (${SAVESYS}): Require it. (${AXIOMSYS}): Likewise. (sys-utility.$(FASLEXT)): Now require sys-constants.$(FASLEXT). --- src/lisp/Makefile.in | 2 ++ src/lisp/core.lisp.in | 10 ++++++++++ 2 files changed, 12 insertions(+) (limited to 'src/lisp') diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in index 77c8edb8..6bfc0ee4 100644 --- a/src/lisp/Makefile.in +++ b/src/lisp/Makefile.in @@ -132,6 +132,7 @@ $(oa_target_lispdir)/linkset: $(oa_target_lispdir)/core.$(LNKEXT) echo '$(base_lisp_objects)' > $@ oa_optimize_options = @oa_optimize_options@ +oa_delay_ffi = @oa_delay_ffi@ oa_editor = @oa_editor@ @@ -161,6 +162,7 @@ edit = sed \ -e 's|@oa_c_runtime_extra[@]|$(patsubst %,"%",$(oa_c_runtime_extra))|g' \ -e 's|@oa_standard_linking[@]|$(oa_standard_linking)|g' \ -e 's|@oa_enable_profiling[@]|$(oa_enable_lisp_profiling)|g' \ + -e 's|@oa_delay_ffi[@]|$(oa_delay_ffi)|g' \ -e 's|@void_type[@]|$(void_type)|g' \ -e 's|@char_type[@]|$(char_type)|g' \ -e 's|@int_type[@]|$(int_type)|g' \ diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index d869cbf4..becb1390 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -139,6 +139,7 @@ "%FunctorDefaultTable" "%FunctorLookupFunction" + "primitiveLoad" "coreQuit" "fatalError" "internalError" @@ -176,6 +177,7 @@ "$targetPlatform" "$faslType" + "$delayedFFI" "$effectiveFaslType" "$NativeModuleExt" "$systemInstallationDirectory" @@ -420,6 +422,10 @@ #+:gcl nil #-(or :ecl :gcl) t) +;; True if FFI modules were delayed till runtime. +(defconstant |$delayedFFI| + (eq '@oa_delay_ffi@ 'yes)) + ;; The top level read-eval-print loop function of the base ;; Lisp system we are using. This is a very brittle way ;; of achieving something conceptually simple. @@ -852,6 +858,10 @@ (error "don't know how to save Lisp image")) +;; Load a module designated by `f'. +(defmacro |primitiveLoad| (f) + `(load ,f)) + ;; ;; -*- Program Termination -*- ;; -- cgit v1.2.3