>From 9dc927d72c759bb25bfa7090847f3b74427527f5 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Sun, 17 Aug 2014 21:50:45 +0200 Subject: [PATCH 18/19] compiler-modules: Move the remaining globals "unsafe" and "number-type" to support. These are used in too many places for it to be practical to move them into the compiler module and pass them around. This should be cleaned up some day, but not right now. --- compiler-namespace.scm | 4 +--- compiler.scm | 2 -- support.scm | 11 ++++++++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/compiler-namespace.scm b/compiler-namespace.scm index 146d478..6834932 100644 --- a/compiler-namespace.scm +++ b/compiler-namespace.scm @@ -25,6 +25,4 @@ (private - compiler - number-type - unsafe) + compiler) diff --git a/compiler.scm b/compiler.scm index 892889d..ee897a2 100644 --- a/compiler.scm +++ b/compiler.scm @@ -350,12 +350,10 @@ ;;; Global variables containing compilation parameters: (define unit-name #f) -(define number-type 'generic) (define standard-bindings '()) (define extended-bindings '()) (define insert-timer-checks #t) (define used-units '()) -(define unsafe #f) (define foreign-declarations '()) (define emit-trace-info #f) (define block-compilation #f) diff --git a/support.scm b/support.scm index e2053ee..2dc060d 100644 --- a/support.scm +++ b/support.scm @@ -71,13 +71,22 @@ dump-nodes read-info-hook read/source-info big-fixnum? hide-variable export-variable variable-visible? mark-variable variable-mark intrinsic? foldable? load-identifier-database - print-version print-usage print-debug-options) + print-version print-usage print-debug-options + + ;; XXX: These are evil globals that were too hairy to get rid of. + ;; These values are set! by compiler and batch-driver, and read + ;; in a lot of other places. + number-type unsafe) (import chicken scheme foreign data-structures srfi-1 files extras ports) (include "tweaks") (include "banner") +;; Evil globals +(define number-type 'generic) +(define unsafe #f) + ;;; Debugging and error-handling stuff: (define (compiler-cleanup-hook) #f) -- 1.7.10.4