Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…y forcing promises.
  • Loading branch information...
commit abb08f51a08b67363543ad56fae470bcc4ca09b4 1 parent 128ccb5
@feeley authored
View
4 INSTALL.txt
@@ -215,6 +215,10 @@ The configure options which are specific to the Gambit-C system are:
--enable-help-browser=BROWSER
use the specified browser to view documentation
requested through the help procedure or REPL
+ --enable-auto-forcing
+ cause strict operations such as car, but not
+ cons, to automatically force their arguments
+ (requires: make bootstrap; make bootclean; make)
The option --enable-cplusplus should be used when applications
developped with the Gambit-C compiler are to be linked with code or
View
26 configure
@@ -887,6 +887,7 @@ ENABLE_ABSOLUTE_SHARED_LIBS
ENABLE_VERSIONNED_LIBS
emacsdir
HELP_BROWSER
+COMPILATION_OPTIONS
SET_MAKE
LIBOBJS
LTLIBOBJS'
@@ -1519,6 +1520,7 @@ Optional Features:
absolute path (default is YES)
--enable-help-browser=BROWSER
Browser to use for help (default is to search)
+ --enable-auto-forcing automatically force promises (default is NO)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -2177,6 +2179,8 @@ DEFS_EXE=""
DEFS_OBJ_DYN_LIB_EXE=""
+COMPILATION_OPTIONS="-check"
+
###############################################################################
#
# Check if the system must be compiled using the C compiler or C++ compiler.
@@ -5796,6 +5800,24 @@ fi
###############################################################################
#
+# Check if the system must automatically force promises.
+
+# Check whether --enable-auto-forcing was given.
+if test "${enable_auto_forcing+set}" = set; then
+ enableval=$enable_auto_forcing; ENABLE_AUTO_FORCING=$enableval
+else
+ ENABLE_AUTO_FORCING=no
+fi
+
+
+if test "$ENABLE_AUTO_FORCING" = yes; then
+
+ COMPILATION_OPTIONS="$COMPILATION_OPTIONS -force"
+
+fi
+
+###############################################################################
+#
# Check for C compiler.
@@ -26635,6 +26657,7 @@ INSTALL_PROGRAM='$(rootfromhere)/install-sh -c -m 755'
+
{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
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
ENABLE_VERSIONNED_LIBS!$ENABLE_VERSIONNED_LIBS$ac_delim
emacsdir!$emacsdir$ac_delim
HELP_BROWSER!$HELP_BROWSER$ac_delim
+COMPILATION_OPTIONS!$COMPILATION_OPTIONS$ac_delim
SET_MAKE!$SET_MAKE$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 78; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 79; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
View
19 configure.ac
@@ -53,6 +53,8 @@ DEFS_EXE=""
DEFS_OBJ_DYN_LIB_EXE=""
+COMPILATION_OPTIONS="-check"
+
###############################################################################
#
# Check if the system must be compiled using the C compiler or C++ compiler.
@@ -502,6 +504,22 @@ AC_ARG_ENABLE(help-browser,
###############################################################################
#
+# Check if the system must automatically force promises.
+
+AC_ARG_ENABLE(auto-forcing,
+ AC_HELP_STRING([--enable-auto-forcing],
+ [automatically force promises (default is NO)]),
+ ENABLE_AUTO_FORCING=$enableval,
+ ENABLE_AUTO_FORCING=no)
+
+if test "$ENABLE_AUTO_FORCING" = yes; then
+
+ COMPILATION_OPTIONS="$COMPILATION_OPTIONS -force"
+
+fi
+
+###############################################################################
+#
# Check for C compiler.
AC_DEFUN(AC_CHECK_C_COMPILER_DEF,
@@ -2135,6 +2153,7 @@ AC_SUBST(ENABLE_ABSOLUTE_SHARED_LIBS)
AC_SUBST(ENABLE_VERSIONNED_LIBS)
AC_SUBST(emacsdir)
AC_SUBST(HELP_BROWSER)
+AC_SUBST(COMPILATION_OPTIONS)
AC_PROG_MAKE_SET
View
2  gsc/makefile.in
@@ -213,7 +213,7 @@ _gsc_@obj@: _gsc_.c
@BUILD_OBJ@ -D___LIBRARY
.scm.c:
- @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c -check $(srcdirpfx)$*.scm
+ @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c @COMPILATION_OPTIONS@ $(srcdirpfx)$*.scm
_gsc.c: $(srcdirpfx)$(rootfromhere)/gsi/main.scm
View
2  gsi/makefile.in
@@ -178,7 +178,7 @@ _gsi_@obj@: _gsi_.c
@BUILD_OBJ@ -D___LIBRARY
.scm.c:
- @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c -check $(srcdirpfx)$*.scm
+ @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c @COMPILATION_OPTIONS@ $(srcdirpfx)$*.scm
_gsi.c: $(srcdirpfx)$(rootfromhere)/gsi/main.scm
View
4 include/stamp.h
@@ -2,5 +2,5 @@
* Time stamp of last source code repository commit.
*/
-#define ___STAMP_YMD 20120612
-#define ___STAMP_HMS 191455
+#define ___STAMP_YMD 20120613
+#define ___STAMP_HMS 150636
View
43 lib/_io.scm
@@ -3681,14 +3681,19 @@
((macro-port-write-datum port) port obj we2)
(##fixnum.- limit (macro-writeenv-limit we2)))))
-(define-prim (##write obj port #!optional (max-length ##max-fixnum))
+(define-prim (##write
+ obj
+ port
+ #!optional
+ (max-length ##max-fixnum)
+ (force? (macro-if-forces #t #f)))
(if (macro-character-output-port? port)
(begin
(##write-generic-to-character-port
'write
port
(macro-character-port-output-readtable port)
- (macro-if-forces #t #f)
+ force?
max-length
obj)
(##void))
@@ -3706,14 +3711,19 @@
(macro-check-output-port p 2 (write obj p)
(##write obj p)))))
-(define-prim (##display obj port #!optional (max-length ##max-fixnum))
+(define-prim (##display
+ obj
+ port
+ #!optional
+ (max-length ##max-fixnum)
+ (force? (macro-if-forces #t #f)))
(if (macro-character-output-port? port)
(begin
(##write-generic-to-character-port
'display
port
(macro-character-port-output-readtable port)
- (macro-if-forces #t #f)
+ force?
max-length
obj)
(##void))
@@ -3731,14 +3741,19 @@
(macro-check-output-port p 2 (display obj p)
(##display obj p)))))
-(define-prim (##pretty-print obj port #!optional (max-length ##max-fixnum))
+(define-prim (##pretty-print
+ obj
+ port
+ #!optional
+ (max-length ##max-fixnum)
+ (force? (macro-if-forces #t #f)))
(if (macro-character-output-port? port)
(begin
(##write-generic-to-character-port
'pretty-print
port
(macro-character-port-output-readtable port)
- (macro-if-forces #t #f)
+ force?
max-length
obj)
(##newline port))
@@ -3756,14 +3771,19 @@
(macro-check-output-port p 2 (pretty-print obj p)
(##pretty-print obj p)))))
-(define-prim (##print-fringe obj port #!optional (max-length ##max-fixnum))
+(define-prim (##print
+ obj
+ port
+ #!optional
+ (max-length ##max-fixnum)
+ (force? (macro-if-forces #t #f)))
(if (macro-character-output-port? port)
(begin
(##write-generic-to-character-port
'print
port
(macro-character-port-output-readtable port)
- (macro-if-forces #t #f)
+ force?
max-length
obj)
(##void))
@@ -3778,7 +3798,7 @@
(macro-current-output-port)
port)))
(macro-check-output-port p 2 (print port: p . body)
- (##print-fringe body p)))))
+ (##print body p)))))
(define-prim (println
#!key (port (macro-absent-obj))
@@ -3790,7 +3810,7 @@
port)))
(macro-check-output-port p 2 (println port: p . body)
(begin
- (##print-fringe body p)
+ (##print body p)
(##newline p))))))
(define-prim (##newline port)
@@ -6370,7 +6390,8 @@
(family (macro-absent-obj))
(socket-type (macro-absent-obj))
(protocol (macro-absent-obj)))
- (macro-force-vars (host service flags family socket-type protocol)
+ (macro-force-vars (host service ;;flags
+ family socket-type protocol)
(let ((flags (macro-absent-obj)))
(define (check-host arg-num)
View
4 lib/_repl.scm
@@ -2,7 +2,7 @@
;;; File: "_repl.scm"
-;;; Copyright (c) 1994-2011 by Marc Feeley, All Rights Reserved.
+;;; Copyright (c) 1994-2012 by Marc Feeley, All Rights Reserved.
;;;============================================================================
@@ -2275,7 +2275,7 @@
(if (##not (##eq? obj (##void)))
(begin
(##repl-channel-result-history-add channel obj)
- (##pretty-print obj output-port))))
+ (##pretty-print obj output-port ##max-fixnum #f))))
results)))
(define-prim (##repl-channel-ports-display-monoline-message channel writer)
View
2  lib/makefile.in
@@ -140,7 +140,7 @@ all-post: $(LIBRARY) _$(GAMBCLIB).c
@BUILD_OBJ@ -D___LIBRARY
.scm.c:
- @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c -check $(srcdirpfx)$*.scm
+ @SETDLPATHBOOT@ $(rootfromhere)/gsc-boot -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c @COMPILATION_OPTIONS@ $(srcdirpfx)$*.scm
$(LIBRARY): $(LIBRARY_OBJECTS_IN_COMPILE_ORDER)
rm -f $(LIBRARY)
Please sign in to comment.
Something went wrong with that request. Please try again.