[Git][cmucl/cmucl][master] 3 commits: Fix #60: `C::%UNARY-FROUND` is undefined

Raymond Toy rtoy at common-lisp.net
Sun Feb 18 15:30:53 UTC 2018


Raymond Toy pushed to branch master at cmucl / cmucl


Commits:
26e3ad82 by Raymond Toy at 2018-02-17T19:44:02-08:00
Fix #60: `C::%UNARY-FROUND` is undefined

Remove the symbol `C::%UNARY-FROUND` and just let the compiler package
inherit it from the kernel package.

* src/bootfiles/21c/boot-2018-02-1.lisp
    * Use this to bootstrap the change (by uninterning the symbol)
* src/code/float.lisp
    * Just export %unary-fround
* src/general-info/release-21d.md
    * Update
* tests/issues.lisp
    * Add test for this issue

- - - - -
84d9a4bd by Raymond Toy at 2018-02-17T19:56:32-08:00
Oops. Need to build with the bootstrap file.

- - - - -
31c6bf9f by Raymond Toy at 2018-02-18T15:30:51+00:00
Merge branch 'rtoy-fix-60-unary-fround-undefined' into 'master'

Fix #60: unary fround undefined

Closes #60

See merge request cmucl/cmucl!36
- - - - -


5 changed files:

- .gitlab-ci.yml
- + src/bootfiles/21c/boot-2018-02-1.lisp
- src/code/float.lisp
- src/general-info/release-21d.md
- tests/issues.lisp


Changes:

=====================================
.gitlab-ci.yml
=====================================
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,7 +12,7 @@ linux-runner:
     - mkdir snapshot
     - (cd snapshot; tar xjf ../cmucl-$version-linux.tar.bz2; tar xjf ../cmucl-$version-linux.extra.tar.bz2)
   script:
-    - bin/build.sh -C "" -o snapshot/bin/lisp
+    - bin/build.sh -B boot-2018-02-1 -C "" -o snapshot/bin/lisp
     - bin/make-dist.sh -I dist linux-4
     - bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
 
@@ -24,6 +24,6 @@ osx-runner:
     - mkdir snapshot
     - (cd snapshot; tar xjf ../cmucl-$version-darwin.tar.bz2)
   script:
-    - bin/build.sh -C "" -o snapshot/bin/lisp
+    - bin/build.sh -B boot-2018-02-1 -C "" -o snapshot/bin/lisp
     - bin/make-dist.sh -I dist darwin-4
     - bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log


=====================================
src/bootfiles/21c/boot-2018-02-1.lisp
=====================================
--- /dev/null
+++ b/src/bootfiles/21c/boot-2018-02-1.lisp
@@ -0,0 +1,5 @@
+;; Get rid of incorrect symbol c::%unary-fround and just inherit
+;; %unary-fround from the kernel package.
+(ext:without-package-locks
+  (unintern 'c::%unary-fround "C"))
+(export 'kernel::%unary-fround "KERNEL")


=====================================
src/code/float.lisp
=====================================
--- a/src/code/float.lisp
+++ b/src/code/float.lisp
@@ -23,7 +23,7 @@
 	  %unary-ftruncate/single-float %unary-ftruncate/double-float))
 
 #-x87
-(export '(%unary-fround/single-float %unary-fround/double-float))
+(export '(%unary-fround %unary-fround/single-float %unary-fround/double-float))
 
 (in-package "LISP")
 (export '(least-positive-normalized-short-float


=====================================
src/general-info/release-21d.md
=====================================
--- a/src/general-info/release-21d.md
+++ b/src/general-info/release-21d.md
@@ -29,10 +29,11 @@ public domain.
   * ANSI compliance fixes:
   * Bug fixes:
   * Gitlab tickets:
-    * ~~~#50~~~ CLX (Hemlock) fails to run.
-    * ~~~#49~~~ CLM crashes
-    * ~~~#47~~~ Backquate and multiple splices
-    * ~~~#59~~~ Incorrect type-derivation for `decode-float`
+    * ~~#50~~ CLX (Hemlock) fails to run.
+    * ~~#49~~ CLM crashes
+    * ~~#47~~ Backquate and multiple splices
+    * ~~#59~~ Incorrect type-derivation for `decode-float`
+    * ~~#60~~ The function `C::%UNARY-FROUND` is undefined
   * Other changes:
   * Improvements to the PCL implementation of CLOS:
   * Changes to building procedure:


=====================================
tests/issues.lisp
=====================================
--- a/tests/issues.lisp
+++ b/tests/issues.lisp
@@ -503,4 +503,15 @@
 		     (c::decode-float-exp-derive-type-aux
 		      (c::specifier-type `(single-float ,arg-lo ,arg-hi)))
 		     arg-lo
-		     arg-hi))))
\ No newline at end of file
+		     arg-hi))))
+
+(define-test issue.60
+  (:tag :issues)
+  (let ((c14 (compile nil #'(lambda (x)
+			      (fround (the (member 1.0 2d0) x))))))
+    (assert-equalp
+     (values 1.0 0.0)
+     (funcall c14 1.0))
+    (assert-equalp
+     (values 2d0 0d0)
+     (funcall c14 2d0))))



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/894e18e020e6a16024bc63f2f54ac07f6d314b9d...31c6bf9faef2ce24d42d5af0bea8e2d103912563

---
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/894e18e020e6a16024bc63f2f54ac07f6d314b9d...31c6bf9faef2ce24d42d5af0bea8e2d103912563
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20180218/ee31b5f3/attachment-0001.html>


More information about the cmucl-cvs mailing list