From 1ada2ce5fe7c615027533fa78e4386106745fdee Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Sun, 14 May 1995 00:53:04 +0000 Subject: [PATCH] Added %car %cdr %set-car! %set-cdr! %vector-ref %vector-set! %vector-length unchecked pair and vector operators. --- v8/src/compiler/midend/fakeprim.scm | 35 ++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/v8/src/compiler/midend/fakeprim.scm b/v8/src/compiler/midend/fakeprim.scm index 92f6fed83..c26074e60 100644 --- a/v8/src/compiler/midend/fakeprim.scm +++ b/v8/src/compiler/midend/fakeprim.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: fakeprim.scm,v 1.13 1995/04/19 22:53:02 adams Exp $ +$Id: fakeprim.scm,v 1.14 1995/05/14 00:53:04 adams Exp $ Copyright (c) 1994 Massachusetts Institute of Technology @@ -541,16 +541,49 @@ MIT in each case. |# (cookie-call %cons '#F car-value cdr-value) + +;; Unchecked operations on pairs. Result is unspecified if the pair +;; argument is not a pair. +(define %car + ;; (CALL ',%car '#F ) + (make-operator/effect-sensitive "#[car]")) + +(define %cdr + ;; (CALL ',%cdr '#F ) + (make-operator/effect-sensitive "#[cdr]")) + +(define %set-car! + ;; (CALL ',%set-car '#F ) + (make-operator/simple* "#[set-car!]" '(UNSPECIFIC-RESULT))) + +(define %set-cdr! + ;; (CALL ',%set-cdr '#F ) + (make-operator/simple* "#[set-cdr!]" '(UNSPECIFIC-RESULT))) + + (define %make-entity ;; (CALL ',%make-entity '#F ) (make-operator/simple "#[make-entity]")) + (define %vector ;; (CALL ',%vector '#F *) ;; Note: ;; Introduced by expand.scm for DEFINE-MULTIPLE (make-operator/simple "#[vector]")) +(define %vector-length + ;; (CALL ',%vector-length '#F ) + (make-operator/simple "#[vector-length]")) + +(define %vector-ref + ;; (CALL ',%vector-ref '#F ) + (make-operator/effect-sensitive "#[vector-ref]")) + +(define %vector-set! + ;; (CALL ',%vector-set! '#F ) + (make-operator/simple* "#[vector-set!]" '(UNSPECIFIC-RESULT))) + (cookie-call %vector '#F #!rest values) (define %make-promise -- 2.25.1