From: Taylor R Campbell Date: Wed, 12 Dec 2018 22:07:09 +0000 (+0000) Subject: Call the primitives directly. X-Git-Tag: mit-scheme-pucked-10.1.9~3^2~35^2~26 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6f990adc8c416ca651749f66833b9eff745c159f;p=mit-scheme.git Call the primitives directly. These are no longer integrated, so we can't make a compound procedure call if they are interpreted -- the interpreter will stomp all over Free while we're in the middle of allocating the string, leading to mayhem. But it is safe to call the primitive, even though it is no longer open-coded. --- diff --git a/src/edwin/utils.scm b/src/edwin/utils.scm index d4993ff09..c2a164cae 100644 --- a/src/edwin/utils.scm +++ b/src/edwin/utils.scm @@ -106,9 +106,9 @@ USA. ((ucode-primitive primitive-object-set-type 2) (ucode-type manifest-nm-vector) (fix:- n-words 1))) ;Subtract one for the manifest. - (set-string-length! result (fix:+ n-chars 1)) - (string-set! result n-chars #\nul) - (set-string-length! result n-chars) + ((ucode-primitive set-string-length! 2) result (fix:+ n-chars 1)) + ((ucode-primitive string-set! 3) result n-chars #\nul) + ((ucode-primitive set-string-length! 2) result n-chars) ((ucode-primitive primitive-increment-free 1) n-words) (set-interrupt-enables! mask) result)))))