Changes to match the rewrite of the variable lookup code in the
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Fri, 3 Apr 1987 00:53:27 +0000 (00:53 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Fri, 3 Apr 1987 00:53:27 +0000 (00:53 +0000)
microcode and a few minor bug fixes.

v7/src/runtime/error.scm
v7/src/runtime/histry.scm
v7/src/runtime/sdata.scm
v7/src/runtime/syntax.scm
v7/src/runtime/system.scm
v7/src/runtime/utabs.scm

index 38cd8c6333a47023510b973da50e98e0fc48963c..ddd9be876da3028a5d01516f29ec8b1939dc7bab 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/error.scm,v 13.44 1987/03/17 18:49:27 cph Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/error.scm,v 13.45 1987/04/03 00:51:34 jinx Exp $
 ;;;
 ;;;    Copyright (c) 1987 Massachusetts Institute of Technology
 ;;;
@@ -196,8 +196,17 @@ using the current read-eval-print environment."))
 
 ;;; Initialize the error vector to the default state:
 
+(define (error-code-or-name code)
+  (let ((v (vector-ref (get-fixed-objects-vector)
+                      (fixed-objects-vector-slot 'MICROCODE-ERRORS-VECTOR))))
+    (if (or (>= code (vector-length v))
+           (null? (vector-ref v code)))
+       code
+       (vector-ref v code))))  
+
 (define (default-error-handler expression)
-  (start-error-rep "Anomalous error -- get a wizard" *error-code*))
+  (start-error-rep "Anomalous error -- get a wizard"
+                  (error-code-or-name *error-code*)))
 
 (define system-error-vector
   (make-initialized-vector number-of-microcode-errors
@@ -352,6 +361,7 @@ using the current read-eval-print environment."))
 (define-bad-frame-error access? access-environment)
 (define-bad-frame-error in-package? in-package-environment)
 
+#|
 (define define-assignment-to-procedure-error
   (define-specific-error 'ASSIGN-LAMBDA-NAME
     "Attempt to assign procedure's name"))
@@ -364,6 +374,7 @@ using the current read-eval-print environment."))
        (make-primitive-procedure 'ADD-FLUID-BINDING! true)
        (make-primitive-procedure 'MAKE-FLUID-BINDING! true))
   combination-second-operand)
+|#
 \f
 ;;;; Application Errors
 
@@ -373,6 +384,9 @@ using the current read-eval-print environment."))
 (define-operator-error 'UNDEFINED-PRIMITIVE-OPERATION
   "Undefined Primitive Procedure")
 
+(define-operator-error 'UNIMPLEMENTED-PRIMITIVE
+  "Unimplemented Primitive Procedure")
+
 (define-operand-error 'WRONG-NUMBER-OF-ARGUMENTS
   "Wrong Number of Arguments"
   (lambda (combination)
@@ -401,18 +415,24 @@ using the current read-eval-print environment."))
        "ninth" (lambda (list) (general-car-cdr list #x1400)))
   (make 'WRONG-TYPE-ARGUMENT-9 'BAD-RANGE-ARGUMENT-9
        "tenth" (lambda (list) (general-car-cdr list #x3000))))
+
+(define-operand-error 'FAILED-ARG-1-COERCION
+  "Argument 1 cannot be coerced to floating point"
+  combination-first-operand)
+
+(define-operand-error 'FAILED-ARG-2-COERCION
+  "Argument 2 cannot be coerced to floating point"
+  combination-second-operand)
 \f
 ;;;; Primitive Operator Errors
 
 (define-operation-specific-error 'FASL-FILE-TOO-BIG
-  (list (make-primitive-procedure 'PRIMITIVE-FASLOAD)
-       (make-primitive-procedure 'BINARY-FASLOAD))
+  (list (make-primitive-procedure 'BINARY-FASLOAD))
   "Not enough room to Fasload"
   combination-first-operand)
 
 (define-operation-specific-error 'FASL-FILE-BAD-DATA
-  (list (make-primitive-procedure 'PRIMITIVE-FASLOAD)
-       (make-primitive-procedure 'BINARY-FASLOAD))
+  (list (make-primitive-procedure 'BINARY-FASLOAD))
   "Fasload file would not relocate correctly"
   combination-first-operand)
 
@@ -433,6 +453,11 @@ using the current read-eval-print environment."))
   (list (make-primitive-procedure 'FILE-OPEN-CHANNEL))
   "Unable to open file"
   combination-first-operand)
+
+(define-operation-specific-error 'OUT-OF-FILE-HANDLES
+  (list (make-primitive-procedure 'FILE-OPEN-CHANNEL))
+  "Too many open files"
+  combination-first-operand)
 \f
 ;;;; SCODE Syntax Errors
 
@@ -450,7 +475,8 @@ using the current read-eval-print environment."))
 
 (define-total-error-handler 'BAD-ERROR-CODE
   (lambda (error-code)
-    (start-error-rep "Bad Error Code -- get a wizard" error-code)))
+    (start-error-rep "Bad Error Code -- get a wizard"
+                    (error-code-or-name error-code))))
 
 (define-default-error 'BAD-INTERRUPT-CODE
   "Illegal Interrupt Code -- get a wizard"
@@ -471,5 +497,18 @@ using the current read-eval-print environment."))
   "Undefined Type Code -- get a wizard"
   identity-procedure)
 
+(define-default-error 'INAPPLICABLE-CONTINUATION
+  "Inapplicable continuation -- get a wizard"
+  identity-procedure)
+
+(define-default-error 'COMPILED-CODE-ERROR
+  "Compiled code error -- get a wizard"
+  identity-procedure)
+
+(define-default-error 'FLOATING-OVERFLOW
+  "Floating point overflow"
+  identity-procedure)
+
 ;;; end ERROR-SYSTEM package.
+))
 ))
\ No newline at end of file
index 9d7be55ab1012f6eb2a978a81fe4730f1e2408b9..b4c1a3d13e299ecb1438b36e8244ab484967ca71 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/histry.scm,v 13.43 1987/03/17 18:50:22 cph Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/histry.scm,v 13.44 1987/04/03 00:51:49 jinx Exp $
 ;;;
 ;;;    Copyright (c) 1987 Massachusetts Institute of Technology
 ;;;
                                           (scode-quote #F)
                                           system-global-environment)
            (push-history! history)))))
-       (thunk)))
+    (thunk)))
 
 ;;;; Primitive History Operations
 ;;;  These operations mimic the actions of the microcode.
   (car history))
 
 ;;; end HISTORY-PACKAGE.
+(the-environment)))
 (the-environment)))
\ No newline at end of file
index 5c318fd1d679a3bd2691eacefad75f40662118c0..b0e1d36afa84e32c21cc21ca2d1bc0c9eccb49dd 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/sdata.scm,v 13.41 1987/01/23 00:19:30 jinx Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/sdata.scm,v 13.42 1987/04/03 00:52:12 jinx Exp $
 ;;;
 ;;;    Copyright (c) 1987 Massachusetts Institute of Technology
 ;;;
 (define &subvector-to-list)
 \f
 (let ((&unbound-object '(&UNBOUND-OBJECT))
+      (&unbound-datum 2)
       (&unassigned-object '(&UNASSIGNED-OBJECT))
+      (&unassigned-datum 0)
       (&unassigned-type (microcode-type 'UNASSIGNED))
+      (&make-object (make-primitive-procedure '&MAKE-OBJECT))
       (hunk3-cons (make-primitive-procedure 'HUNK3-CONS)))
 
   (define (map-unassigned object)
-    (if (eq? object &unbound-object)
-       (primitive-set-type &unassigned-type 1)
-       (if (eq? object &unassigned-object)
-           (primitive-set-type &unassigned-type 0)
-           object)))
+    (cond ((eq? object &unbound-object)
+          (&make-object &unassigned-type &unbound-datum))
+         ((eq? object &unassigned-object)
+          (&make-object &unassigned-type &unassigned-datum))
+         (else object)))
 
+  ;; This is no longer really right, given the other traps.
   (define (map-from-unassigned datum)
-    (if (eq? datum 0)                                  ;**** cheat for speed.
+    (if (eq? datum &unassigned-datum)                          ;**** cheat for speed.
        &unassigned-object
        &unbound-object))
 
index 03009167b45a10e0591b5682f22f7a01664c1f96..c37fcef09b19619ab6c1d57c3f16b2eda93708bb 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/Attic/syntax.scm,v 13.43 1987/03/17 18:53:27 cph Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/Attic/syntax.scm,v 13.44 1987/04/03 00:52:43 jinx Exp $
 ;;;
 ;;;    Copyright (c) 1987 Massachusetts Institute of Technology
 ;;;
   ;;        ...
   ;;        <body>))
   (let ((with-saved-fluid-bindings
-        (make-primitive-procedure 'WITH-SAVED-FLUID-BINDINGS)))
+        (make-primitive-procedure 'WITH-SAVED-FLUID-BINDINGS #t)))
     (spread-arguments
      (lambda (bindings . body)
        (syntax-fluid-bindings bindings
               (syntax-error "Binding not a pair" binding)))))))
 
 (set! syntax-FLUID-LET-form-deep
-      (make-fluid-let (make-primitive-procedure 'ADD-FLUID-BINDING!)
+      (make-fluid-let (make-primitive-procedure 'ADD-FLUID-BINDING! #t)
                      lambda-tag:deep-fluid-let))
 
 (set! syntax-FLUID-LET-form-common-lisp
       ;; This -- groan -- is for Common Lisp support
-      (make-fluid-let (make-primitive-procedure 'MAKE-FLUID-BINDING!)
+      (make-fluid-let (make-primitive-procedure 'MAKE-FLUID-BINDING! #t)
                      lambda-tag:common-lisp-fluid-let))
 
 ;;; end special FLUID-LETs.
               ))))
 
 ;;; end SYNTAXER-PACKAGE
+)
 )
\ No newline at end of file
index a13d04e8a58e512a1580793ed84c9caeec598f10..e44244a786fbe49240801f9ef312ff43898d9e78 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/system.scm,v 13.43 1987/03/17 18:53:48 cph Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/system.scm,v 13.44 1987/04/03 00:53:06 jinx Exp $
 ;;;
 ;;;    Copyright (c) 1987 Massachusetts Institute of Technology
 ;;;
                                    (home-directory-pathname))))))
         (if (not (null? file))
             (load file user-initial-environment))))))
+
+;; This is not the right place for this, but I don't know what is.
+
+(add-event-receiver!
+ event:after-restore
+ (lambda ()
+   ((access reset! continuation-package))))
 \f
 (set! full-quit
 (named-lambda (full-quit)
           false)
          (else (beep) (query prompt)))))
 
+)
 )
\ No newline at end of file
index 7fa53fec155d4eb7d9ca3e3b7890225f826eaf5c..d787deb36ef4db43ae34e6f6966caf9845ffe2df 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/utabs.scm,v 13.42 1987/03/09 15:00:25 cph Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/utabs.scm,v 13.43 1987/04/03 00:53:27 jinx Exp $
 ;;;
 ;;;    Copyright (c) 1987 Massachusetts Institute of Technology
 ;;;
   (let ((code (name->code primitives-slot 'PRIMITIVE name)))
     (if code
        (map-code-to-machine-address primitive-type-code code)
-       (or (get-external-number name force?)
+       (or (get-external-number name (if (unassigned? force?) #f force?))
            (error "Unknown name" make-primitive-procedure name))))))
 
 (set! implemented-primitive-procedure?