Skip to content
This repository
Browse code

Add --enable-auto-forcing configuration option to enable automaticall…

…y forcing promises.
  • Loading branch information...
commit abb08f51a08b67363543ad56fae470bcc4ca09b4 1 parent 128ccb5
Marc Feeley authored
4 INSTALL.txt
@@ -215,6 +215,10 @@ The configure options which are specific to the Gambit-C system are:
215 215 --enable-help-browser=BROWSER
216 216 use the specified browser to view documentation
217 217 requested through the help procedure or REPL
  218 + --enable-auto-forcing
  219 + cause strict operations such as car, but not
  220 + cons, to automatically force their arguments
  221 + (requires: make bootstrap; make bootclean; make)
218 222
219 223 The option --enable-cplusplus should be used when applications
220 224 developped with the Gambit-C compiler are to be linked with code or
26 configure
@@ -887,6 +887,7 @@ ENABLE_ABSOLUTE_SHARED_LIBS
887 887 ENABLE_VERSIONNED_LIBS
888 888 emacsdir
889 889 HELP_BROWSER
  890 +COMPILATION_OPTIONS
890 891 SET_MAKE
891 892 LIBOBJS
892 893 LTLIBOBJS'
@@ -1519,6 +1520,7 @@ Optional Features:
1519 1520 absolute path (default is YES)
1520 1521 --enable-help-browser=BROWSER
1521 1522 Browser to use for help (default is to search)
  1523 + --enable-auto-forcing automatically force promises (default is NO)
1522 1524
1523 1525 Optional Packages:
1524 1526 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -2177,6 +2179,8 @@ DEFS_EXE=""
2177 2179
2178 2180 DEFS_OBJ_DYN_LIB_EXE=""
2179 2181
  2182 +COMPILATION_OPTIONS="-check"
  2183 +
2180 2184 ###############################################################################
2181 2185 #
2182 2186 # Check if the system must be compiled using the C compiler or C++ compiler.
@@ -5796,6 +5800,24 @@ fi
5796 5800
5797 5801 ###############################################################################
5798 5802 #
  5803 +# Check if the system must automatically force promises.
  5804 +
  5805 +# Check whether --enable-auto-forcing was given.
  5806 +if test "${enable_auto_forcing+set}" = set; then
  5807 + enableval=$enable_auto_forcing; ENABLE_AUTO_FORCING=$enableval
  5808 +else
  5809 + ENABLE_AUTO_FORCING=no
  5810 +fi
  5811 +
  5812 +
  5813 +if test "$ENABLE_AUTO_FORCING" = yes; then
  5814 +
  5815 + COMPILATION_OPTIONS="$COMPILATION_OPTIONS -force"
  5816 +
  5817 +fi
  5818 +
  5819 +###############################################################################
  5820 +#
5799 5821 # Check for C compiler.
5800 5822
5801 5823
@@ -26635,6 +26657,7 @@ INSTALL_PROGRAM='$(rootfromhere)/install-sh -c -m 755'
26635 26657
26636 26658
26637 26659
  26660 +
26638 26661 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
26639 26662 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
26640 26663 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
@@ -27667,12 +27690,13 @@ ENABLE_ABSOLUTE_SHARED_LIBS!$ENABLE_ABSOLUTE_SHARED_LIBS$ac_delim
27667 27690 ENABLE_VERSIONNED_LIBS!$ENABLE_VERSIONNED_LIBS$ac_delim
27668 27691 emacsdir!$emacsdir$ac_delim
27669 27692 HELP_BROWSER!$HELP_BROWSER$ac_delim
  27693 +COMPILATION_OPTIONS!$COMPILATION_OPTIONS$ac_delim
27670 27694 SET_MAKE!$SET_MAKE$ac_delim
27671 27695 LIBOBJS!$LIBOBJS$ac_delim
27672 27696 LTLIBOBJS!$LTLIBOBJS$ac_delim
27673 27697 _ACEOF
27674 27698
27675   - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 78; then
  27699 + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 79; then
27676 27700 break
27677 27701 elif $ac_last_try; then
27678 27702 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
19 configure.ac
@@ -53,6 +53,8 @@ DEFS_EXE=""
53 53
54 54 DEFS_OBJ_DYN_LIB_EXE=""
55 55
  56 +COMPILATION_OPTIONS="-check"
  57 +
