Skip to content
Snippets Groups Projects
Commit cdf11377 authored by Raymond Toy's avatar Raymond Toy
Browse files

Fix ticket:60.

This fixes the immediate issue, but there are still problems with
very long strings.  The bit-index for such strings won't fit in an
(unsigned-byte 32).

vm-fndb.lisp:
o Correct the defknown to have the correct arg types (vm::offset
  instead of index).

vm-tran.lisp:
o Update deftransform to use vm::offset instead of index.
parent 683d1168
No related branches found
No related tags found
No related merge requests found
......@@ -307,8 +307,8 @@
())
(defknown bit-bash-copy
((simple-unboxed-array (*)) index
(simple-unboxed-array (*)) index index)
((simple-unboxed-array (*)) vm::offset
(simple-unboxed-array (*)) vm::offset vm::offset)
t
())
......
......@@ -240,22 +240,22 @@
(deftransform replace ((string1 string2 &key (start1 0) (start2 0)
end1 end2)
(simple-string simple-string &rest t))
'(locally (declare (optimize (safety 0)))
(bit-bash-copy string2
(the index
(+ (the index (* start2 vm:char-bits))
vector-data-bit-offset))
string1
(the index
(+ (the index (* start1 vm:char-bits))
vector-data-bit-offset))
(the index
(* (min (the index (- (or end1 (length string1))
start1))
(the index (- (or end2 (length string2))
start2)))
vm:char-bits)))
string1))
'(locally (declare (optimize (safety 0)))
(bit-bash-copy string2
(the vm::offset
(+ (the vm::offset (* start2 vm:char-bits))
vector-data-bit-offset))
string1
(the vm::offset
(+ (the vm::offset (* start1 vm:char-bits))
vector-data-bit-offset))
(the vm::offset
(* (min (the vm::offset (- (or end1 (length string1))
start1))
(the vm::offset (- (or end2 (length string2))
start2)))
vm:char-bits)))
string1))
;; The original version of this deftransform seemed to cause the
;; compiler to spend huge amounts of time deriving the type of the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment