mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
[decompiler] Better support for non-virtual methods (#543)
* fix up nonvirtual method calls and stack new method calls * look at final in compiler too
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
((allocation symbol) (type-to-make type) (arg0 int) (arg1 string))
|
||||
(cond
|
||||
(arg1
|
||||
(let* ((s2-1 (max ((method-of-type string length) arg1) arg0))
|
||||
(let* ((s2-1 (max (length arg1) arg0))
|
||||
(a0-4
|
||||
(object-new
|
||||
allocation
|
||||
@@ -277,11 +277,7 @@
|
||||
|
||||
;; definition for function string<?
|
||||
(defun string<? ((a string) (b string))
|
||||
(let
|
||||
((len
|
||||
(min ((method-of-type string length) a) ((method-of-type string length) b))
|
||||
)
|
||||
)
|
||||
(let ((len (min (length a) (length b))))
|
||||
(dotimes (i len)
|
||||
(cond
|
||||
((< (-> a data i) (-> b data i))
|
||||
@@ -298,11 +294,7 @@
|
||||
|
||||
;; definition for function string>?
|
||||
(defun string>? ((a string) (b string))
|
||||
(let
|
||||
((len
|
||||
(min ((method-of-type string length) a) ((method-of-type string length) b))
|
||||
)
|
||||
)
|
||||
(let ((len (min (length a) (length b))))
|
||||
(dotimes (i len)
|
||||
(cond
|
||||
((< (-> a data i) (-> b data i))
|
||||
@@ -319,11 +311,7 @@
|
||||
|
||||
;; definition for function string<=?
|
||||
(defun string<=? ((a string) (b string))
|
||||
(let
|
||||
((len
|
||||
(min ((method-of-type string length) a) ((method-of-type string length) b))
|
||||
)
|
||||
)
|
||||
(let ((len (min (length a) (length b))))
|
||||
(dotimes (i len)
|
||||
(cond
|
||||
((< (-> a data i) (-> b data i))
|
||||
@@ -340,11 +328,7 @@
|
||||
|
||||
;; definition for function string>=?
|
||||
(defun string>=? ((a string) (b string))
|
||||
(let
|
||||
((len
|
||||
(min ((method-of-type string length) a) ((method-of-type string length) b))
|
||||
)
|
||||
)
|
||||
(let ((len (min (length a) (length b))))
|
||||
(dotimes (i len)
|
||||
(cond
|
||||
((< (-> a data i) (-> b data i))
|
||||
@@ -437,8 +421,8 @@
|
||||
|
||||
;; definition for function string-strip-trailing-whitespace!
|
||||
(defun string-strip-trailing-whitespace! ((str string))
|
||||
(when (nonzero? ((method-of-type string length) str))
|
||||
(let ((ptr (&+ (-> str data) (+ ((method-of-type string length) str) -1))))
|
||||
(when (nonzero? (length str))
|
||||
(let ((ptr (&+ (-> str data) (+ (length str) -1))))
|
||||
(while
|
||||
(and
|
||||
(>= (the-as int ptr) (the-as int (-> str data)))
|
||||
|
||||
Reference in New Issue
Block a user