mirror of
https://github.com/open-goal/jak-project
synced 2026-05-28 16:32:18 -04:00
814480f9e5
* get gkernel and gkernel-h at least somewhat working in the offline tests * strip comments from json * switch hints to casts. online tests passing, offline passing up to gkernel * variable retyping is added * fix up casts in lets * update
32 lines
709 B
Common Lisp
32 lines
709 B
Common Lisp
(deftype test-stack-type (basic)
|
|
((name string)
|
|
(count uint32)
|
|
(pad uint8 12))
|
|
(:methods
|
|
(new (symbol type int) _type_ 0)
|
|
)
|
|
)
|
|
|
|
(defmethod new test-stack-type ((allocation symbol) (type-to-make type) (init-count int))
|
|
(let ((obj (object-new allocation type-to-make)))
|
|
(set! (-> obj name) "this is my name")
|
|
(set! (-> obj count) init-count)
|
|
obj
|
|
)
|
|
)
|
|
|
|
|
|
(defun stack-test-2 ()
|
|
(let ((obj (new 'stack 'test-stack-type 12))
|
|
(obj2 (new 'stack 'test-stack-type 13)))
|
|
(if (and (= 4 (logand 15 (the uint obj)))
|
|
(= 4 (logand 15 (the uint obj2)))
|
|
(= 12 (-> obj count))
|
|
)
|
|
1234
|
|
0
|
|
)
|
|
)
|
|
)
|
|
|
|
(stack-test-2) |