#| -*-Scheme-*-
-$Id: compat.scm,v 1.8 1995/03/11 17:44:22 adams Exp $
+$Id: compat.scm,v 1.9 1995/06/22 15:11:12 adams Exp $
Copyright (c) 1994 Massachusetts Institute of Technology
. ,(compat/expr* env (cdr rands)))))))
(define-rewrite/compat %variable-cache-ref
- ;; (CALL ',%variable-cache-ref '#F <read-variable-cache> 'NAME)
- ;; ------- rator ------- cont -------- rands -----------
+ ;; (CALL %variable-cache-ref '#F <read-variable-cache> 'IGNORE-TRAPS? 'NAME)
+ ;; ------ rator ------ cont -------- rands -----------
(lambda (env rator cont rands)
rator ; ignored
(let ((cont (compat/expr env cont))
(cell (compat/expr env (first rands)))
- (quoted-name (compat/expr env (second rands))))
+ (ignore-traps? (compat/expr env (second rands)))
+ (quoted-name (compat/expr env (third rands))))
(compat/verify-hook-continuation cont)
(compat/verify-cache cell quoted-name)
(let* ((%continue
(cell-name
(new-variable-cache-variable name `(VARIABLE-CACHE ,name)))
(value-name (compat/new-name name)))
- (if (compat/ignore-reference-traps? name)
+ (if (quote/text ignore-traps?)
(%continue `(CALL (QUOTE ,%variable-cell-ref)
(QUOTE #F)
(CALL (QUOTE ,%variable-read-cache) (QUOTE #F)
\f
(define-rewrite/compat %safe-variable-cache-ref
(lambda (env rator cont rands)
- ;; (CALL ',%safe-variable-cache-ref '#F <read-variable-cache> 'NAME)
+ ;; (CALL ',%safe-variable-cache-ref '#F <read-variable-cache>
+ ;; 'IGNORE-TRAPS? 'NAME)
;; --------- rator --------- cont -------- rands -----------
rator ; ignored
(let ((cont (compat/expr env cont))
(cell (compat/expr env (first rands)))
- (quoted-name (compat/expr env (second rands))))
+ (ignore-traps? (compat/expr env (second rands)))
+ (quoted-name (compat/expr env (third rands))))
(compat/verify-hook-continuation cont)
(compat/verify-cache cell quoted-name)
(let* ((%continue
(LET ((,value-name (CALL (QUOTE ,%variable-cell-ref)
(QUOTE #F)
(LOOKUP ,cell-name))))
- ,(if (compat/ignore-reference-traps? name)
+ ,(if (quote/text ignore-traps?)
(%continue `(LOOKUP ,value-name))
`(IF (IF (CALL (QUOTE ,%reference-trap?)
(QUOTE #F)
(CALL (QUOTE ,%hook-safe-variable-cell-ref)
,cont
(LOOKUP ,cell-name))))))))))
-
-
-;;; These predicates should determine the right answers from declarations:
-
-(define (compat/ignore-reference-traps? name)
- name
- #F)
-
-(define (compat/ignore-assignment-traps? name)
- name
- #F)
\f
;; NOTE: This is never in value position because envconv expands
;; all cell sets into begins. In particular, this means that cont
(define-rewrite/compat %variable-cache-set!
(lambda (env rator cont rands)
- ;; (CALL ',%variable-write-cache '#F <write-variable-cache> 'NAME)
- ;; -------- rator -------- cont -------- rands -----------
+ ;; (CALL ',%variable-cache-set! '#F <write-variable-cache> 'IGNORE-TRAPS? 'NAME)
+ ;; ------- rator -------- cont -------- rands -----------
rator ; ignored
- (let ((cont (compat/expr env cont))
- (cell (compat/expr env (first rands)))
- (value (compat/expr env (second rands)))
- (quoted-name (compat/expr env (third rands))))
+ (let ((cont (compat/expr env cont))
+ (cell (compat/expr env (first rands)))
+ (value (compat/expr env (second rands)))
+ (ignore-traps? (compat/expr env (third rands)))
+ (quoted-name (compat/expr env (fourth rands))))
;; (compat/verify-hook-continuation cont)
(if (not (equal? cont '(QUOTE #F)))
(internal-error "Unexpected continuation to variable cache assignment"
#| -*-Scheme-*-
-$Id: fakeprim.scm,v 1.16 1995/06/22 01:50:10 adams Exp $
+$Id: fakeprim.scm,v 1.17 1995/06/22 15:09:29 adams Exp $
Copyright (c) 1994 Massachusetts Institute of Technology
'descriptor operator-cache #!rest values)
(define %variable-cache-ref
- ;; (CALL ',%variable-cache-ref '#F <read-variable-cache> 'NAME)
+ ;; (CALL %variable-cache-ref '#F <read-variable-cache> 'ignore-traps? 'NAME)
;; Note:
;; Introduced by envconv.scm, removed by compat.scm (replaced by a
;; lot of hairy code)
(make-operator "#[variable-cache-ref]"
'(SIDE-EFFECT-FREE) '(OUT-OF-LINE-HOOK)))
-(cookie-call %variable-cache-ref '#F read-variable-cache 'NAME)
+(cookie-call %variable-cache-ref '#F read-variable-cache 'IGNORE-TRAPS? 'NAME)
(define %variable-cache-set!
;; (CALL ',%variable-cache-set! '#F <write-variable-cache>
- ;; <value> 'NAME)
+ ;; <value> 'IGNORE-TRAPS? 'NAME)
;; Note:
;; Introduced by envconv.scm, removed by compat.scm (replaced by a
;; lot of hairy code)
;; The NAME is redundant with the code that creates the variable cache
(make-operator "#[variable-cache-set!]" '(OUT-OF-LINE-HOOK)))
-(cookie-call %variable-cache-set! '#F write-variable-cache value 'NAME)
+(cookie-call %variable-cache-set! '#F write-variable-cache value
+ 'IGNORE-TRAPS? 'NAME)
(define %safe-variable-cache-ref
- ;; (CALL ',%safe-variable-cache-ref '#F <read-variable-cache> 'NAME)
+ ;; (CALL ',%safe-variable-cache-ref '#F <read-variable-cache>
+ ;; 'IGNORE-TRAPS? 'NAME)
;; Note:
;; Introduced by envconv.scm, removed by compat.scm (replaced by a
;; lot of hairy code)
(make-operator "#[safe-variable-cache-ref]"
'(SIDE-EFFECT-FREE) '(OUT-OF-LINE-HOOK)))
-
-(cookie-call %safe-variable-cache-ref '#F read-variable-cache 'NAME)
+(cookie-call %safe-variable-cache-ref '#F read-variable-cache
+ 'IGNORE-TRAPS? 'NAME)
\f
(define %variable-read-cache
;; (CALL ',%variable-read-cache '#F <read-variable-cache> 'NAME)
#| -*-Scheme-*-
-$Id: triveval.scm,v 1.4 1995/03/20 02:01:28 adams Exp $
+$Id: triveval.scm,v 1.5 1995/06/22 15:09:07 adams Exp $
Copyright (c) 1994 Massachusetts Institute of Technology
(define (make-write-variable-cache env name)
(variable-cache/make env name))
-(define (variable-cache-ref cache name)
- name ; ignored
+(define (variable-cache-ref cache ignore-traps? name)
+ ignore-traps? name ; ignored
(lexical-reference (variable-cache/env cache)
(variable-cache/name cache)))
-(define (variable-cache-set! cache value name)
- name ; ignored
+(define (variable-cache-set! cache value ignore-traps? name)
+ ignore-traps? name ; ignored
(lexical-assignment (variable-cache/env cache)
(variable-cache/name cache)
value))
-(define (safe-variable-cache-ref cache name)
- name ; ignored
+(define (safe-variable-cache-ref cache ignore-traps? name)
+ ignore-traps? name ; ignored
(let ((env (variable-cache/env cache))
(name (variable-cache/name cache)))
(if (lexical-unassigned? env name)
(reverse (cdr elements)))))))
\f
(define *operator->procedure*
- (make-eq-hash-table 311))
+ (make-eq-hash-table))
(define (operator->procedure rator)
(if (not (symbol? rator))