Files
jak-project/test/goalc/source_templates/variables/stack-structure-align.gc
T
water111 814480f9e5 [Decompiler] Replace type hint system and improve variable types. (#320)
* 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
2021-03-13 16:10:39 -05:00

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)