From 567b862ce2b8196e29dc2fed6367934f9e077a96 Mon Sep 17 00:00:00 2001 From: WillClinger Date: Fri, 4 Aug 2017 22:20:35 -0400 Subject: [PATCH] Tweaked inlining of text? and version nickname. --- doc/UserManual/libraries.txt | 1 + src/Compiler/common.imp.sch | 12 ++++++------ src/Lib/Common/text.sch | 5 +++++ src/Lib/Common/toplevel.sch | 3 ++- src/Rts/Sys/version.c | 6 +++--- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/doc/UserManual/libraries.txt b/doc/UserManual/libraries.txt index c710aa87..5c7571b7 100644 --- a/doc/UserManual/libraries.txt +++ b/doc/UserManual/libraries.txt @@ -270,6 +270,7 @@ http://srfi.schemers.org/[SRFI] libraries: (srfi 145) ; assumptions (srfi 146) ; mappings (srfi 151) ; bitwise operations + (srfi 152) ; string library (reduced) [NOTE] ================================================================ diff --git a/src/Compiler/common.imp.sch b/src/Compiler/common.imp.sch index 53df46b0..8672a8e5 100644 --- a/src/Compiler/common.imp.sch +++ b/src/Compiler/common.imp.sch @@ -1814,14 +1814,14 @@ ` ((_ larceny text? (text? obj0)) (let ((x obj0)) (and (structure? x) - (eq? (.vector-ref:trusted (.vector-ref:trusted x 0) 0) - larceny:text-rtd)))) + (eq? (.vector-ref:trusted x 0) + larceny:text-inheritance-vector)))) ` ((_ larceny text-length (text-length txt0)) (let ((txt txt0)) (.check! (structure? txt) ,$ex.tlen txt) - (.check! (eq? (.vector-ref:trusted (.vector-ref:trusted txt 0) 0) - larceny:text-rtd) + (.check! (eq? (.vector-ref:trusted txt 0) + larceny:text-inheritance-vector) ,$ex.tlen txt) (.fxrshl (.vector-ref:trusted txt 1) 7))) @@ -1837,8 +1837,8 @@ (let ((txt txt0) (i index0)) (.check! (structure? txt) ,$ex.tlen txt) - (.check! (eq? (.vector-ref:trusted (.vector-ref:trusted txt 0) 0) - larceny:text-rtd) + (.check! (eq? (.vector-ref:trusted txt 0) + larceny:text-inheritance-vector) ,$ex.tlen txt) (.check! (.fixnum? i) ,$ex.tref txt i) diff --git a/src/Lib/Common/text.sch b/src/Lib/Common/text.sch index 3a32675f..3f7c0f19 100644 --- a/src/Lib/Common/text.sch +++ b/src/Lib/Common/text.sch @@ -97,6 +97,11 @@ (define larceny:the-empty-text (%new-text 0 0 (vector (make-bytevector 0)))) +;;; used by src/Compiler/common.imp.sch + +(define larceny:text-inheritance-vector + (vector-like-ref larceny:the-empty-text 0)) + ;;; text? is defined by the record definition above. (define (text-length txt) diff --git a/src/Lib/Common/toplevel.sch b/src/Lib/Common/toplevel.sch index 4fdd08b0..cc3f0ea0 100644 --- a/src/Lib/Common/toplevel.sch +++ b/src/Lib/Common/toplevel.sch @@ -871,7 +871,8 @@ ;; defined in text.sch but not exported by (scheme text) (environment-set! larc 'larceny:text-complain larceny:text-complain) - (environment-set! larc 'larceny:text-rtd larceny:text-rtd) + (environment-set! larc 'larceny:text-inheritance-vector + larceny:text-inheritance-vector) (environment-set! larc '%new-text %new-text) (environment-set! larc 'larceny:text.k larceny:text.k) (environment-set! larc 'larceny:text.chunks larceny:text.chunks) diff --git a/src/Rts/Sys/version.c b/src/Rts/Sys/version.c index a335294c..1eab2923 100644 --- a/src/Rts/Sys/version.c +++ b/src/Rts/Sys/version.c @@ -29,7 +29,7 @@ * General Ripper 0.98b1 21 Oct 2011 fcbaf3b * 0.98 7 Mar 2015 60876f5 * Goldie 0.99 25 May 2016 4671a1f - * Grain Alcohol and Rainwater + * Grain Alcohol and Rainwater 1.3 * Group Commander Mandrake * Hair Mussed * Hi There! @@ -71,8 +71,8 @@ int larceny_major_version = 1; int larceny_minor_version = 3; -/* char *larceny_version_qualifier = " \"Grain Alcohol and Rainwater\""; */ -char *larceny_version_qualifier = "b6"; +char *larceny_version_qualifier = " \"Grain Alcohol and Rainwater\""; +/* char *larceny_version_qualifier = "b6"; */ char *date = DATE " " TIME; char *user = USER;