fix actor compaction (#973)

This commit is contained in:
water111 2021-11-15 22:55:43 -05:00 committed by GitHub
parent 7292cb5765
commit 232e71ad5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 8 deletions

View file

@ -5,7 +5,7 @@
;; name in dgo: relocate
;; dgos: GAME, ENGINE
;; DECOMP BEGINS
;; note: the while loop in this is changed to include a cast to basic.
(defmethod relocate process ((obj process) (arg0 int))
(let ((v1-0 *kernel-context*))
@ -85,7 +85,7 @@
(&+! (-> obj ppointer) arg0)
)
)
(let ((s4-0 (&+ (-> obj heap-base) 4)))
(let ((s4-0 (the basic (&+ (-> obj heap-base) 4))))
(while (< (the-as int s4-0) (the-as int (-> obj heap-cur)))
(relocate s4-0 arg0)
(&+! s4-0 (logand -16 (+ (asize-of s4-0) 15)))

View file

@ -2120,7 +2120,6 @@
;; before calling play, the C Kernel would set this.
(define *kernel-boot-message* 'play)
(load-package "game" global)
(set! *compact-actors* #f)
(play #t #t)
)
)

View file

@ -550,15 +550,11 @@
(defmacro suspend ()
;; suspend the current process.
`(rlet ((pp :reg r13 :reset-here #t))
;; we pass the current thread to the kernel with the pp register.
;; so it should be backed up on the stack here.
(.push pp)
;; set to the current thread
(set! pp (-> (the process pp) top-thread))
;; call the suspend hook (put nothing as the argument)
((-> (the cpu-thread pp) suspend-hook) (the cpu-thread 0))
;; now we've been resumed, restore pp.
(.pop pp)
;; the kernel will set pp (possibly to a new value) on resume.
)
)