[decomp] handle handle->process inside an and (#851)

* fix the loader example

* improve compiler error message

* fix missing cast issue
This commit is contained in:
water111
2021-09-21 00:12:37 -04:00
committed by GitHub
parent df92a55749
commit 5683f04046
8 changed files with 189 additions and 98 deletions
+2 -11
View File
@@ -397,7 +397,6 @@
;; definition for method 10 of type external-art-buffer
;; WARN: Found some very strange gotos. Check result carefully, this is not well tested.
(defmethod update external-art-buffer ((obj external-art-buffer))
(local-vars (v1-54 handle))
(when
(or
(not (name= (-> obj pending-load-file) (-> obj load-file)))
@@ -552,16 +551,8 @@
)
)
(('locked)
(when (and (not (-> obj locked?)) (begin
(set! v1-54 (-> obj load-file-owner))
(nonzero? (l32-false-check v1-54))
)
(let ((a0-46 (-> v1-54 process 0)))
(if (= (-> v1-54 pid) (-> a0-46 pid))
a0-46
)
)
)
(when
(and (not (-> obj locked?)) (handle->process (-> obj load-file-owner)))
(link-file obj (-> obj art-group))
(set! (-> obj other locked?) #t)
(set! (-> obj status) 'active)
-2
View File
@@ -171,8 +171,6 @@ const std::unordered_set<std::string> g_functions_to_skip_compiling = {
// camera
"slave-set-rotation!", "v-slrp2!", "v-slrp3!", // vector-dot involving the stack
// loader - decompiler bug with detecting handle macros
"(method 10 external-art-buffer)",
// function returning float with a weird cast.
"debug-menu-item-var-make-float"};