Files
jak-project/test/goalc/source_templates/variables/stack-structure-align.gc
T
water111 d86964985a Improve Register Allocator (#154)
* before adding IRegSet stuff

* use bitsets for live analysis

* speed up

* add stack structures

* organize new better
2020-12-06 15:42:26 -05:00

32 lines
726 B
Common Lisp

(deftype test-stack-type (basic)
((name string)
(count uint32)
(pad uint8 12))
(:methods
(new ((allocation symbol) (type-to-make type) (init-count int)) _type_ 0)
)
)
(defmethod new test-stack-type ((allocation symbol) (type-to-make type) (init-count int))
(let ((obj (object-new)))
(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)