Raymond Toy pushed to branch issue-316-support-roundtrip-char-casing at cmucl / cmucl
Commits:
2764c097 by Raymond Toy at 2024-05-29T08:13:52-07:00
Rename case-table.c to case-mapping.c
- - - - -
0f411c4b by Raymond Toy at 2024-05-29T08:16:03-07:00
Rename case_table to case_mapping.
Update the code to name the table from case_table to case_mapping.
Also correct the generated comment to use the correct form used to
generate the C file. Change the default name from case-table.c to
case-mapping.c.
Regenerate case-mapping.c as well.
- - - - -
5fb9f515 by Raymond Toy at 2024-05-29T08:17:56-07:00
Update make file to use case-mapping.c instead of case-table.c
- - - - -
2e4de525 by Raymond Toy at 2024-05-29T08:18:15-07:00
Update naming to use case-mapping instead of case-table.
The alien variable name is now `case_mapping`. Update function names
from `case-table-` to `case-mapping-`.
- - - - -
5 changed files:
- src/code/char.lisp
- src/compiler/srctran.lisp
- src/lisp/GNUmakefile
- src/lisp/case-table.c → src/lisp/case-mapping.c
- src/tools/create-case-table.lisp
Changes:
=====================================
src/code/char.lisp
=====================================
@@ -68,8 +68,8 @@
rules.")
;; Table of mappings for upper case and lower case letters. See
-;; src/lisp/case-table.c.
-(alien:def-alien-variable "case_table"
+;; src/lisp/case-mapping.c.
+(alien:def-alien-variable "case_mapping"
(alien:array (alien:* (alien:array c-call:unsigned-int 64)) 1024))
;; Each entry in the case table consists of the code for either an
@@ -81,9 +81,9 @@
"Number of bits used for the index of the second stage table of the
case mapping table.")
-(declaim (inline case-table-entry))
+(declaim (inline case-mapping-entry))
-(defun case-table-entry (code)
+(defun case-mapping-entry (code)
"For the character code, CODE, return 0 or the 32-bit value from the
case table. A value of 0 means there was no case mapping (neither
upper nor lower case)."
@@ -93,24 +93,24 @@
code))
(index2 (ldb (byte +stage2-size+ 0)
code))
- (stage2-sap (alien:alien-sap (alien:deref case-table index1))))
+ (stage2-sap (alien:alien-sap (alien:deref case-mapping index1))))
(sys:sap-ref-32 stage2-sap (* 4 index2))))
-(declaim (inline case-table-lower-case))
-(defun case-table-lower-case (code)
+(declaim (inline case-mapping-lower-case))
+(defun case-mapping-lower-case (code)
"Compute the lower-case character code for the given character CODE.
If no lower-case code exists, just return CODE."
(declare (type (integer 0 (#.char-code-limit)) code)
(optimize (speed 3)))
- (ldb (byte 16 0) (- code (ldb +lower-case-entry+ (case-table-entry code)))))
+ (ldb (byte 16 0) (- code (ldb +lower-case-entry+ (case-mapping-entry code)))))
-(declaim (inline case-table-upper-case))
-(defun case-table-upper-case (code)
+(declaim (inline case-mapping-upper-case))
+(defun case-mapping-upper-case (code)
"Compute the upper-case character code for the given character CODE.
If no upper-case code exists, just return CODE."
(declare (type (integer 0 (#.char-code-limit)) code)
(optimize (speed 3)))
- (ldb (byte 16 0) (- code (ldb +upper-case-entry+ (case-table-entry code)))))
+ (ldb (byte 16 0) (- code (ldb +upper-case-entry+ (case-mapping-entry code)))))
(macrolet ((frob (char-names-list)
(collect ((results))
@@ -285,7 +285,7 @@
(or (< 64 m 91)
#+(and unicode (not unicode-bootstrap))
(and (> m +unicode-lower-limit+)
- (not (zerop (ldb +lower-case-entry+ (case-table-entry m))))))))
+ (not (zerop (ldb +lower-case-entry+ (case-mapping-entry m))))))))
(defun lower-case-p (char)
@@ -296,7 +296,7 @@
(or (< 96 m 123)
#+(and unicode (not unicode-bootstrap))
(and (> m +unicode-lower-limit+)
- (not (zerop (ldb +upper-case-entry+ (case-table-entry m))))))))
+ (not (zerop (ldb +upper-case-entry+ (case-mapping-entry m))))))))
(defun title-case-p (char)
"The argument must be a character object; title-case-p returns T if the
@@ -318,7 +318,7 @@
(or (< 64 m 91) (< 96 m 123)
#+(and unicode (not unicode-bootstrap))
(and (> m +unicode-lower-limit+)
- (not (zerop (case-table-entry m)))))))
+ (not (zerop (case-mapping-entry m)))))))
(defun digit-char-p (char &optional (radix 10.))
=====================================
src/compiler/srctran.lisp
=====================================
@@ -3335,7 +3335,7 @@
(= (lisp::equal-char-code a)
(lisp::equal-char-code b)))))
-(deftransform char-upcase ((x) (character))
+(deftransform char-upcase ((x) (base-char))
"open code"
#-(and unicode (not unicode-bootstrap))
'(if (lower-case-p x)
@@ -3345,10 +3345,10 @@
'(let ((m (char-code x)))
(cond ((< 96 m 123) (code-char (- m 32)))
((> m lisp::+unicode-lower-limit+)
- (code-char (lisp::case-table-upper-case m)))
+ (code-char (lisp::case-mapping-upper-case m)))
(t x))))
-(deftransform char-downcase ((x) (character))
+(deftransform char-downcase ((x) (base-char))
"open code"
#-(and unicode (not unicode-bootstrap))
'(if (upper-case-p x)
@@ -3358,7 +3358,7 @@
'(let ((m (char-code x)))
(cond ((< 64 m 91) (code-char (+ m 32)))
((> m lisp::+unicode-lower-limit+)
- (code-char (lisp::case-table-lower-case m)))
+ (code-char (lisp::case-mapping-lower-case m)))
(t x))))
=====================================
src/lisp/GNUmakefile
=====================================
@@ -33,7 +33,7 @@ FDLIBM = k_sin.c k_cos.c k_tan.c s_sin.c s_cos.c s_tan.c sincos.c \
SRCS = lisp.c coreparse.c alloc.c monitor.c print.c interr.c \
vars.c parse.c interrupt.c search.c validate.c globals.c \
dynbind.c breakpoint.c regnames.c backtrace.c save.c purify.c \
- runprog.c time.c case-table.c exec-init.c \
+ runprog.c time.c case-mapping.c exec-init.c \
${FDLIBM} ${ARCH_SRC} ${ASSEM_SRC} ${OS_SRC} ${GC_SRC}
OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS))))
=====================================
src/lisp/case-table.c → src/lisp/case-mapping.c
=====================================
@@ -1,7 +1,7 @@
/*
* DO NOT EDIT.
*
- * This was generated by (BUILD-CASE-TABLE 6) in
+ * This was generated by (BUILD-CASE-TABLE :stage2-size 6) in
* src/tools/create-case-table.c.
*/
@@ -681,7 +681,7 @@ const uint32_t stage2_1021[64] = {
};
-const uint32_t (*case_table[1024])[64] = {
+const uint32_t (*case_mapping[1024])[64] = {
&stage2_zeroes,
&stage2_1,
&stage2_zeroes,
=====================================
src/tools/create-case-table.lisp
=====================================
@@ -1,7 +1,7 @@
;; Creates a table of tables that maps a lower case letter to an upper
;; case letter or an upper case letter to a lower case letter. This
;; mapping only works if the roundtrip casing returns the original
-;; character, as required by CLHS.
+;; character, as required by the standard.
;;
;; STAGE2-SIZE is the number of bits to used for the index of the
;; second stage table.
@@ -126,10 +126,10 @@
/*
* DO NOT EDIT.
*
- * This was generated by (BUILD-CASE-TABLE ~D) in
+ * This was generated by (BUILD-CASE-TABLE :STAGE2-SIZE ~D) in
* src/tools/create-case-table.c.
*/~2%"
-stage2-size)
+ stage2-size)
(format stream "#include <stdint.h>~%")
(format stream "#include <stddef.h>~%")
;; First, dump the all-zeroes table
@@ -144,7 +144,7 @@ stage2-size)
s2
stream))
;; Now dump the stage1 table
- (format stream "~2%const uint32_t (*case_table[~D])[~D] = {~%"
+ (format stream "~2%const uint32_t (*case_mapping[~D])[~D] = {~%"
(length table)
(length (aref table (position-if-not #'null table))))
(loop for s2 across table
@@ -156,6 +156,6 @@ stage2-size)
(format stream "};~%")
(format t "Wrote ~S~%" (namestring stream))))
-(defun build-case-table (&key (stage2-size 6) (pathname "./src/lisp/case-table.c"))
+(defun build-case-table (&key (stage2-size 6) (pathname "./src/lisp/case-mapping.c"))
(let ((table (compute-case-table stage2-size)))
(dump-case-table pathname table stage2-size)))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/fce0c4ec7a9cd3261c0490…
--
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/fce0c4ec7a9cd3261c0490…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
d7ad55c5 by Raymond Toy at 2024-05-29T13:59:49+00:00
Fix #321: Rename Motif Config.x86 to Config.linux
- - - - -
f25af05f by Raymond Toy at 2024-05-29T13:59:56+00:00
Merge branch 'issue-321-rename-motif-config-x86' into 'master'
Fix #321: Rename Motif Config.x86 to Config.linux
Closes #321
See merge request cmucl/cmucl!222
- - - - -
2 changed files:
- bin/create-target.sh
- src/motif/server/Config.x86 → src/motif/server/Config.linux
Changes:
=====================================
bin/create-target.sh
=====================================
@@ -83,7 +83,7 @@ case $uname_s in
hp700*) motif_variant=hpux_cc ;;
pmax_mach) motif_variant=pmax_mach ;;
sgi*) motif_variant=irix ;;
- x86_linux*|arm_linux|linux*) motif_variant=x86 ;;
+ *linux*) motif_variant=linux ;;
esac
}
[ -f src/motif/server/Config.$motif_variant ] || quit "No such motif-variant could be found: Config.$motif_variant"
=====================================
src/motif/server/Config.x86 → src/motif/server/Config.linux
=====================================
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/27115bdc8e61349aaa447f…
--
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/27115bdc8e61349aaa447f…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-312-motif-server at cmucl / cmucl
Commits:
300e5279 by Raymond Toy at 2024-05-28T07:27:42-07:00
Address review comments, updating spacing.
- - - - -
1 changed file:
- src/motif/server/datatrans.h
Changes:
=====================================
src/motif/server/datatrans.h
=====================================
@@ -38,7 +38,7 @@ extern void message_write_int_list();
extern void message_write_event();
extern void message_write_color();
/* GCC complains without the full prototype */
-extern void message_write_float(message_t,void*,int);
+extern void message_write_float(message_t,void *,int);
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/300e5279ef294e86cb8c721…
--
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/300e5279ef294e86cb8c721…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
27115bdc by Raymond Toy at 2024-05-28T06:50:11-07:00
Update ansi-test on the correct branch.
Previously, if the ansi-test directory existed, we did a `git pull
--rebase` on whatever branch we happened to be on. Then a bit later
we switched to the desired branch. This meant that we updated some
branch, but then didn't get the updates for the branch we actually
wanted to sue.
Modify script so that we change branches to the desired branch before
pulling new changes.
Since the branch name is used in a couple of places, add an envvar to
hold the name of the desired branch.
- - - - -
1 changed file:
- bin/run-ansi-tests.sh
Changes:
=====================================
bin/run-ansi-tests.sh
=====================================
@@ -31,20 +31,24 @@ done
# Shift out the options
shift $[$OPTIND - 1]
+# Branch to use for tests
+#
+# Use branch cmucl-expected-failures in general since this branch
+# generally has the list of expected failures. This is the branch to
+# use on cmucl master in general.
+BRANCH=cmucl-expected-failures
+
set -x
if [ -d ../ansi-test ]; then
# We already have clone; make sure it's clean by stashing any
- # changes. Then pull any updates.
- (cd ../ansi-test; git stash; git pull --rebase)
+ # changes. Then pull any updates for the desired branch.
+ (cd ../ansi-test; git stash; git checkout $BRANCH; git pull --rebase)
else
(cd ../; git clone https://gitlab.common-lisp.net/cmucl/ansi-test.git)
fi
cd ../ansi-test
-# Use branch cmucl-expected-failures in general since this branch
-# generally has the list of expected failures. This is the branch to
-# use on cmucl master in general.
-git checkout cmucl-expected-failures
+git checkout $BRANCH
make LISP="$LISP batch -noinit -nositeinit"
# There should be no unexpected successes or failures; check these separately
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/27115bdc8e61349aaa447f1…
--
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/27115bdc8e61349aaa447f1…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
a83d2d0e by Raymond Toy at 2024-05-27T21:34:27-07:00
Use cmucl-expected-failures branch for ansi-tests
For cmucl master, use the cmucl-expected-failures branch on ansi-tests
since this branch has the expected failures for the cmucl master
branch. Add a comment about it to so we are reminded about what
branch to use.
- - - - -
1 changed file:
- bin/run-ansi-tests.sh
Changes:
=====================================
bin/run-ansi-tests.sh
=====================================
@@ -41,7 +41,10 @@ else
fi
cd ../ansi-test
-git checkout issue-288-new-failures
+# Use branch cmucl-expected-failures in general since this branch
+# generally has the list of expected failures. This is the branch to
+# use on cmucl master in general.
+git checkout cmucl-expected-failures
make LISP="$LISP batch -noinit -nositeinit"
# There should be no unexpected successes or failures; check these separately
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a83d2d0e046ca26f2e24593…
--
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a83d2d0e046ca26f2e24593…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-156-take-2-nan-comparison at cmucl / cmucl
Commits:
de0dc767 by Raymond Toy at 2024-05-27T17:30:26+00:00
Fix #320: Select default Motif variant for x86_linux_clang
- - - - -
10a64447 by Raymond Toy at 2024-05-27T17:30:33+00:00
Merge branch 'issue-320-x86-linux-clang-motif-variant' into 'master'
Fix #320: Select default Motif variant for x86_linux_clang
Closes #320
See merge request cmucl/cmucl!221
- - - - -
41a1049b by Raymond Toy at 2024-05-27T10:37:23-07:00
Merge branch 'master' into issue-156-take-2-nan-comparison
- - - - -
1 changed file:
- bin/create-target.sh
Changes:
=====================================
bin/create-target.sh
=====================================
@@ -83,7 +83,7 @@ case $uname_s in
hp700*) motif_variant=hpux_cc ;;
pmax_mach) motif_variant=pmax_mach ;;
sgi*) motif_variant=irix ;;
- x86_linux|arm_linux|linux*) motif_variant=x86 ;;
+ x86_linux*|arm_linux|linux*) motif_variant=x86 ;;
esac
}
[ -f src/motif/server/Config.$motif_variant ] || quit "No such motif-variant could be found: Config.$motif_variant"
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/b41b11a72f6bfd46f6137d…
--
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/b41b11a72f6bfd46f6137d…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
de0dc767 by Raymond Toy at 2024-05-27T17:30:26+00:00
Fix #320: Select default Motif variant for x86_linux_clang
- - - - -
10a64447 by Raymond Toy at 2024-05-27T17:30:33+00:00
Merge branch 'issue-320-x86-linux-clang-motif-variant' into 'master'
Fix #320: Select default Motif variant for x86_linux_clang
Closes #320
See merge request cmucl/cmucl!221
- - - - -
1 changed file:
- bin/create-target.sh
Changes:
=====================================
bin/create-target.sh
=====================================
@@ -83,7 +83,7 @@ case $uname_s in
hp700*) motif_variant=hpux_cc ;;
pmax_mach) motif_variant=pmax_mach ;;
sgi*) motif_variant=irix ;;
- x86_linux|arm_linux|linux*) motif_variant=x86 ;;
+ x86_linux*|arm_linux|linux*) motif_variant=x86 ;;
esac
}
[ -f src/motif/server/Config.$motif_variant ] || quit "No such motif-variant could be found: Config.$motif_variant"
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/11c53c2533bbbf7823ffda…
--
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/11c53c2533bbbf7823ffda…
You're receiving this email because of your account on gitlab.common-lisp.net.