mirror of
https://github.com/open-goal/jak-project
synced 2026-07-01 20:20:35 -04:00
aa58d146c2
* clean up allocator interface to be simpler * working on functions without spills * working for all * fix missing includes for windows * more windows includes * initialize regs to zero so printing value unintiailized by game code is repeatable
17 lines
479 B
Common Lisp
17 lines
479 B
Common Lisp
(deftype type-with-weird-relocate (basic)
|
|
((foo int))
|
|
(:methods
|
|
(relocate (_type_ kheap (pointer uint8)) none :replace 7)
|
|
)
|
|
)
|
|
|
|
(defmethod relocate type-with-weird-relocate ((obj type-with-weird-relocate) (dest-heap kheap) (name (pointer uint8)))
|
|
(format #t "relocate! foo: ~D heap: ~D name: ~D~%" (-> obj foo) dest-heap name)
|
|
(none)
|
|
)
|
|
|
|
(let ((obj (new 'static 'type-with-weird-relocate :foo 123)))
|
|
(relocate obj (the kheap 1) (the (pointer uint8) 2))
|
|
0
|
|
)
|