Raymond Toy pushed to branch issue-166-integer-decode-float-min-float at cmucl / cmucl
Commits:
dd122d48 by Raymond Toy at 2023-02-25T07:17:01-08:00
Set version to current 21d in build.sh
Bootstrap files should come from the 21d directory, not the 21c
directory.
- - - - -
62dfe149 by Raymond Toy at 2023-02-25T07:17:59-08:00
Move {DOUBLE,SINGLE}-FLOAT-INT-EXPONENT to KERNEL
Since {DOUBLE,SINGLE}-FLOAT-EXPONENT is in the KERNEL package, let's
do the same for {DOUBLE,SINGLE}-FLOAT-INT-EXPONENT. This requires
removing them from the C package so they can be exported from the
KERNEL package.
To do this, use the bootstrap file boot-2021-07-1 to unintern these
from the C package.
Then update the KERNEL package to export these symbols.
Finally, update the definition of FLOAT-INT-EXPONENT to use
KERNEL:DOUBLE-FLOAT-INT-EXPONENT instead of
C::DOUBLE-FLOAT-INT-EXPONENT.
- - - - -
0dac88e6 by Raymond Toy at 2023-02-25T07:24:24-08:00
Add comment on what the bootfile is doing.
- - - - -
7338f627 by Raymond Toy at 2023-02-25T07:25:19-08:00
Update CI to use the bootstrap file.
We'll have to continue using the bootstrap file until a new
snapshot/release is done.
- - - - -
5 changed files:
- .gitlab-ci.yml
- bin/build.sh
- + src/bootfiles/21d/boot-2021-07-1.lisp
- src/code/exports.lisp
- src/compiler/generic/vm-type.lisp
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -1,7 +1,7 @@
variables:
download_url: "https://common-lisp.net/project/cmucl/downloads/snapshots/2021/07"
version: "2021-07-x86"
- bootstrap: ""
+ bootstrap: "-B boot-2021-07-1"
stages:
- install
=====================================
bin/build.sh
=====================================
@@ -39,7 +39,7 @@ ENABLE2="yes"
ENABLE3="yes"
ENABLE4="yes"
-version=21c
+version=21d
SRCDIR=src
BINDIR=bin
TOOLDIR=$BINDIR
=====================================
src/bootfiles/21d/boot-2021-07-1.lisp
=====================================
@@ -0,0 +1,18 @@
+;; Bootstrap file
+;;
+;; Use "bin/build.sh -B boot-2021-07-1" to build this.
+;;
+;; We want to export the symbols from the KERNEL package which also
+;; exists in the C package, so we unintern the conflicting symbols from
+;; the C package.
+
+(in-package "KERNEL")
+(ext:without-package-locks
+ (handler-bind
+ ((error (lambda (c)
+ ;;(declare (ignore c))
+ (describe c)
+ (invoke-restart 'lisp::unintern-conflicting-symbols))))
+ (export '(DOUBLE-FLOAT-INT-EXPONENT
+ SINGLE-FLOAT-INT-EXPONENT))))
+
=====================================
src/code/exports.lisp
=====================================
@@ -2329,6 +2329,7 @@
"DOUBLE-FLOAT-EXPONENT"
"DOUBLE-FLOAT-BITS"
"DOUBLE-FLOAT-HIGH-BITS"
+ "DOUBLE-FLOAT-INT-EXPONENT"
"DOUBLE-FLOAT-LOW-BITS" "DOUBLE-FLOAT-P" "FLOAT-WAIT"
"DYNAMIC-SPACE-FREE-POINTER" "ERROR-NUMBER-OR-LOSE" "FILENAME"
"FLOAT-DIGITS" "FLOAT-EXPONENT" "FLOAT-FORMAT-DIGITS"
@@ -2426,6 +2427,7 @@
"SIMPLE-ARRAY-SIGNED-BYTE-16-P" "SIMPLE-ARRAY-SIGNED-BYTE-30-P"
"SIMPLE-ARRAY-SIGNED-BYTE-32-P" "SIMPLE-ARRAY-SIGNED-BYTE-8-P"
"SIMPLE-UNBOXED-ARRAY" "SINGLE-FLOAT-BITS" "SINGLE-FLOAT-EXPONENT"
+ "SINGLE-FLOAT-INT-EXPONENT"
"SINGLE-FLOAT-P" "SINGLE-VALUE-TYPE" "SPECIFIER-TYPE" "STACK-REF"
"STD-COMPUTE-CLASS-PRECEDENCE-LIST"
"STREAMLIKE" "SIMPLE-STREAM-BUFFER" "STRINGABLE" "STRINGLIKE"
=====================================
src/compiler/generic/vm-type.lisp
=====================================
@@ -51,7 +51,7 @@
#-long-float 'double-float-exponent
#+long-float 'long-float-exponent)
(deftype float-int-exponent ()
- 'c::double-float-int-exponent)
+ 'double-float-int-exponent)
(deftype float-digits ()
#-long-float `(integer 0 ,vm:double-float-digits)
#+long-float `(integer 0 ,vm:long-float-digits))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/1683679d5ac48e16e0bf9b…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/1683679d5ac48e16e0bf9b…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
be8cb5d0 by Tarn W. Burton at 2023-02-21T07:48:12-05:00
Avoid inserting NIL into simple LOOP from FORMAT
- - - - -
0d3cbc39 by Raymond Toy at 2023-02-21T23:25:27+00:00
Merge branch 'fix-format-nil' into 'master'
Fix #165: Avoid inserting NIL into simple LOOP from FORMAT
See merge request cmucl/cmucl!114
- - - - -
2 changed files:
- src/code/format.lisp
- tests/printer.lisp
Changes:
=====================================
src/code/format.lisp
=====================================
@@ -399,7 +399,8 @@
(form new-directives)
(expand-directive (car remaining-directives)
(cdr remaining-directives))
- (push form results)
+ (when form
+ (push form results))
(setf remaining-directives new-directives)))
(reverse results)))
=====================================
tests/printer.lisp
=====================================
@@ -113,3 +113,16 @@
(define-test sub-output-integer.1
(assert-prints "-536870912" (princ most-negative-fixnum)))
+
+;;; Simple LOOP requires only compound forms. Hence NIL is not
+;;; permitted. Some FORMAT directives (like newline) return NIL
+;;; as the form when they have nothing to add to the body.
+;;; Normally this is fine since BLOCK accepts NIL as a form. On
+;;; the other hand, when the newline directive is inside of an
+;;; iteration directive this will produce something like
+;;; (LOOP (fu) nil (bar)) which is not acceptable. To verify
+;;; that this is not happening we make sure we are not getting
+;;; (BLOCK NIL NIL) since this is easier to test for.
+(define-test format-no-nil-form.1
+ (assert-equal '(block nil) (third (second (macroexpand-1 '(formatter "~
+"))))))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/4be1d90cfdf7c67efb30a3…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/4be1d90cfdf7c67efb30a3…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-158-darwin-pathnames-utf8 at cmucl / cmucl
Commits:
a4475ab6 by Raymond Toy at 2023-02-20T13:33:07-08:00
Use correct path to directory for issues.158.dir
Need to merge in `*test-path*` to get the correct path to the
directory containing the file we want to test.
- - - - -
1 changed file:
- tests/issues.lisp
Changes:
=====================================
tests/issues.lisp
=====================================
@@ -861,7 +861,7 @@
(:tag :issues)
(flet ((get-file ()
;; This assumes that there is only one file in resources/darwin
- (let ((files (directory "resources/darwin/*.txt")))
+ (let ((files (directory (merge-pathnames "resources/darwin/*.txt" *test-path*))))
(assert-equal (length files) 1)
(first files))))
(let ((f (get-file))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a4475ab65d0aebc845408bc…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a4475ab65d0aebc845408bc…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-158-darwin-pathnames-utf8 at cmucl / cmucl
Commits:
125977aa by Raymond Toy at 2023-02-20T12:59:11-08:00
Add tests for darwin filename normalization
Test issue.158 tests that `make-pathname` normalizes the components
according to Darwin rules.
Test issue.158.dir tests that `directory` returns the expected file
names.
Add the file "tests/resources/darwin/안녕하십니까.txt" to be used for
`issue.158.dir`.
- - - - -
2 changed files:
- tests/issues.lisp
- + tests/resources/darwin/안녕하십니까.txt
Changes:
=====================================
tests/issues.lisp
=====================================
@@ -826,3 +826,49 @@
(*compile-print* nil))
(assert-true (stream::find-external-format :euckr))
(assert-true (stream::find-external-format :cp949))))
+
+(define-test issue.158
+ (:tag :issues)
+ (let* ((name (string #\Hangul_Syllable_Gyek))
+ (path (make-pathname :directory (list :relative name)
+ :name name
+ :type name)))
+ #+darwin
+ (let ((expected '(4352 4456 4543)))
+ ;; Tests that on Darwin the Hangul pathname has been normalized
+ ;; correctly. We fill in the directory, name, and type components
+ ;; with the same thing since it shouldn't really matter.
+ ;;
+ ;; The expected value is the conjoining jamo for the character
+ ;; #\Hangul_Syllable_Gyek.
+ (assert-equal (map 'list #'char-code (second (pathname-directory path)))
+ expected)
+ (assert-equal (map 'list #'char-code (pathname-name path))
+ expected)
+ (assert-equal (map 'list #'char-code (pathname-type path))
+ expected))
+ #-darwin
+ (let ((expected (list (char-code #\Hangul_Syllable_Gyek))))
+ ;; For other OSes, just assume that the pathname is unchanged.
+ (assert-equal (map 'list #'char-code (second (pathname-directory path)))
+ expected)
+ (assert-equal (map 'list #'char-code (pathname-name path))
+ expected)
+ (assert-equal (map 'list #'char-code (pathname-type path))
+ expected))))
+
+(define-test issue.158.dir
+ (:tag :issues)
+ (flet ((get-file ()
+ ;; This assumes that there is only one file in resources/darwin
+ (let ((files (directory "resources/darwin/*.txt")))
+ (assert-equal (length files) 1)
+ (first files))))
+ (let ((f (get-file))
+ (expected-name "안녕하십니까"))
+ #+darwin
+ (assert-equal (pathname-name f)
+ (unicode::decompose-hangul expected-name))
+ #-darwin
+ (assert-equal (pathname-name f) expected-name))))
+
=====================================
tests/resources/darwin/안녕하십니까.txt
=====================================
@@ -0,0 +1,3 @@
+The file name of this file is "안녕하십니까.txt" ("Hello" in Korean.)
+
+
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/125977aaf357c0bff4726a0…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/125977aaf357c0bff4726a0…
You're receiving this email because of your account on gitlab.common-lisp.net.