From 94bbaaf6dc4760eb22bb4b2594648b1f8dbf83a5 Mon Sep 17 00:00:00 2001 From: Vijay Marupudi Date: Fri, 21 Jan 2022 20:17:42 -0500 Subject: [PATCH 2/2] Re-export utf8->string instead of wrapper with extra allocation. In addition, remove the redundant function that was dead code. module/scheme/base.scm: Deleted wrapped and exported the default utf8->string. --- module/scheme/base.scm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/module/scheme/base.scm b/module/scheme/base.scm index c6a73c092..28adb2e32 100644 --- a/module/scheme/base.scm +++ b/module/scheme/base.scm @@ -60,7 +60,6 @@ vector-append vector-for-each vector-map (r7:bytevector-copy . bytevector-copy) (r7:bytevector-copy! . bytevector-copy!) - (r7:utf8->string . utf8->string) square (r7:expt . expt) boolean=? symbol=? @@ -109,7 +108,7 @@ string-copy string-copy! string-fill! string-for-each string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string - symbol? syntax-error syntax-rules truncate + symbol? utf8->string syntax-error syntax-rules truncate truncate-quotient truncate-remainder truncate/ (char-ready? . u8-ready?) unless @@ -494,9 +493,6 @@ (bytevector-copy! bv start out 0 mlen) out) -(define (%subbytevector1 bv start) - (%subbytevector bv start (bytevector-length bv))) - (define r7:bytevector-copy! (case-lambda* ((to at from #:optional @@ -512,12 +508,6 @@ ((bv start #:optional (end (bytevector-length bv))) (%subbytevector bv start end)))) -(define r7:utf8->string - (case-lambda* - ((bv) (utf8->string bv)) - ((bv start #:optional (end (bytevector-length bv))) - (utf8->string (%subbytevector bv start end))))) - (define (square x) (* x x)) (define (r7:expt x y) -- 2.34.1