Permalink
Browse files

Merge branch 'master' of github.com:feeley/gambit

Conflicts:
	gsc/_t-univ.scm
	include/stamp.h
  • Loading branch information...
2 parents 74301b7 + fe8a1b3 commit 3718af223ef2ff715a5343d9ee73e72ae071f18a @Gabriano Gabriano committed Jul 8, 2012
Showing with 2,581 additions and 1,316 deletions.
  1. +8 −0 INSTALL.txt
  2. +46 −1 configure
  3. +37 −0 configure.ac
  4. +9 −6 doc/gambit-c.txi
  5. +23 −5 gsc/_back.scm
  6. +4 −0 gsc/_codegen#.scm
  7. +15 −1 gsc/_codegen.scm
  8. +1,128 −25 gsc/_prims.scm
  9. +22 −6 gsc/_t-c-1.scm
  10. +11 −1,109 gsc/_t-c-2.scm
  11. +1 −1 gsc/_t-c-3.scm
  12. +198 −20 gsc/_t-univ.scm
  13. +802 −0 gsc/_t-x86.scm
  14. +2 −0 gsc/_x86#.scm
  15. +13 −0 gsc/_x86.scm
  16. +1 −1 gsc/makefile.in
  17. +48 −18 gsc/runtests.scm
  18. +29 −0 gsc/tests/cont/contfib.scm
  19. +1 −1 gsi/makefile.in
  20. +2 −2 include/stamp.h
  21. +32 −11 lib/_io.scm
  22. +148 −108 lib/_repl.scm
  23. +1 −1 lib/makefile.in
