From: Stephen Adams Date: Wed, 24 Aug 1994 19:50:40 +0000 (+0000) Subject: Changed string-allocate and set-string-maximum-length to be primitives X-Git-Tag: 20090517-FFI~7128 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=47c53a1663326628366c9bb39163ff4895d9ae00;p=mit-scheme.git Changed string-allocate and set-string-maximum-length to be primitives if the non-primitive version is interpreted (not compiled). The non-primitive versions in this file to not run interpreted. --- diff --git a/v7/src/edwin/utils.scm b/v7/src/edwin/utils.scm index 73aa8bd66..c062e1a34 100644 --- a/v7/src/edwin/utils.scm +++ b/v7/src/edwin/utils.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: utils.scm,v 1.36 1994/05/04 22:57:06 cph Exp $ +;;; $Id: utils.scm,v 1.37 1994/08/24 19:50:40 adams Exp $ ;;; ;;; Copyright (c) 1986, 1989-94 Massachusetts Institute of Technology ;;; @@ -87,7 +87,7 @@ ((8) -3) (else (error "Can't support this word size:" chars-per-word))))) -(define (string-allocate n-chars) +(define (edwin-string-allocate n-chars) (if (not (fix:fixnum? n-chars)) (error:wrong-type-argument n-chars "fixnum" 'STRING-ALLOCATE)) (if (not (fix:>= n-chars 0)) @@ -115,7 +115,7 @@ (set-interrupt-enables! mask) result))))) -(define (set-string-maximum-length! string n-chars) +(define (edwin-set-string-maximum-length! string n-chars) (if (not (string? string)) (error:wrong-type-argument string "string" 'SET-STRING-MAXIMUM-LENGTH!)) (if (not (fix:fixnum? n-chars)) @@ -137,6 +137,16 @@ (string-set! string n-chars #\nul) (set-interrupt-enables! mask) unspecific)) + +(define string-allocate + (if (compiled-procedure? edwin-string-allocate) + edwin-string-allocate + (ucode-primitive string-allocate))) + +(define set-string-maximum-length! + (if (compiler-procedure? edwin-set-string-maximum-length!) + edwin-set-string-maximum-length! + (ucode-primitive set-string-maximum-length!))) (define (%substring-move! source start-source end-source target start-target)