1; Part of Scheme 48 1.9. See file COPYING for notices and license. 2 3; Authors: Richard Kelsey, Jonathan Rees, Mike Sperber, Ivan Shmakov 4 5 6; Packages involved in building the initial system. 7 8 9; Access to values from packages and structures 10 11(define-structure environments environments-interface 12 (open scheme-level-2 13 packages bindings meta-types 14 fluids cells 15 locations ; contents location-assigned? 16 exceptions) ; error 17 (files (rts env))) 18 19; EVAL and LOAD 20 21(define-structures ((evaluation evaluation-interface) 22 (load-filenames load-filenames-interface)) 23 (open scheme-level-2 24 packages ;package-uid package->environment link! 25 environments ;package-for-load 26 compiler-envs ;bind-source-filename 27 reading-forms ;read-forms $note-file-package 28 syntactic ;scan-forms expand-forms 29 compiler ;compile-forms 30 closures ;make-closure 31 vm-exposure ;invoke-closure 32 features ;current-noise-port force-output 33 exceptions fluids cells) 34 (files (rts eval))) 35 36; Scheme = scheme-level-2 plus EVAL and friends 37 38(define-module (make-scheme environments evaluation) 39 40 (define-structure scheme scheme-interface 41 (open scheme-level-2 42 environments 43 evaluation)) 44 scheme) 45 46; Command processor. 47 48(define-module (make-mini-command scheme) ;copied from debug-packages.scm 49 50 (define-structure mini-command (export command-processor) 51 (open scheme 52 ascii byte-vectors os-strings 53 writing methods 54 conditions exceptions handle 55 i/o) ;current-error-port 56 (files (debug mini-command) 57 (env dispcond))) ; avoid having to include this generally 58 mini-command) 59 60; For building systems. 61 62(define-module (make-initial-system scheme command) 63 64 (define-structure initial-system (export start) 65 (open scheme 66 command 67 interfaces ;make-simple-interface 68 packages ;make-simple-package 69 environments ;with-interaction-environment, etc. 70 usual-resumer) 71 (files (env start))) 72 73 initial-system) 74 75 76; Utility to load packages following dependency links (OPEN and ACCESS) 77;Cf. (link-initial-system) and Makefile 78 79(define-structure ensures-loaded (export ensure-loaded) 80 (open scheme-level-2 81 features ;current-noise-port 82 packages ;package-uid package-clients 83 packages-internal ;package-loaded? set-package-loaded?! 84 scan-package ;collect-packages check-structure 85 compile-packages ;compile-package 86 closures ;make-closure 87 vm-exposure ;invoke-closure 88 environments ;with-interaction-environment 89 weak ;walk-population 90 ) 91 (files (env load-package))) 92 93; Things needed by the expression generated by REIFY-STRUCTURES. 94 95(define-structure for-reification for-reification-interface 96 (open scheme-level-1 97 packages packages-internal 98 exceptions 99 meta-types ;sexp->type structure-type 100 interfaces ;make-simple-interface 101 bindings 102 nodes ;get-operator operator? operator-type 103 primops ;get-primop primop? primop-type 104 usual-macros ;usual-transform 105 inline ;inline-transform 106 transforms ;make-transform/xxx transform? transform-type 107 tables) 108 (files (bcomp for-reify))) 109