mirror of
https://github.com/open-goal/jak-project
synced 2026-05-25 15:25:31 -04:00
b1a76b2291
* fix a few bugs * fix local vars missing in top level * more small fixes * support missing inline array access case * one more fix
63 lines
1.8 KiB
Common Lisp
63 lines
1.8 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; this file is debug only
|
|
(when *debug-segment*
|
|
;; definition of type memory-usage-info
|
|
(deftype memory-usage-info (structure)
|
|
((name basic :offset-assert 0)
|
|
(count int32 :offset-assert 4)
|
|
(used int32 :offset-assert 8)
|
|
(total int32 :offset-assert 12)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x10
|
|
:flag-assert #x900000010
|
|
)
|
|
|
|
;; definition for method 3 of type memory-usage-info
|
|
(defmethod inspect memory-usage-info ((obj memory-usage-info))
|
|
(format #t "[~8x] ~A~%" obj 'memory-usage-info)
|
|
(format #t "~Tname: ~A~%" (-> obj name))
|
|
(format #t "~Tcount: ~D~%" (-> obj count))
|
|
(format #t "~Tused: ~D~%" (-> obj used))
|
|
(format #t "~Ttotal: ~D~%" (-> obj total))
|
|
obj
|
|
)
|
|
|
|
;; definition of type memory-usage-block
|
|
(deftype memory-usage-block (basic)
|
|
((work-bsp basic :offset-assert 4)
|
|
(length int32 :offset-assert 8)
|
|
(data memory-usage-info 109 :inline :offset-assert 16)
|
|
)
|
|
:method-count-assert 12
|
|
:size-assert #x6e0
|
|
:flag-assert #xc000006e0
|
|
(:methods
|
|
(reset! (_type_) _type_ 9)
|
|
(calculate-total (_type_) int 10)
|
|
(dummy-11 () none 11)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type memory-usage-block
|
|
(defmethod inspect memory-usage-block ((obj memory-usage-block))
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~Twork-bsp: ~A~%" (-> obj work-bsp))
|
|
(format #t "~Tlength: ~D~%" (-> obj length))
|
|
(format #t "~Tdata[109] @ #x~X~%" (-> obj data))
|
|
obj
|
|
)
|
|
|
|
;; definition for symbol *mem-usage*, type memory-usage-block
|
|
(define *mem-usage* (new 'debug 'memory-usage-block))
|
|
|
|
;; definition for symbol *dma-mem-usage*, type memory-usage-block
|
|
(define *dma-mem-usage* (new 'debug 'memory-usage-block))
|
|
|
|
;; definition for symbol *temp-mem-usage*, type symbol
|
|
(define *temp-mem-usage* #f)
|
|
|
|
)
|