56 58 ###############################################################################
57 59 #
58 60 # Check if the system must be compiled using the C compiler or C++ compiler.
@@ -502,6 +504,22 @@ AC_ARG_ENABLE(help-browser,
502 504
503 505 ###############################################################################
504 506 #
  507 +# Check if the system must automatically force promises.
  508 +
  509 +AC_ARG_ENABLE(auto-forcing,
  510 + AC_HELP_STRING([--enable-auto-forcing],
  511 + [automatically force promises (default is NO)]),
  512 + ENABLE_AUTO_FORCING=$enableval,
  513 + ENABLE_AUTO_FORCING=no)
  514 +
  515 +if test "$ENABLE_AUTO_FORCING" = yes; then
  516 +
  517 + COMPILATION_OPTIONS="$COMPILATION_OPTIONS -force"
  518 +
  519 +fi
  520 +
  521 +###############################################################################
  522 +#
505 523 # Check for C compiler.
506 524
507 525 AC_DEFUN(AC_CHECK_C_COMPILER_DEF,
@@ -2135,6 +2153,7 @@ AC_SUBST(ENABLE_ABSOLUTE_SHARED_LIBS)
2135 2153 AC_SUBST(ENABLE_VERSIONNED_LIBS)
2136 2154 AC_SUBST(emacsdir)
2137 2155 AC_SUBST(HELP_BROWSER)
  2156 +AC_SUBST(COMPILATION_OPTIONS)
2138 2157
2139 2158 AC_PROG_MAKE_SET
2140 2159
2  gsc/makefile.in
@@ -213,7 +213,7 @@ _gsc_@obj@: _gsc_.c
213 213 @BUILD_OBJ@ -D___LIBRARY
214 214
215 215 .scm.c:
216   - @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c -check $(srcdirpfx)$*.scm
  216 + @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c @COMPILATION_OPTIONS@ $(srcdirpfx)$*.scm
217 217
218 218 _gsc.c: $(srcdirpfx)$(rootfromhere)/gsi/main.scm
219 219
2  gsi/makefile.in
@@ -178,7 +178,7 @@ _gsi_@obj@: _gsi_.c
178 178 @BUILD_OBJ@ -D___LIBRARY
179 179
180 180 .scm.c:
181   - @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c -check $(srcdirpfx)$*.scm
  181 + @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c @COMPILATION_OPTIONS@ $(srcdirpfx)$*.scm
182 182
183 183 _gsi.c: $(srcdirpfx)$(rootfromhere)/gsi/main.scm
184 184
4 include/stamp.h
@@ -2,5 +2,5 @@
2 2 * Time stamp of last source code repository commit.
3 3 */
4 4
5   -#define ___STAMP_YMD 20120612
6   -#define ___STAMP_HMS 191455
  5 +#define ___STAMP_YMD 20120613
  6 +#define ___STAMP_HMS 150636
43 lib/_io.scm
@@ -3681,14 +3681,19 @@
3681 3681 ((macro-port-write-datum port) port obj we2)
3682 3682 (##fixnum.- limit (macro-writeenv-limit we2)))))
3683 3683
3684   -(define-prim (##write obj port #!optional (max-length ##max-fixnum))
  3684 +(define-prim (##write
  3685 + obj
  3686 + port
  3687 + #!optional
  3688 + (max-length ##max-fixnum)
  3689 + (force? (macro-if-forces #t #f)))
3685 3690 (if (macro-character-output-port? port)
3686 3691 (begin
3687 3692 (##write-generic-to-character-port
3688 3693 'write
3689 3694 port
3690 3695 (macro-character-port-output-readtable port)
3691   - (macro-if-forces #t #f)
  3696 + force?
3692 3697 max-length
3693 3698 obj)
3694 3699 (##void))
@@ -3706,14 +3711,19 @@
3706 3711 (macro-check-output-port p 2 (write obj p)
3707 3712 (##write obj p)))))
3708 3713
3709   -(define-prim (##display obj port #!optional (max-length ##max-fixnum))
  3714 +(define-prim (##display
  3715 + obj
  3716 + port
  3717 + #!optional
  3718 + (max-length ##max-fixnum)
  3719 + (force? (macro-if-forces #t #f)))
3710 3720 (if (macro-character-output-port? port)
3711 3721 (begin
3712 3722 (##write-generic-to-character-port
3713 3723 'display
3714 3724 port
3715 3725 (macro-character-port-output-readtable port)
3716   - (macro-if-forces #t #f)
  3726 + force?
3717 3727 max-length
3718 3728 obj)
3719 3729 (##void))
@@ -3731,14 +3741,19 @@
3731 3741 (macro-check-output-port p 2 (display obj p)
3732 3742 (##display obj p)))))
3733 3743
3734   -(define-prim (##pretty-print obj port #!optional (max-length ##max-fixnum))
  3744 +(define-prim (##pretty-print
  3745 + obj
  3746 + port
  3747 + #!optional
  3748 + (max-length ##max-fixnum)
  3749 + (force? (macro-if-forces #t #f)))
3735 3750 (if (macro-character-output-port? port)
3736 3751 (begin
3737 3752 (##write-generic-to-character-port
3738 3753 'pretty-print
3739 3754 port
3740 3755 (macro-character-port-output-readtable port)
3741   - (macro-if-forces #t #f)
  3756 + force?
3742 3757 max-length
3743 3758 obj)
3744 3759 (##newline port))
@@ -3756,14 +3771,19 @@
3756 3771 (macro-check-output-port p 2 (pretty-print obj p)
3757 3772 (##pretty-print obj p)))))
3758 3773
3759   -(define-prim (##print-fringe obj port #!optional (max-length ##max-fixnum))
  3774 +(define-prim (##print
  3775 + obj
  3776 + port
  3777 + #!optional
  3778 + (max-length ##max-fixnum)
  3779 + (force? (macro-if-forces #t #f)))
3760 3780 (if (macro-character-output-port? port)
3761 3781 (begin
3762 3782 (##write-generic-to-character-port
3763 3783 'print
3764 3784 port
3765 3785 (macro-character-port-output-readtable port)
3766   - (macro-if-forces #t #f)
  3786 + force?
3767 3787 max-length
3768 3788 obj)
3769 3789 (##void))
@@ -3778,7 +3798,7 @@
3778 3798 (macro-current-output-port)
3779 3799 port)))
3780 3800 (macro-check-output-port p 2 (print port: p . body)
3781   - (##print-fringe body p)))))
  3801 + (##print body p)))))
3782 3802
3783 3803 (define-prim (println
3784 3804 #!key (port (macro-absent-obj))
@@ -3790,7 +3810,7 @@
3790 3810 port)))
3791 3811 (macro-check-output-port p 2 (println port: p . body)
3792 3812 (begin
3793   - (##print-fringe body p)
  3813 + (##print body p)
3794 3814 (##newline p))))))
3795 3815
3796 3816 (define-prim (##newline port)
@@ -6370,7 +6390,8 @@
6370 6390 (family (macro-absent-obj))
6371 6391 (socket-type (macro-absent-obj))
6372 6392 (protocol (macro-absent-obj)))
6373   - (macro-force-vars (host service flags family socket-type protocol)
  6393 + (macro-force-vars (host service ;;flags
  6394 + family socket-type protocol)
6374 6395 (let ((flags (macro-absent-obj)))
6375 6396
6376 6397 (define (check-host arg-num)
4 lib/_repl.scm
@@ -2,7 +2,7 @@
2 2
3 3 ;;; File: "_repl.scm"
4 4
5   -;;; Copyright (c) 1994-2011 by Marc Feeley, All Rights Reserved.
  5 +;;; Copyright (c) 1994-2012 by Marc Feeley, All Rights Reserved.
6 6
7 7 ;;;============================================================================
8 8
@@ -2275,7 +2275,7 @@
2275 2275 (if (##not (##eq? obj (##void)))
2276 2276 (begin
2277 2277 (##repl-channel-result-history-add channel obj)
2278   - (##pretty-print obj output-port))))
  2278 + (##pretty-print obj output-port ##max-fixnum #f))))
2279 2279 results)))
2280 2280
2281 2281 (define-prim (##repl-channel-ports-display-monoline-message channel writer)
2  lib/makefile.in
@@ -140,7 +140,7 @@ all-post: $(LIBRARY) _$(GAMBCLIB).c
140 140 @BUILD_OBJ@ -D___LIBRARY
141 141
142 142 .scm.c:
143   - @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c -check $(srcdirpfx)$*.scm
  143 + @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c @COMPILATION_OPTIONS@ $(srcdirpfx)$*.scm
144 144
145 145 $(LIBRARY): $(LIBRARY_OBJECTS_IN_COMPILE_ORDER)
146 146 rm -f $(LIBRARY)

0 comments on commit abb08f5

Please sign in to comment.
Something went wrong with that request. Please try again.