Skip to content

Commit

Permalink
Merge pull request #86 from xrme/1.11
Browse files Browse the repository at this point in the history
port many bug fixes from master to 1.11 branch
  • Loading branch information
xrme authored Nov 28, 2017
2 parents 7783946 + 8ad78a9 commit b53062a
Show file tree
Hide file tree
Showing 143 changed files with 772 additions and 8,547 deletions.
61 changes: 1 addition & 60 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ cocoa-ide/altconsole/resource/MainMenu.nib/objects.nib -text
cocoa-ide/altconsole/version.plist -text
cocoa-ide/app-delegate.lisp -text
cocoa-ide/apropos-window.lisp -text
cocoa-ide/asdf-browser.lisp -text
cocoa-ide/build-application.lisp -text
cocoa-ide/builder-utilities.lisp -text
cocoa-ide/ccl-ide.lisp -text
Expand Down Expand Up @@ -92,7 +93,6 @@ cocoa-ide/menus.lisp -text
cocoa-ide/preferences-views.lisp -text
cocoa-ide/preferences.lisp -text
cocoa-ide/processes-window.lisp -text
cocoa-ide/project.lisp -text
cocoa-ide/search-files-pre-lion.lisp -text
cocoa-ide/search-files.lisp -text
cocoa-ide/start.lisp -text
Expand Down Expand Up @@ -143,56 +143,6 @@ doc/manual/using.ccldoc -text
doc/release-notes-1.2.txt -text
doc/release-notes.txt -text
examples/android/native-activity.lisp -text
examples/cocoa/currency-converter/CurrencyConverter.nib/designable.nib -text
examples/cocoa/currency-converter/CurrencyConverter.nib/keyedobjects.nib -text
examples/cocoa/currency-converter/HOWTO.html -text
examples/cocoa/currency-converter/HOWTO_files/images/bosco.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/cc1.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/cc2.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/finder-win1.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/finder-win2.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-leopard1.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-leopard2.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-leopard3.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-leopard4.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-leopard5.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-leopard6.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-leopard7.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-leopard8.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger1.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger10.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger11.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger12.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger13.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger14.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger15.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger16.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger17.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger18.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger19.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger2.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger20.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger21.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger22.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger3.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger4.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger5.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger6.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger7.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger8.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin-tiger9.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/ibwin1.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/listener1.jpg -text
examples/cocoa/currency-converter/HOWTO_files/images/term1.jpg -text
examples/cocoa/currency-converter/HOWTO_files/pages/build_app.html -text
examples/cocoa/currency-converter/HOWTO_files/pages/building_ui.html -text
examples/cocoa/currency-converter/HOWTO_files/pages/building_ui_tiger.html -text
examples/cocoa/currency-converter/HOWTO_files/pages/conclusion.html -text
examples/cocoa/currency-converter/HOWTO_files/pages/create_lisp.html -text
examples/cocoa/currency-converter/HOWTO_files/pages/making_project.html -text
examples/cocoa/currency-converter/HOWTO_files/pages/writing_lisp.html -text
examples/cocoa/currency-converter/HOWTO_files/stylesheets/styles.css -text
examples/cocoa/currency-converter/currency-converter.lisp -text
examples/cocoa/easygui.lisp -text
examples/cocoa/easygui/action-targets.lisp -text
examples/cocoa/easygui/dialogs.lisp -text
Expand All @@ -208,12 +158,6 @@ examples/cocoa/easygui/views.lisp -text
examples/cocoa/interface-databases/HOWTO.html -text
examples/cocoa/interface-databases/HOWTO_files/images/bosco.jpg -text
examples/cocoa/interface-databases/HOWTO_files/stylesheets/styles.css -text
examples/cocoa/nib-loading/HOWTO.html -text
examples/cocoa/nib-loading/HOWTO_files/images/bosco.jpg -text
examples/cocoa/nib-loading/HOWTO_files/stylesheets/styles.css -text
examples/cocoa/nib-loading/hello.nib/designable.nib -text
examples/cocoa/nib-loading/hello.nib/keyedobjects.nib -text
examples/cocoa/nib-loading/nib-loading.lisp -text
examples/cocoa/progress-view-controller/progress-view-controller.lisp -text
examples/cocoa/qtvidcapture/QTVidCapture.nib/classes.nib -text
examples/cocoa/qtvidcapture/QTVidCapture.nib/info.nib -text
Expand Down Expand Up @@ -292,7 +236,6 @@ lib/x8632env.lisp -text
library/cn-encode.lisp -text
library/core-files.lisp -text
library/cover.lisp -text
library/darwinx8632-syscalls.lisp -text
library/dominance.lisp -text
library/elf.lisp -text
library/intel-io.lisp -text
Expand All @@ -307,8 +250,6 @@ library/sequence-utils.lisp -text
library/serial-streams.lisp -text
library/sockets.lisp -text
library/swank-loader.lisp -text
library/x86-win64-syscalls.lisp -text
library/x8664-solaris-syscalls.lisp -text
lisp-kernel/albt.c -text
lisp-kernel/androidarm/Makefile -text
lisp-kernel/androidarm/aarmcl.c -text
Expand Down
File renamed without changes.
54 changes: 27 additions & 27 deletions cocoa-ide/builder-utilities.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -43,68 +43,68 @@
(defparameter $default-application-version-number "1.0")

;;; defaults related to Info.plist files
(defparameter $cfbundle-development-region-key #@"CFBundleDevelopmentRegion")
(defloadvar $cfbundle-development-region-key #@"CFBundleDevelopmentRegion")
(defparameter $default-info-plist-development-region "English")

(defparameter $cfbundle-executable-key #@"CFBundleExecutable")
(defloadvar $cfbundle-executable-key #@"CFBundleExecutable")
(defparameter $default-info-plist-executable $default-application-bundle-name)

(defparameter $cfbundle-getinfo-string-key #@"CFBundleGetInfoString")
(defloadvar $cfbundle-getinfo-string-key #@"CFBundleGetInfoString")
(defparameter $default-info-plist-getInfo-string "\"1.0 Copyright © 2008\"")

(defparameter $cfbundle-help-book-folder-key #@"CFBundleHelpBookFolder")
(defloadvar $cfbundle-help-book-folder-key #@"CFBundleHelpBookFolder")
(defparameter $default-info-plist-help-book-folder "MyApplicationHelp")

(defparameter $cfbundle-help-book-name-key #@"CFBundleHelpBookName")
(defloadvar $cfbundle-help-book-name-key #@"CFBundleHelpBookName")
(defparameter $default-info-plist-help-book-name "\"MyApplication Help\"")

(defparameter $cfbundle-icon-file-key #@"CFBundleIconFile")
(defloadvar $cfbundle-icon-file-key #@"CFBundleIconFile")
(defparameter $default-info-plist-icon-file "\"MyApplication.icns\"")

(defparameter $cfbundle-bundle-identifier-key #@"CFBundleIdentifier")
(defloadvar $cfbundle-bundle-identifier-key #@"CFBundleIdentifier")
(defparameter $default-info-plist-bundle-identifier "\"com.clozure.apps.myapplication\"")

(defparameter $cfbundle-dictionary-version-key #@"CFBundleInfoDictionaryVersion")
(defloadvar $cfbundle-dictionary-version-key #@"CFBundleInfoDictionaryVersion")
(defparameter $default-info-dictionary-version "\"6.0\"")

(defparameter $cfbundle-bundle-name-key #@"CFBundleName")
(defloadvar $cfbundle-bundle-name-key #@"CFBundleName")
(defparameter $default-info-plist-bundle-name "MyApplication")

(defparameter $cfbundle-bundle-package-type-key #@"CFBundlePackageType")
(defloadvar $cfbundle-bundle-package-type-key #@"CFBundlePackageType")
(defparameter $default-info-plist-bundle-package-type "APPL")

(defparameter $cfbundle-short-version-string-key #@"CFBundleShortVersionString")
(defloadvar $cfbundle-short-version-string-key #@"CFBundleShortVersionString")
(defparameter $default-info-plist-short-version-string "\"1.0\"")

(defparameter $cfbundle-bundle-signature-key #@"CFBundleSignature")
(defloadvar $cfbundle-bundle-signature-key #@"CFBundleSignature")
(defparameter $default-info-plist-bundle-signature "OMCL")

(defparameter $cfbundle-version-key #@"CFBundleVersion")
(defloadvar $cfbundle-version-key #@"CFBundleVersion")
(defparameter $default-info-plist-version "\"1.0\"")

(defparameter $ls-has-localized-display-name-key #@"LSHasLocalizedDisplayName")
(defloadvar $ls-has-localized-display-name-key #@"LSHasLocalizedDisplayName")
(defparameter $default-info-plist-has-localized-display-name "0")

(defparameter $ls-minimum-system-version-key #@"LSMinimumSystemVersion")
(defloadvar $ls-minimum-system-version-key #@"LSMinimumSystemVersion")
(defparameter $default-info-plist-minimum-system-version "\"10.5\"")

(defparameter $ns-main-nib-file-key #@"NSMainNibFile")
(defloadvar $ns-main-nib-file-key #@"NSMainNibFile")
(defparameter $default-info-plist-main-nib-file "MainMenu")

(defparameter $ns-principal-class-key #@"NSPrincipalClass")
(defloadvar $ns-principal-class-key #@"NSPrincipalClass")
(defparameter $default-info-plist-principal-class "LispApplication")

;;; keys for document-types dicts
(defparameter $cfbundle-type-extensions-key #@"CFBundleTypeExtensions")
(defparameter $cfbundle-type-icon-file-key #@"CFBundleTypeIconFile")
(defparameter $cfbundle-type-mime-types-key #@"CFBundleTypeMIMETypes")
(defparameter $cfbundle-type-name-key #@"CFBundleTypeName")
(defparameter $cfbundle-type-ostypes-key #@"CFBundleTypeOSTypes")
(defparameter $cfbundle-type-role-key #@"CFBundleTypeRole")
(defparameter $ls-item-content-types-key #@"LSItemContentTypes")
(defparameter $ls-type-is-package-key #@"LSTypeIsPackage")
(defparameter $ns-document-class-key #@"NSDocumentClass")
(defparameter $ns-exportable-as-key #@"NSExportableAs")
(defloadvar $cfbundle-type-extensions-key #@"CFBundleTypeExtensions")
(defloadvar $cfbundle-type-icon-file-key #@"CFBundleTypeIconFile")
(defloadvar $cfbundle-type-mime-types-key #@"CFBundleTypeMIMETypes")
(defloadvar $cfbundle-type-name-key #@"CFBundleTypeName")
(defloadvar $cfbundle-type-ostypes-key #@"CFBundleTypeOSTypes")
(defloadvar $cfbundle-type-role-key #@"CFBundleTypeRole")
(defloadvar $ls-item-content-types-key #@"LSItemContentTypes")
(defloadvar $ls-type-is-package-key #@"LSTypeIsPackage")
(defloadvar $ns-document-class-key #@"NSDocumentClass")
(defloadvar $ns-exportable-as-key #@"NSExportableAs")

;;; NOT-VC-CONTROL-FILE (path)
;;; ------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion cocoa-ide/cocoa-application.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
(defvar *cocoa-ide-path*
(let* ((bits (nth-value 1 (host-platform))))
(format nil "ccl:Clozure CL~a.app;" bits)))
(defvar *cocoa-ide-copy-headers-p* nil)
(defvar *cocoa-ide-copy-headers-p* t)
(defvar *cocoa-ide-install-altconsole* t)
(defvar *cocoa-ide-bundle-suffix*
(multiple-value-bind (os bits cpu) (host-platform)
Expand Down
2 changes: 1 addition & 1 deletion cocoa-ide/defsystem.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
"cocoa-grep")
"cocoa-backtrace"
"inspector"
"project"
"cocoa-remote-lisp"
"preferences-views"
"preferences"
Expand Down Expand Up @@ -181,4 +180,5 @@
(setq *ide-files* (append *ide-files* *leopard-only-ide-files*))))
(load-mac-ui-files *mac-ui-files* "ccl:mac-ui;" force-compile)
(load-ide-files *ide-files* "ccl:cocoa-ide;" force-compile)
(require 'build-application)
(provide "COCOA"))
67 changes: 13 additions & 54 deletions compiler/ARM/arm2.lisp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;;-*-Mode: LISP; Package: CCL -*-
;;-*-Mode: LISP; Package: CCL -*-
;;;
;;; Copyright 2010 Clozure Associates
;;;
Expand Down Expand Up @@ -45,7 +45,7 @@
(let* ((max 0))
(declare (fixnum max))
(dolist (v *arm2-all-nfp-pushes* max)
(when (vinsn-succ v) ;not elided
(when (and v (vinsn-succ v)) ;not elided
(let* ((depth (+ (the fixnum (svref (vinsn-variable-parts v) 1))
(if (vinsn-attribute-p v :doubleword)
16
Expand Down Expand Up @@ -234,7 +234,7 @@
(when (and (logbitp i in)
(eql c (svref vals i)))
(setq out (logior out (ash 1 i)))))))

(defun arm2-nfp-ref (seg vreg ea)
(with-arm-local-vinsn-macros (seg vreg)
(let* ((offset (logand #xfff8 ea))
Expand Down Expand Up @@ -6722,54 +6722,11 @@ v idx-reg constidx val-reg (arm2-unboxed-reg-for-aset seg type-keyword val-reg s
;;; the label.
;;; "predicate" is being used as a verb here - "to make predicated".
(defun arm2-predicate-block (labelnum)
(let* ((lab (aref *backend-labels* labelnum))
(refs (vinsn-label-refs lab))
(branch (car refs)))
(if (and (vinsn-attribute-p branch :branch)
(null (cdr refs)))
(when (do* ((next (dll-node-succ branch) (dll-node-succ next))
(count 0 (1+ count))
(vinsn-p nil))
((eq next lab) (return vinsn-p))
(declare (fixnum count))
(if (typep next 'vinsn-label)
(unless (typep (vinsn-label-id next) 'vinsn-note)
(return))
(progn
(when (= count 2)
(return))
(unless (and (typep next 'vinsn)
(null (getf (vinsn-annotation next) :predicate))
(vinsn-attribute-p next :predicatable)
(or (eq lab (dll-node-succ next))
(not (vinsn-attribute-p next :jump :call :jumpLR))))
(return))
(setq vinsn-p t))))
(multiple-value-bind (branch-true-p branch-condition cond-operand-index)
(let* ((branch-instr (car (vinsn-template-body (vinsn-template branch))))
(values (vinsn-variable-parts branch))
(operands (cdr branch-instr)))
(dolist (op operands (values nil nil nil))
(cond ((eql (car op) (arm::encode-vinsn-field-type :cond))
(return (values t (svref values (cadr op)) (cadr op))))
((eql (car op) (arm::encode-vinsn-field-type :negated-cond))
(return (values nil (svref values (cadr op)) (cadr op)))))))
(when branch-condition
(let* ((condition (if branch-true-p (logxor 1 branch-condition) branch-condition)))
(do* ((next (dll-node-succ branch) (dll-node-succ next)))
((eq next lab)
(elide-vinsn branch)
(remove-dll-node lab)
t)
(cond ((typep next 'vinsn-label))
((vinsn-attribute-p next :jump)
(setf (vinsn-template next)
(need-vinsn-template 'cbranch-true
(backend-p2-vinsn-templates
*target-backend*))
(svref (vinsn-variable-parts next) cond-operand-index)
condition))
(t (setf (getf (vinsn-annotation next) :predicate) condition)))))))))))
;; This no longer works now that vinsn varparts are no longer
;; freelisted. To bootstrap from the first 1.11 release, you will need
;; to manually compile this new no-op function before calling
;; compile-ccl.
(declare (ignore labelnum)))

(defparameter *arm2-generate-casejump* t)

Expand Down Expand Up @@ -9379,8 +9336,8 @@ v idx-reg constidx val-reg (arm2-unboxed-reg-for-aset seg type-keyword val-reg s
(fix-y (acode-fixnum-form-p y)))
(if (and fix-x fix-y)
(arm2-natural-constant seg vreg xfer (+ fix-x fix-y))
(let* ((u15x (and (typep fix-x '(unsigned-byte 15)) fix-x))
(u15y (and (typep fix-y '(unsigned-byte 15)) fix-y)))
(let* ((u15x (and (typep fix-x '(unsigned-byte 15)) (arm::encode-arm-immediate fix-x) fix-x))
(u15y (and (typep fix-y '(unsigned-byte 15)) (arm::encode-arm-immediate fix-y) fix-y)))
(if (not (or u15x u15y))
(with-imm-target () (xreg :natural)
(with-imm-target (xreg) (yreg :natural)
Expand All @@ -9403,7 +9360,9 @@ v idx-reg constidx val-reg (arm2-unboxed-reg-for-aset seg type-keyword val-reg s
(fix-y (acode-fixnum-form-p y)))
(if (and fix-x fix-y)
(arm2-natural-constant seg vreg xfer (- fix-x fix-y))
(let* ((u15y (and (typep fix-y '(unsigned-byte 15)) fix-y)))
(let* ((u15y (and (typep fix-y '(unsigned-byte 15))
(arm::encode-arm-immediate fix-y)
fix-y)))
(if (not u15y)
(with-imm-target () (xreg :natural)
(with-imm-target (xreg) (yreg :natural)
Expand Down
10 changes: 5 additions & 5 deletions compiler/X86/X8664/x8664-vinsns.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
(define-x8664-vinsn misc-ref-complex-double-float (((dest :complex-double-float))
((v :lisp)
(scaled-idx :imm)))
(movapd (:@ x8664::complex-double-float.realpart (:%q v) (:%q scaled-idx) 2) (:%xmm dest)))
(movdqu (:@ x8664::complex-double-float.realpart (:%q v) (:%q scaled-idx) 2) (:%xmm dest)))

(define-x8664-vinsn misc-ref-c-double-float (((dest :double-float))
((v :lisp)
Expand Down Expand Up @@ -132,7 +132,7 @@
(v :lisp)
(unscaled-idx :imm))
())
(movapd (:%xmm val) (:@ x8664::complex-double-float.realpart (:%q v) (:%q unscaled-idx) 2)))
(movdqu (:%xmm val) (:@ x8664::complex-double-float.realpart (:%q v) (:%q unscaled-idx) 2)))

(define-x8664-vinsn misc-ref-u8 (((dest :u8))
((v :lisp)
Expand Down Expand Up @@ -1833,7 +1833,7 @@

(define-x8664-vinsn get-complex-double-float (((result :complex-double-float))
((source :lisp)))
(movdqa (:@ x8664::complex-double-float.realpart (:%q source)) (:%xmm result)))
(movdqu (:@ x8664::complex-double-float.realpart (:%q source)) (:%xmm result)))

(define-x8664-vinsn get-complex-single-float (((result :complex-single-float))
((source :lisp)))
Expand Down Expand Up @@ -2371,7 +2371,7 @@
(define-x8664-vinsn set-complex-double-float-value (()
((node :lisp)
(val :complex-double-float)))
(movdqa (:%xmm val) (:@ x8664::complex-double-float.realpart (:%q node))))
(movdqu (:%xmm val) (:@ x8664::complex-double-float.realpart (:%q node))))

(define-x8664-vinsn set-complex-single-float-value (()
((node :lisp)
Expand Down Expand Up @@ -5167,7 +5167,7 @@
((r :double-float)
(i :double-float)))
((:not (:pred = (:apply %hard-regspec-value r) (:apply %hard-regspec-value dest)))
(:movupd (:%xmm r)(:%xmm dest)))
(movapd (:%xmm r) (:%xmm dest)))
(shufpd (:$ub 0) (:%xmm i) (:%xmm dest)))


Expand Down
Loading

0 comments on commit b53062a

Please sign in to comment.