Skip to content

Commit eee28bd

Browse files
committed
Revert "Fix BTB compiler problem"
This reverts commit 558b477.
1 parent 4dbb94c commit eee28bd

File tree

2 files changed

+3
-32
lines changed

2 files changed

+3
-32
lines changed

src/lisp/kernel/cleavir/compile-bytecode.lisp

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -280,27 +280,12 @@
280280
(loop for a in annotations
281281
do (start-annotation a inserter context)))
282282

283-
(defun annotation< (annot1 annot2)
284-
;; We keep ANNOTS sorted by end IP.
285-
;; If they tie on end IP, we use the reverse order of the starts.
286-
;; Imagine we have an annotation 5-13 and another 11-13.
287-
;; We want to start the 5-13, then start the 11-13, then end the 11-13.
288-
;; That's why we reverse order of the starts.
289-
;; If two annotations start and end at the same point there may be a
290-
;; problem. I don't think this can actually arise.
291-
(let ((end1 (core:bytecode-debug-info/end annot1))
292-
(end2 (core:bytecode-debug-info/end annot2)))
293-
(cond ((< end1 end2) t)
294-
((= end1 end2)
295-
(> (core:bytecode-debug-info/start annot1)
296-
(core:bytecode-debug-info/start annot2)))
297-
(t nil))))
298-
299283
(defun add-annotations (annots next-annots)
300284
;; We keep ANNOTS sorted by end IP.
301285
;; FIXME? This could be done without consing, but it would be uglier.
302-
(let ((sna (sort (copy-list next-annots) #'annotation<)))
303-
(merge 'list annots sna #'annotation<)))
286+
(let ((sna (sort (copy-list next-annots) #'<
287+
:key #'core:bytecode-debug-info/end)))
288+
(merge 'list annots sna #'< :key #'core:bytecode-debug-info/end)))
304289

305290
(defun end-annotations (ip annots inserter context)
306291
;; ANNOTS are kept sorted by bdi/end, so this is easy.

src/lisp/regression-tests/btb.lisp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,3 @@
121121
(funcall cc) (funcall cc)
122122
(values (funcall c) warningsp failurep)))
123123
(3 nil nil))
124-
125-
;;; meister ran into this in some complex cando code
126-
;;; errored out with #<VARIABLE R> fell through ETYPECASE expression.
127-
;;; Wanted one of LINEAR-DATUM (CONS LINEAR-DATUM)
128-
(test btb.misc-1
129-
(let ((f (cmp:bytecompile
130-
'(lambda ()
131-
(let ((ef (let (r)
132-
(flet ((f (a) (eql r a))) #'f))))
133-
ef)))))
134-
(multiple-value-bind (cc warningsp failurep) (compile nil f)
135-
(declare (ignore cc))
136-
(values warningsp failurep)))
137-
(nil nil))

0 commit comments

Comments
 (0)