consistently serialize strings to MemorySegment instead of addresses
(Longs) and remove ad-hoc upcall-class Long to MemorySegment conversion
This commit is contained in:
parent
0bf267e44a
commit
4160b1cb68
2 changed files with 1 additions and 5 deletions
|
|
@ -499,10 +499,6 @@
|
||||||
inc)))
|
inc)))
|
||||||
acc))
|
acc))
|
||||||
[:invokeinterface IFn "invoke" (repeat (inc (count arg-types)) Object)]
|
[:invokeinterface IFn "invoke" (repeat (inc (count arg-types)) Object)]
|
||||||
(if (identical? ::mem/pointer (mem/primitive-type ret-type))
|
|
||||||
[[:checkcast Long]
|
|
||||||
[:invokevirtual Long "longValue" [:long]]
|
|
||||||
[:invokestatic MemorySegment "ofAddress" [:long MemorySegment] true]])
|
|
||||||
(to-prim-asm ret-type)
|
(to-prim-asm ret-type)
|
||||||
[(return-for-type ret-type :areturn)]]}]})
|
[(return-for-type ret-type :areturn)]]}]})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1247,7 +1247,7 @@
|
||||||
(defmethod serialize* ::c-string
|
(defmethod serialize* ::c-string
|
||||||
[obj _type ^Arena session]
|
[obj _type ^Arena session]
|
||||||
(if obj
|
(if obj
|
||||||
(address-of (.allocateFrom session ^String obj))
|
(.allocateFrom session ^String obj)
|
||||||
(MemorySegment/NULL)))
|
(MemorySegment/NULL)))
|
||||||
|
|
||||||
(defmethod deserialize* ::c-string
|
(defmethod deserialize* ::c-string
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue