Files
jak-project/test/goalc/source_templates/with_game/test-integer-boxed-array.gc
T
water111 425cc6794c [Compiler] Bug fixes (#230)
* fix method name and use-after-free during compile error

* doc fix
2021-02-03 11:07:47 -05:00

13 lines
338 B
Common Lisp

(let ((arr (new 'global 'boxed-array int16 12)))
(dotimes (i 12)
(set! (-> arr i) (* i 2))
)
(dotimes (i 12)
(format #t "~D ~D " i (-> arr i))
)
(format #t "~D ~D ~D ~A~%" (length arr) (asize-of arr) (&- (&-> arr 4) (&-> arr 1)) (-> arr type))
)
;; asize should be...
;; 16 + 12 * 2 = 40
;; ptr diff is 3 * 2 = 6