diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rwxr-xr-x | configure | 63 | ||||
| -rw-r--r-- | configure.ac | 37 | ||||
| -rw-r--r-- | configure.ac.pamphlet | 13 | ||||
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/boot/translator.boot | 10 | ||||
| -rw-r--r-- | src/lisp/core.lisp.in | 3 | 
7 files changed, 90 insertions, 48 deletions
| @@ -1,3 +1,8 @@ +2008-08-07  Gabriel Dos Reis  <gdr@cs.tamu.edu> + +	* configure.ac.pamphlet: Add 'debug' to Lisp optimize proclamation +	when --enable-checking. +  2008-08-04  Gabriel Dos Reis  <gdr@cs.tamu.edu>  	* Makefile.pamphlet: Use $(mkdir_p) in lieu of $(mkinstalldirs), @@ -831,8 +831,6 @@ libext  oa_use_libtool_for_shared_lib  oa_shrobj_flags  oa_shrlib_flags -axiom_enable_checking -axiom_optimize_options  axiom_src_subdirs  target  target_cpu @@ -860,6 +858,8 @@ axiom_quiet_flags  axiom_eval_flags  axiom_fasl_type  axiom_all_prerequisites +axiom_enable_checking +axiom_optimize_options  axiom_c_runtime  axiom_c_runtime_extra  XMKMF @@ -1485,8 +1485,8 @@ Optional Features:    --enable-fast-install[=PKGS]                            optimize for fast installation [default=yes]    --disable-libtool-lock  avoid locking (might break parallel builds) -  --enable-checking  turn runtime checking on    --enable-gcl   build GCL from OpenAxiom source +  --enable-checking  turn runtime checking on  Optional Packages:    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes] @@ -19333,27 +19333,6 @@ esac -axiom_optimize_options=speed -## Shall we proclaim safety? -axiom_enable_checking=no          # don't turn on checking by default. -# Check whether --enable-checking was given. -if test "${enable_checking+set}" = set; then -  enableval=$enable_checking; case $enableval in -                  yes|no) axiom_enable_checking=$enableval ;; -                  *) { { echo "$as_me:$LINENO: error: erroneous value for --enable-checking" >&5 -echo "$as_me: error: erroneous value for --enable-checking" >&2;} -   { (exit 1); exit 1; }; } ;; -               esac -fi - -if test x"$axiom_enable_checking" = xyes; then -   axiom_optimize_options="$axiom_optimize_options safety" -   { echo "$as_me:$LINENO: runtime checking may increase compilation time" >&5 -echo "$as_me: runtime checking may increase compilation time" >&6;} -fi - - -  axiom_src_subdirs="lib hyper lisp boot interp share algebra input etc doc" @@ -21057,6 +21036,7 @@ esac +  cat >>confdefs.h <<_ACEOF  #define OPENAXIOM_BASE_RTS openaxiom_${axiom_lisp_flavor}_runtime  _ACEOF @@ -21126,6 +21106,33 @@ fi +axiom_optimize_options=speed +## Shall we proclaim safety? +axiom_enable_checking=no          # don't turn on checking by default. +# Check whether --enable-checking was given. +if test "${enable_checking+set}" = set; then +  enableval=$enable_checking; case $enableval in +                  yes|no) axiom_enable_checking=$enableval ;; +                  *) { { echo "$as_me:$LINENO: error: erroneous value for --enable-checking" >&5 +echo "$as_me: error: erroneous value for --enable-checking" >&2;} +   { (exit 1); exit 1; }; } ;; +               esac +fi + +if test x"$axiom_enable_checking" = xyes; then +   case $axiom_lisp_flavor in +     gcl) # GCL-2.6.x does not understand debug. +        axiom_optimize_options="$axiom_optimize_options safety" +        ;; +     *) axiom_optimize_options="$axiom_optimize_options safety debug" +        ;; +   esac +   { echo "$as_me:$LINENO: runtime checking may increase compilation time" >&5 +echo "$as_me: runtime checking may increase compilation time" >&6;} +fi + + +  # FIXME: Move this out of here.  axiom_c_runtime= @@ -26392,8 +26399,6 @@ libext!$libext$ac_delim  oa_use_libtool_for_shared_lib!$oa_use_libtool_for_shared_lib$ac_delim  oa_shrobj_flags!$oa_shrobj_flags$ac_delim  oa_shrlib_flags!$oa_shrlib_flags$ac_delim -axiom_enable_checking!$axiom_enable_checking$ac_delim -axiom_optimize_options!$axiom_optimize_options$ac_delim  axiom_src_subdirs!$axiom_src_subdirs$ac_delim  target!$target$ac_delim  target_cpu!$target_cpu$ac_delim @@ -26412,6 +26417,8 @@ PATCH!$PATCH$ac_delim  LATEX!$LATEX$ac_delim  MAKEINDEX!$MAKEINDEX$ac_delim  NOTANGLE!$NOTANGLE$ac_delim +NOWEAVE!$NOWEAVE$ac_delim +AXIOM_LISP!$AXIOM_LISP$ac_delim  _ACEOF    if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -26453,8 +26460,6 @@ _ACEOF  ac_delim='%!_!# '  for ac_last_try in false false false false false :; do    cat >conf$$subs.sed <<_ACEOF -NOWEAVE!$NOWEAVE$ac_delim -AXIOM_LISP!$AXIOM_LISP$ac_delim  axiom_include_gcl!$axiom_include_gcl$ac_delim  axiom_lisp_flavor!$axiom_lisp_flavor$ac_delim  axiom_gcl_rsym_hack!$axiom_gcl_rsym_hack$ac_delim @@ -26462,6 +26467,8 @@ axiom_quiet_flags!$axiom_quiet_flags$ac_delim  axiom_eval_flags!$axiom_eval_flags$ac_delim  axiom_fasl_type!$axiom_fasl_type$ac_delim  axiom_all_prerequisites!$axiom_all_prerequisites$ac_delim +axiom_enable_checking!$axiom_enable_checking$ac_delim +axiom_optimize_options!$axiom_optimize_options$ac_delim  axiom_c_runtime!$axiom_c_runtime$ac_delim  axiom_c_runtime_extra!$axiom_c_runtime_extra$ac_delim  XMKMF!$XMKMF$ac_delim diff --git a/configure.ac b/configure.ac index d5725cd7..7f169139 100644 --- a/configure.ac +++ b/configure.ac @@ -44,21 +44,6 @@ AC_SUBST(oa_use_libtool_for_shared_lib)  AC_SUBST(oa_shrobj_flags)  AC_SUBST(oa_shrlib_flags) -axiom_optimize_options=speed -## Shall we proclaim safety? -axiom_enable_checking=no          # don't turn on checking by default. -AC_ARG_ENABLE([checking], [  --enable-checking  turn runtime checking on], -              [case $enableval in -                  yes|no) axiom_enable_checking=$enableval ;; -                  *) AC_MSG_ERROR([erroneous value for --enable-checking]) ;; -               esac]) -if test x"$axiom_enable_checking" = xyes; then -   axiom_optimize_options="$axiom_optimize_options safety" -   AC_MSG_NOTICE([runtime checking may increase compilation time]) -fi -AC_SUBST(axiom_enable_checking) -AC_SUBST(axiom_optimize_options) -  axiom_src_subdirs="lib hyper lisp boot interp share algebra input etc doc"  AC_SUBST(axiom_src_subdirs) @@ -274,6 +259,7 @@ case $axiom_include_gcl,$axiom_lisp in         esac         AC_MSG_RESULT([$axiom_lisp_flavor])  esac +  AC_SUBST(axiom_include_gcl)  AC_SUBST(axiom_lisp_flavor)  AC_DEFINE_UNQUOTED([OPENAXIOM_BASE_RTS], @@ -338,6 +324,27 @@ fi  AC_SUBST(axiom_fasl_type)  AC_SUBST(axiom_all_prerequisites) +axiom_optimize_options=speed +## Shall we proclaim safety? +axiom_enable_checking=no          # don't turn on checking by default. +AC_ARG_ENABLE([checking], [  --enable-checking  turn runtime checking on], +              [case $enableval in +                  yes|no) axiom_enable_checking=$enableval ;; +                  *) AC_MSG_ERROR([erroneous value for --enable-checking]) ;; +               esac]) +if test x"$axiom_enable_checking" = xyes; then +   case $axiom_lisp_flavor in +     gcl) # GCL-2.6.x does not understand debug. +        axiom_optimize_options="$axiom_optimize_options safety"  +        ;; +     *) axiom_optimize_options="$axiom_optimize_options safety debug"  +        ;; +   esac +   AC_MSG_NOTICE([runtime checking may increase compilation time]) +fi + +AC_SUBST(axiom_enable_checking) +AC_SUBST(axiom_optimize_options)  # FIXME: Move this out of here.    axiom_c_runtime= diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet index 161704bf..379668b4 100644 --- a/configure.ac.pamphlet +++ b/configure.ac.pamphlet @@ -451,9 +451,16 @@ AC_ARG_ENABLE([checking], [  --enable-checking  turn runtime checking on],                    *) AC_MSG_ERROR([erroneous value for --enable-checking]) ;;                 esac])  if test x"$axiom_enable_checking" = xyes; then -   axiom_optimize_options="$axiom_optimize_options safety" +   case $axiom_lisp_flavor in +     gcl) # GCL-2.6.x does not understand debug. +        axiom_optimize_options="$axiom_optimize_options safety"  +        ;; +     *) axiom_optimize_options="$axiom_optimize_options safety debug"  +        ;; +   esac     AC_MSG_NOTICE([runtime checking may increase compilation time])  fi +  AC_SUBST(axiom_enable_checking)  AC_SUBST(axiom_optimize_options)  @ @@ -890,6 +897,7 @@ case $axiom_include_gcl,$axiom_lisp in         esac         AC_MSG_RESULT([$axiom_lisp_flavor])  esac +  AC_SUBST(axiom_include_gcl)  AC_SUBST(axiom_lisp_flavor)  AC_DEFINE_UNQUOTED([OPENAXIOM_BASE_RTS], @@ -1275,8 +1283,6 @@ AC_SUBST(oa_shrlib_flags)  <<initialize shared libraries tool>> -<<runtime checking>> -  axiom_src_subdirs="lib hyper lisp boot interp share algebra input etc doc"  AC_SUBST(axiom_src_subdirs) @@ -1295,6 +1301,7 @@ case $host in  esac  <<build utils>> +<<runtime checking>>  # FIXME: Move this out of here.    axiom_c_runtime= diff --git a/src/ChangeLog b/src/ChangeLog index 38e08d62..463f784e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2008-08-07  Gabriel Dos Reis  <gdr@cs.tamu.edu> + +	* boot/translator.boot (genOptimizeOptions): New. +	(shoeClLines): Use it. +	(shorClCLines): Likewise. +	* lisp/core.lisp.in ($LispOptimizeOptions): New; export. +  2008-08-06  Gabriel Dos Reis  <gdr@cs.tamu.edu>  	* interp/Makefile.pamphlet (makeint.lisp): Tidy. diff --git a/src/boot/translator.boot b/src/boot/translator.boot index 01778e2e..86aada78 100644 --- a/src/boot/translator.boot +++ b/src/boot/translator.boot @@ -60,6 +60,10 @@ genModuleFinalization(stream) ==      REALLYPRETTYPRINT(init,stream)    nil +genOptimizeOptions stream == +  REALLYPRETTYPRINT +    (["PROCLAIM",["QUOTE",["OPTIMIZE",:$LispOptimizeOptions]]],stream) +  +++ True if we are translating code written in Old Boot.  $translatingOldBoot := false @@ -106,7 +110,8 @@ shoeClLines(a,fn,lines,outfn)==    a=nil => shoeNotFound fn    $GenVarCounter := 0    shoeOpenOutputFile(stream,outfn,_ -    ((for line in lines repeat shoeFileLine(line,stream); +    (genOptimizeOptions stream; +     (for line in lines repeat shoeFileLine(line,stream);         shoeFileTrees(shoeTransformStream a,stream));        genModuleFinalization(stream)))    outfn @@ -130,7 +135,8 @@ shoeClCLines(a,fn,lines,outfn)==    a=nil => shoeNotFound fn    $GenVarCounter := 0    shoeOpenOutputFile(stream,outfn, -    (for line in lines repeat shoeFileLine (line,stream); +    (genOptimizeOptions stream; +     for line in lines repeat shoeFileLine (line,stream);        shoeFileTrees(shoeTransformToFile(stream,  	  shoeInclude bAddLineNumber(bRgen a,bIgen 0)),stream);        genModuleFinalization(stream))) diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index 4996a7d5..96ae877f 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -78,6 +78,7 @@  	   "$NativeModuleExt"  	   "$systemInstallationDirectory"  	   "$NativeTypeTable" +	   "$LispOptimizeOptions"             "getCommandLineArguments"             "processCommandLine" @@ -119,6 +120,8 @@    "@open_axiom_installdir@/")  ;; Lisp compiler optimization settings. +(defconstant |$LispOptimizeOptions| +  '(@axiom_optimize_options@))  (proclaim '(optimize @axiom_optimize_options@))  ;;  | 
