Merge remote-tracking branch 'origin/master' into feature/android
This commit is contained in:
commit
bf93380c1c
5 changed files with 24 additions and 8 deletions
|
@ -439,13 +439,12 @@ for speeding up processing.")
|
|||
(byte-optimize-body (cdr clause) for-effect))))
|
||||
clauses)))
|
||||
|
||||
;; `unwind-protect' is a special form which here takes the shape
|
||||
;; (unwind-protect EXPR :fun-body UNWIND-FUN).
|
||||
;; We can treat it as if it were a plain function at this point,
|
||||
;; although there are specific optimizations possible.
|
||||
;; In particular, the return value of UNWIND-FUN is never used
|
||||
;; so its body should really be compiled for-effect, but we
|
||||
;; don't do that right now.
|
||||
(`(unwind-protect ,protected-expr :fun-body ,unwind-fun)
|
||||
;; FIXME: The return value of UNWIND-FUN is never used so we
|
||||
;; could potentially optimise it for-effect, but we don't do
|
||||
;; that right no.
|
||||
`(,fn ,(byte-optimize-form protected-expr for-effect)
|
||||
:fun-body ,(byte-optimize-form unwind-fun)))
|
||||
|
||||
(`(catch ,tag . ,exps)
|
||||
`(,fn ,(byte-optimize-form tag nil)
|
||||
|
|
|
@ -4590,6 +4590,7 @@ Return (TAIL VAR TEST CASES), where:
|
|||
(if switch-prefix
|
||||
(progn
|
||||
(byte-compile-cond-jump-table (cdr switch-prefix) donetag)
|
||||
(setq clause nil)
|
||||
(setq clauses (car switch-prefix)))
|
||||
(setq clause (car clauses))
|
||||
(cond ((or (eq (car clause) t)
|
||||
|
|
|
@ -4791,7 +4791,9 @@ Do not set it manually, it is used buffer-local in `tramp-get-lock-pid'.")
|
|||
;; Trigger the unlock error.
|
||||
(signal 'file-error `("Cannot remove lock file for" ,file)))
|
||||
;; `userlock--handle-unlock-error' exists since Emacs 28.1.
|
||||
(error (tramp-compat-funcall 'userlock--handle-unlock-error err))))
|
||||
(error
|
||||
(when create-lockfiles
|
||||
(tramp-compat-funcall 'userlock--handle-unlock-error err)))))
|
||||
|
||||
(defun tramp-handle-load (file &optional noerror nomessage nosuffix must-suffix)
|
||||
"Like `load' for Tramp files."
|
||||
|
|
|
@ -757,6 +757,15 @@ inner loops respectively."
|
|||
(bytecomp-test-identity 3)
|
||||
(error 'bad)
|
||||
(:success)) ; empty handler
|
||||
|
||||
;; `cond' miscompilation bug
|
||||
(let ((fn (lambda (x)
|
||||
(let ((y nil))
|
||||
(cond ((progn (setq x (1+ x)) (> x 10)) (setq y 'a))
|
||||
((eq x 1) (setq y 'b))
|
||||
((eq x 2) (setq y 'c)))
|
||||
(list x y)))))
|
||||
(mapcar fn (bytecomp-test-identity '(0 1 2 3 10 11))))
|
||||
)
|
||||
"List of expressions for cross-testing interpreted and compiled code.")
|
||||
|
||||
|
|
|
@ -4590,6 +4590,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
|||
(should (equal (file-name-completion "foo" tmp-name) t))
|
||||
(should (equal (file-name-completion "b" tmp-name) "bo"))
|
||||
(should-not (file-name-completion "a" tmp-name))
|
||||
;; `file-name-completion' should not err out if
|
||||
;; directory does not exist. (Bug#61890)
|
||||
(should-not
|
||||
(file-name-completion
|
||||
"a" (tramp-compat-file-name-concat tmp-name "fuzz")))
|
||||
;; Ange-FTP does not support predicates.
|
||||
(unless (tramp--test-ange-ftp-p)
|
||||
(should
|
||||
|
|
Loading…
Add table
Reference in a new issue