View
@@ -215,6 +215,14 @@ 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-type-checking
+ cause primitives to perform type checking
+ of their arguments
+ (requires: make bootstrap; make bootclean; make)
+ --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
@@ -887,6 +887,7 @@ ENABLE_ABSOLUTE_SHARED_LIBS
ENABLE_VERSIONNED_LIBS
emacsdir
HELP_BROWSER
+COMPILATION_OPTIONS
SET_MAKE
LIBOBJS
LTLIBOBJS'
@@ -1519,6 +1520,8 @@ Optional Features:
absolute path (default is YES)
--enable-help-browser=BROWSER
Browser to use for help (default is to search)
+ --enable-type-checking perform type checking (default is YES)
+ --enable-auto-forcing automatically force promises (default is NO)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -2177,6 +2180,8 @@ DEFS_EXE=""
DEFS_OBJ_DYN_LIB_EXE=""
+COMPILATION_OPTIONS=""
+
###############################################################################
#
# Check if the system must be compiled using the C compiler or C++ compiler.
@@ -5796,6 +5801,44 @@ fi
###############################################################################
#
+# Check if the system must perform type checking.
+
+# Check whether --enable-type-checking was given.
+if test "${enable_type_checking+set}" = set; then
+ enableval=$enable_type_checking; ENABLE_TYPE_CHECKING=$enableval
+else
+ ENABLE_TYPE_CHECKING=yes
+fi
+
+
+echo "ENABLE_TYPE_CHECKING = $ENABLE_TYPE_CHECKING"
+
+if test "$ENABLE_TYPE_CHECKING" = yes; then
+
+ COMPILATION_OPTIONS="$COMPILATION_OPTIONS -check"
+
+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 +26678,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 +27711,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
@@ -53,6 +53,8 @@ DEFS_EXE=""
DEFS_OBJ_DYN_LIB_EXE=""
+COMPILATION_OPTIONS=""
+
###############################################################################
#
# Check if the system must be compiled using the C compiler or C++ compiler.
@@ -502,6 +504,40 @@ AC_ARG_ENABLE(help-browser,
###############################################################################
#
+# Check if the system must perform type checking.
+
+AC_ARG_ENABLE(type-checking,
+ AC_HELP_STRING([--enable-type-checking],
+ [perform type checking (default is YES)]),
+ ENABLE_TYPE_CHECKING=$enableval,
+ ENABLE_TYPE_CHECKING=yes)
+
+echo "ENABLE_TYPE_CHECKING = $ENABLE_TYPE_CHECKING"
+
+if test "$ENABLE_TYPE_CHECKING" = yes; then
+
+ COMPILATION_OPTIONS="$COMPILATION_OPTIONS -check"
+
+fi
+
+###############################################################################
+#
+# 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 +2171,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
@@ -10073,14 +10073,17 @@ For example:
@end deffn
-@deffn {special form} time @r{@i{expr}}
+@deffn {special form} time @r{@i{expr}} @r{[}@var{port}@r{]}
The @code{time} special form evaluates @i{expr} and returns the
-result. As a side effect it displays a message on the interaction
-channel which indicates how long the evaluation took (in real time and
-cpu time), how much time was spent in the garbage collector, how much
-memory was allocated during the evaluation and how many minor and
-major page faults occured (0 is reported if not running under UNIX).
+result. As a side effect it displays a message on the port @var{port}
+which indicates various statistics about the evaluation of @i{expr}
+including how long the evaluation took (in real time and cpu time),
+how much time was spent in the garbage collector, how much memory was
+allocated during the evaluation and how many minor and major page
+faults occured (0 is reported if not running under UNIX). If it is
+not specified, @var{port} defaults to the interaction channel
+(i.e. the output will appear at the REPL).
For example:
View
@@ -105,6 +105,16 @@
;; This function tests whether an object can be tested
;; in a GVM "switch" instruction.
;;
+;; eq-testable? Function.
+;; This function tests whether an object tested to another
+;; with eq? is equivalent to testing it with equal?.
+;;
+;; object-type Function.
+;; This function returns a symbol indicating the type of its
+;; argument. For exact integers the return value is
+;; either fixnum, bignum, or bigfixnum (when the integer
+;; could be a fixnum or bignum).
+;;
;; file-extension The file extension for generated files.
;;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -113,13 +123,13 @@
(define (make-target version name extra)
- (define current-target-version 7) ; number for this version of the module
+ (define current-target-version 9) ; number for this version of the module
(if (not (= version current-target-version))
(compiler-internal-error
"make-target, version of target module is not current" name))
- (let ((x (make-vector (+ 14 extra))))
+ (let ((x (make-vector (+ 16 extra))))
(vector-set! x 0 'target)
(vector-set! x 1 name)
x))
@@ -149,8 +159,12 @@
(define (target-task-return-set! x y) (vector-set! x 11 y))
(define (target-switch-testable? x) (vector-ref x 12))
(define (target-switch-testable?-set! x y) (vector-set! x 12 y))
-(define (target-file-extension x) (vector-ref x 13))
-(define (target-file-extension-set! x y) (vector-set! x 13 y))
+(define (target-eq-testable? x) (vector-ref x 13))
+(define (target-eq-testable?-set! x y) (vector-set! x 13 y))
+(define (target-object-type x) (vector-ref x 14))
+(define (target-object-type-set! x y) (vector-set! x 14 y))
+(define (target-file-extension x) (vector-ref x 15))
+(define (target-file-extension-set! x y) (vector-set! x 15 y))
;;;; Frame constraints structure
@@ -192,7 +206,7 @@
((target-begin! target) info-port)
- (setup-prim-expanders target)
+ (setup-prims target)
(set! target.dump (target-dump target))
(set! target.nb-regs (target-nb-regs target))
@@ -203,6 +217,8 @@
(set! target.proc-result (target-proc-result target))
(set! target.task-return (target-task-return target))
(set! target.switch-testable? (target-switch-testable? target))
+ (set! target.eq-testable? (target-eq-testable? target))
+ (set! target.object-type (target-object-type target))
(set! target.file-extension (target-file-extension target))
(set! **not-proc-obj
@@ -256,6 +272,8 @@
(define target.proc-result #f)
(define target.task-return #f)
(define target.switch-testable? #f)
+(define target.eq-testable? #f)
+(define target.object-type #f)
(define target.file-extension #f)
;; procedures defined in back-end:
View
@@ -17,6 +17,10 @@ codegen-context-arch
codegen-context-arch-set!
codegen-context-fixup-list
codegen-context-fixup-list-set!
+codegen-context-target
+codegen-context-target-set!
+codegen-context-frame-size
+codegen-context-frame-size-set!
))
View
@@ -19,9 +19,11 @@
;;;============================================================================
(define (make-codegen-context)
- (let ((cgc (make-vector (+ (asm-code-block-size) 3) 'codegen-context)))
+ (let ((cgc (make-vector (+ (asm-code-block-size) 5) 'codegen-context)))
(codegen-context-listing-format-set! cgc #f)
(codegen-context-arch-set! cgc #f)
+ (codegen-context-target-set! cgc #f)
+ (codegen-context-frame-size-set! cgc #f)
(codegen-context-fixup-list-set! cgc '())
cgc))
@@ -43,4 +45,16 @@
(define (codegen-context-fixup-list-set! cgc x)
(vector-set! cgc (+ (asm-code-block-size) 2) x))
+(define (codegen-context-target cgc)
+ (vector-ref cgc (+ (asm-code-block-size) 3)))
+
+(define (codegen-context-target-set! cgc x)
+ (vector-set! cgc (+ (asm-code-block-size) 3) x))
+
+(define (codegen-context-frame-size cgc)
+ (vector-ref cgc (+ (asm-code-block-size) 4)))
+
+(define (codegen-context-frame-size-set! cgc x)
+ (vector-set! cgc (+ (asm-code-block-size) 4) x))
+
;;;============================================================================
Oops, something went wrong.

0 comments on commit 3718af2

Please sign in to comment.