aboutsummaryrefslogtreecommitdiffstats
path: root/hobbit.scm
diff options
context:
space:
mode:
Diffstat (limited to 'hobbit.scm')
-rw-r--r--hobbit.scm33
1 files changed, 11 insertions, 22 deletions
diff --git a/hobbit.scm b/hobbit.scm
index 80d9d31..8f1d896 100644
--- a/hobbit.scm
+++ b/hobbit.scm
@@ -2,7 +2,7 @@
;
; HOBBIT: an optimizing scheme -> C compiler for SCM
;
-; scm5d6
+; scm5d9
; 2002-04-11
;
; Copyright (C) 1992-1997: Tanel Tammet
@@ -55,7 +55,12 @@
; - "copy-tree" and "acons" compilation introduced
; pre-april, 2002, Aubrey Jaffer:
; - numerous changes necessary for co-operation with SCM5d5
-;
+
+;;; Declare modules which might be needed:
+(require-if 'compiling 'pretty-print)
+(require-if 'compiling 'defmacroexpand)
+(require-if 'compiling 'pprint-file)
+
;=================================================================
;
; default compiler options
@@ -63,7 +68,6 @@
;
;=================================================================
-
;;; The following variable controls whether hobbit will do any
;;; macroexpansion. In that case (require 'defmacroexpand) must
;;; be able to load the macroexpander from the scheme library.
@@ -165,7 +169,7 @@
(for-each display lst)
(display #\newline)
(abort))
-
+;@
(define compile-allnumbers #t)
;=================================================================
@@ -365,13 +369,6 @@
(define *init-fun-prefix* "init_")
-;;; The following is a string which is prepended to the name of your
-;;; scheme file (without .scm) to form a C variable which is generated
-;;; as a new global to gc-protect the constant nonimmediate objects
-;;; in your file.
-
-(define *protect-variable* "protect_constants_")
-
;;; The following is a name of a variable which may be defined to
;;; the list of inlinable functions in your scheme file.
@@ -812,11 +809,7 @@
;
;=================================================================
-
-(define (Hobbit:compile file . files)
- (hobbit (cons file files)))
-
-
+;@ exported symbol hobbit.
(define (hobbit file . files)
(let* ((tmpname "hobbit.tmp"))
(if *build-intermediate-files*
@@ -824,8 +817,7 @@
(if *expand-macros-flag*
(begin (require 'defmacroexpand)
(require 'pprint-file)))
- (if (not (memq 'hobbit *features*))
- (set! *features* (cons 'hobbit *features*)))
+ (provide 'hobbit)
(if (or (member '"scmhob.scm" (cons file files))
(member '"scmhob" (cons file files)))
(report-error "The file scmhob.scm is not allowed to be compiled!"))
@@ -2384,9 +2376,6 @@
map for-each list call-with-input-file call-with-output-file
open-input-file open-output-file with-input-from-file
with-output-to-file string-append
- logical:logxor logical:lognot logical:logior logical:logand
- logical:ash logical:logcount logical:integer-length
- logical:bit-extract logical:integer-expt
defmacro:expand*
sin cos tan asin acos atan sinh cosh tanh asinh acosh
sin cos tan asin acos atan sinh cosh tanh asinh acosh
@@ -2561,7 +2550,7 @@
(vector->list "vector2list" 1)
(list->vector "vector" 1)
- (read "lread" 1)
+ (read "scm_read" 1)
(read-char "scm_read_char" 1)
(peek-char "peek_char" 1)
(eof-object? "eof_objectp" 1)