Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
abcl
abcl
Commits
d800c563
Commit
d800c563
authored
Sep 01, 2012
by
ehuelsmann@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files
Close #189: Fix thinko in MIN and MAX return value type derivation.
parent
5a983a31
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/org/armedbear/lisp/compiler-pass2.lisp
View file @
d800c563
...
...
@@ -5247,7 +5247,8 @@ for use with derive-type-times.")
(
define-int-bounds-derivation
max
(
low1
low2
high1
high2
)
(
values
(
or
(
when
(
and
low1
low2
)
(
max
low1
low2
))
low1
low2
)
(
or
(
when
(
and
high1
high2
)
(
max
high1
high2
))
high1
high2
)))
; if either maximum is unbound, their maximum is unbound
(
when
(
and
high1
high2
)
(
max
high1
high2
))))
(
declaim
(
ftype
(
function
(
t
)
t
)
derive-type-max
))
(
defun
derive-type-max
(
form
)
...
...
@@ -5256,7 +5257,8 @@ for use with derive-type-times.")
(
derive-compiler-types
args
op
)))
(
define-int-bounds-derivation
min
(
low1
high1
low2
high2
)
(
values
(
or
(
when
(
and
low1
low2
)
(
min
low1
low2
))
low1
low2
)
(
values
(
when
(
and
low1
low2
)
(
min
low1
low2
))
; if either minimum is unbound, their minimum is unbound
(
or
(
when
(
and
high1
high2
)
(
min
high1
high2
))
high1
high2
)))
(
defknown
derive-type-min
(
t
)
t
)
...
...
test/lisp/abcl/compiler-tests.lisp
View file @
d800c563
...
...
@@ -473,10 +473,12 @@
t
)
;;; ticket #189
(
deftest
compiler.3
(
eql
(
funcall
(
compile
nil
(
lambda
(
a
)
(
declare
(
type
unsigned-byte
a
))
(
max
28105919
a
1016934843
)))
10545160975
)
10545160975
)
t
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment