deftype and defmethod syntax major changes (#3094)

Major change to how `deftype` shows up in our code:
- the decompiler will no longer emit the `offset-assert`,
`method-count-assert`, `size-assert` and `flag-assert` parameters. There
are extremely few cases where having this in the decompiled code is
helpful, as the types there come from `all-types` which already has
those parameters. This also doesn't break type consistency because:
  - the asserts aren't compared.
- the first step of the test uses `all-types`, which has the asserts,
which will throw an error if they're bad.
- the decompiler won't emit the `heap-base` parameter unless necessary
now.
- the decompiler will try its hardest to turn a fixed-offset field into
an `overlay-at` field. It falls back to the old offset if all else
fails.
- `overlay-at` now supports field "dereferencing" to specify the offset
that's within a field that's a structure, e.g.:
```lisp
(deftype foobar (structure)
  ((vec    vector  :inline)
   (flags  int32   :overlay-at (-> vec w))
   )
  )
```
in this structure, the offset of `flags` will be 12 because that is the
final offset of `vec`'s `w` field within this structure.
- **removed ID from all method declarations.** IDs are only ever
automatically assigned now. Fixes #3068.
- added an `:overlay` parameter to method declarations, in order to
declare a new method that goes on top of a previously-defined method.
Syntax is `:overlay <method-name>`. Please do not ever use this.
- added `state-methods` list parameter. This lets you quickly specify a
list of states to be put in the method table. Same syntax as the
`states` list parameter. The decompiler will try to put as many states
in this as it can without messing with the method ID order.

Also changes `defmethod` to make the first type definition (before the
arguments) optional. The type can now be inferred from the first
argument. Fixes #3093.

---------

Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
This commit is contained in:
ManDude
2023-10-30 03:20:02 +00:00
committed by GitHub
parent 09536c68ac
commit cd68cb671e
2079 changed files with 94384 additions and 117066 deletions
+79 -79
View File
@@ -26,14 +26,14 @@
)
;; definition for method 2 of type editable-region
(defmethod print editable-region ((this editable-region))
(defmethod print ((this editable-region))
(format #t "#<~A region-~D ~A ~A @ #x~X>" (-> this type) (-> this id) (-> this level) (-> this tree) this)
this
)
;; definition for method 10 of type editable-region
;; INFO: Used lq/sq
(defmethod editable-region-method-10 editable-region ((this editable-region) (arg0 int))
(defmethod editable-region-method-10 ((this editable-region) (arg0 int))
(local-vars (sv-16 string) (sv-32 string))
(when (nonzero? (-> this id))
(let ((s5-0 (clear *temp-string*)))
@@ -111,7 +111,7 @@
)
;; definition for method 9 of type editable-region
(defmethod editable-region-method-9 editable-region ((this editable-region) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-region-method-9 ((this editable-region) (arg0 editable-array) (arg1 int) (arg2 int))
(local-vars (v0-0 symbol) (v1-5 object) (v1-28 object))
(set! v0-0
(when (-> this changed)
@@ -302,7 +302,7 @@
;; definition for method 11 of type editable-region
;; WARN: Return type mismatch int vs none.
(defmethod editable-region-method-11 editable-region ((this editable-region) (arg0 vector) (arg1 int))
(defmethod editable-region-method-11 ((this editable-region) (arg0 vector) (arg1 int))
(local-vars (sv-32 vector2h))
(set! sv-32 (new 'stack 'vector2h))
(add-debug-x #t (bucket-id debug-no-zbuf1) arg0 (new 'static 'rgba :r #xff :g #xff :a #x80))
@@ -358,7 +358,7 @@
;; definition for method 12 of type editable-region
;; WARN: Return type mismatch int vs editable-filter.
(defmethod editable-region-method-12 editable-region ((this editable-region))
(defmethod editable-region-method-12 ((this editable-region))
(let* ((s5-0 0)
(s4-0 (lambda ((arg0 string)) (let ((gp-0 0))
(when (not (type? arg0 string))
@@ -425,13 +425,13 @@
)
;; definition for method 23 of type editable
(defmethod editable-method-23 editable ((this editable))
(defmethod editable-method-23 ((this editable))
#t
)
;; definition for method 28 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-28 editable ((this editable) (arg0 editable-filter))
(defmethod editable-method-28 ((this editable) (arg0 editable-filter))
(let* ((s5-0 (-> this owner))
(a0-1 (car s5-0))
)
@@ -447,7 +447,7 @@
;; definition for method 29 of type editable
;; WARN: Return type mismatch int vs symbol.
(defmethod editable-method-29 editable ((this editable) (arg0 editable-filter))
(defmethod editable-method-29 ((this editable) (arg0 editable-filter))
(let* ((s5-0 (-> this owner))
(a0-1 (car s5-0))
)
@@ -462,7 +462,7 @@
;; definition for method 21 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-21 editable ((this editable) (arg0 editable-region))
(defmethod editable-method-21 ((this editable) (arg0 editable-region))
(when (not (and (-> this region) (-> this region locked)))
(if arg0
(set! (-> arg0 changed) #t)
@@ -479,7 +479,7 @@
;; definition for method 9 of type editable
;; WARN: Return type mismatch int vs rgba.
(defmethod get-color editable ((this editable) (arg0 int))
(defmethod get-color ((this editable) (arg0 int))
"Returns the [[rgba]] that corresponds to the type of [[editable]] TODO - document the colors"
(the-as rgba (cond
((and (logtest? (-> this flags) (editable-flag selected))
@@ -511,7 +511,7 @@
;; definition for method 10 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-10 editable ((this editable))
(defmethod editable-method-10 ((this editable))
(when (logtest? (-> this flags) (editable-flag selected))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(when (editable-method-11 this s5-0)
@@ -527,7 +527,7 @@
;; definition for method 12 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod select-editable! editable ((this editable) (arg0 symbol))
(defmethod select-editable! ((this editable) (arg0 symbol))
(case arg0
(('toggle)
(logxor! (-> this flags) (editable-flag selected))
@@ -544,14 +544,14 @@
)
;; definition for method 13 of type editable
(defmethod edit-get-distance editable ((this editable) (arg0 vector))
(defmethod edit-get-distance ((this editable) (arg0 vector))
"Returns the distance from the camera to the [[editable]], or -1.0"
-1.0
)
;; definition for method 20 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-20 editable ((this editable) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
(defmethod editable-method-20 ((this editable) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
(local-vars (sv-48 vector) (sv-52 vector))
(set! sv-48 (new 'stack-no-clear 'vector))
(set! sv-52 (new 'stack-no-clear 'vector))
@@ -571,7 +571,7 @@
;; definition for method 11 of type editable
;; INFO: Used lq/sq
(defmethod editable-method-11 editable ((this editable) (arg0 vector))
(defmethod editable-method-11 ((this editable) (arg0 vector))
(with-pp
(let ((s5-0 (new 'stack 'collide-query)))
(set! (-> s5-0 start-pos quad) (-> (edit-get-trans this) quad))
@@ -596,67 +596,67 @@
;; definition for method 24 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-24 editable ((this editable))
(defmethod editable-method-24 ((this editable))
0
(none)
)
;; definition for method 17 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-17 editable ((this editable) (arg0 vector))
(defmethod editable-method-17 ((this editable) (arg0 vector))
0
(none)
)
;; definition for method 22 of type editable
(defmethod editable-method-22 editable ((this editable) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable) (arg0 editable-array) (arg1 int) (arg2 int))
#t
)
;; definition for method 15 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-15 editable ((this editable) (arg0 vector) (arg1 int))
(defmethod editable-method-15 ((this editable) (arg0 vector) (arg1 int))
0
(none)
)
;; definition for method 16 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod edit-coord! editable ((this editable) (arg0 vector) (arg1 editable-flag))
(defmethod edit-coord! ((this editable) (arg0 vector) (arg1 editable-flag))
0
(none)
)
;; definition for method 18 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-18 editable ((this editable) (arg0 vector) (arg1 matrix))
(defmethod editable-method-18 ((this editable) (arg0 vector) (arg1 matrix))
0
(none)
)
;; definition for method 14 of type editable
(defmethod edit-get-trans editable ((this editable))
(defmethod edit-get-trans ((this editable))
"Returns the `trans` [[vector]] or [[*null-vector*]]"
*null-vector*
)
;; definition for method 19 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-19 editable ((this editable) (arg0 vector))
(defmethod editable-method-19 ((this editable) (arg0 vector))
0
(none)
)
;; definition for method 26 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-26 editable ((this editable) (arg0 editable) (arg1 editable-array))
(defmethod editable-method-26 ((this editable) (arg0 editable) (arg1 editable-array))
0
(none)
)
;; definition for method 25 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-25 editable ((this editable) (arg0 editable-array))
(defmethod editable-method-25 ((this editable) (arg0 editable-array))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -677,7 +677,7 @@
)
;; definition for method 27 of type editable
(defmethod editable-method-27 editable ((this editable) (arg0 editable-array))
(defmethod editable-method-27 ((this editable) (arg0 editable-array))
(local-vars (s4-0 editable))
(let ((v1-0 0))
(while (< v1-0 (-> arg0 selection length))
@@ -719,7 +719,7 @@
)
;; definition for method 2 of type editable-point
(defmethod print editable-point ((this editable-point))
(defmethod print ((this editable-point))
(format
#t
"#<~A~S~m ~m ~m :r ~m"
@@ -740,7 +740,7 @@
;; definition for method 28 of type editable-point
;; WARN: Return type mismatch int vs none.
;; WARN: Function (method 28 editable-point) has a return type of none, but the expression builder found a return statement.
(defmethod editable-method-28 editable-point ((this editable-point) (arg0 editable-filter))
(defmethod editable-method-28 ((this editable-point) (arg0 editable-filter))
(if (logtest? arg0 (editable-filter water-command))
(return #f)
)
@@ -783,7 +783,7 @@
;; definition for method 15 of type editable-point
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-15 editable-point ((this editable-point) (arg0 vector) (arg1 int))
(defmethod editable-method-15 ((this editable-point) (arg0 vector) (arg1 int))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -798,7 +798,7 @@
;; definition for method 16 of type editable-point
;; WARN: Return type mismatch int vs none.
(defmethod edit-coord! editable-point ((this editable-point) (arg0 vector) (arg1 editable-flag))
(defmethod edit-coord! ((this editable-point) (arg0 vector) (arg1 editable-flag))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -820,14 +820,14 @@
)
;; definition for method 14 of type editable-point
(defmethod edit-get-trans editable-point ((this editable-point))
(defmethod edit-get-trans ((this editable-point))
"Returns the `trans` [[vector]] or [[*null-vector*]]"
(-> this trans)
)
;; definition for method 18 of type editable-point
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-18 editable-point ((this editable-point) (arg0 vector) (arg1 matrix))
(defmethod editable-method-18 ((this editable-point) (arg0 vector) (arg1 matrix))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -843,7 +843,7 @@
)
;; definition for method 10 of type editable-point
(defmethod editable-method-10 editable-point ((this editable-point))
(defmethod editable-method-10 ((this editable-point))
(let* ((s5-0 vector-vector-distance)
(a0-1 (math-camera-pos))
(a1-0 (-> this trans))
@@ -881,7 +881,7 @@
;; definition for method 13 of type editable-point
;; INFO: Used lq/sq
(defmethod edit-get-distance editable-point ((this editable-point) (arg0 vector))
(defmethod edit-get-distance ((this editable-point) (arg0 vector))
"Returns the distance from the camera to the [[editable]], or -1.0"
(let ((a0-1 (new 'stack-no-clear 'sphere))
(s5-0 (new 'stack-no-clear 'vector))
@@ -902,7 +902,7 @@
;; definition for method 19 of type editable-point
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-19 editable-point ((this editable-point) (arg0 vector))
(defmethod editable-method-19 ((this editable-point) (arg0 vector))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -918,7 +918,7 @@
)
;; definition for method 22 of type editable-point
(defmethod editable-method-22 editable-point ((this editable-point) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-point) (arg0 editable-array) (arg1 int) (arg2 int))
(case arg1
((2)
(let ((s3-0 (clear *temp-string*)))
@@ -946,7 +946,7 @@
;; definition for method 17 of type editable-sphere
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-17 editable-sphere ((this editable-sphere) (arg0 vector))
(defmethod editable-method-17 ((this editable-sphere) (arg0 vector))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -966,7 +966,7 @@
)
;; definition for method 22 of type editable-sphere
(defmethod editable-method-22 editable-sphere ((this editable-sphere) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-sphere) (arg0 editable-array) (arg1 int) (arg2 int))
(let ((gp-0 (clear *temp-string*)))
(format
gp-0
@@ -982,7 +982,7 @@
)
;; definition for method 22 of type editable-sample
(defmethod editable-method-22 editable-sample ((this editable-sample) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-sample) (arg0 editable-array) (arg1 int) (arg2 int))
(let ((s5-0 (clear *temp-string*)))
(format
s5-0
@@ -1002,7 +1002,7 @@
)
;; definition for method 2 of type editable-light
(defmethod print editable-light ((this editable-light))
(defmethod print ((this editable-light))
(format
#t
"#<~A~S ~S ~m ~m ~m"
@@ -1022,7 +1022,7 @@
;; definition for method 23 of type editable-light
;; INFO: Used lq/sq
(defmethod editable-method-23 editable-light ((this editable-light))
(defmethod editable-method-23 ((this editable-light))
(let ((v1-0 *light-hash*))
(let* ((a2-0 (-> v1-0 num-lights))
(a1-1 (-> v1-0 light-sphere-array a2-0))
@@ -1064,7 +1064,7 @@
;; definition for method 17 of type editable-light
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-17 editable-light ((this editable-light) (arg0 vector))
(defmethod editable-method-17 ((this editable-light) (arg0 vector))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -1086,7 +1086,7 @@
;; definition for method 15 of type editable-light
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-15 editable-light ((this editable-light) (arg0 vector) (arg1 int))
(defmethod editable-method-15 ((this editable-light) (arg0 vector) (arg1 int))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -1103,7 +1103,7 @@
;; definition for method 25 of type editable-light
;; WARN: Return type mismatch int vs none.
;; WARN: Function (method 25 editable-light) has a return type of none, but the expression builder found a return statement.
(defmethod editable-method-25 editable-light ((this editable-light) (arg0 editable-array))
(defmethod editable-method-25 ((this editable-light) (arg0 editable-array))
(call-parent-method this arg0)
(when (nonzero? (-> this id))
(let ((s5-1 (clear *temp-string*)))
@@ -1121,7 +1121,7 @@
)
;; definition for method 22 of type editable-light
(defmethod editable-method-22 editable-light ((this editable-light) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-light) (arg0 editable-array) (arg1 int) (arg2 int))
(cond
((logtest? (-> this flags) (editable-flag changed))
(let ((s5-0 (clear *temp-string*)))
@@ -1195,7 +1195,7 @@
)
;; definition for method 10 of type editable-light
(defmethod editable-method-10 editable-light ((this editable-light))
(defmethod editable-method-10 ((this editable-light))
(if (!= (-> this direction w) 0.0)
(add-debug-vector
#t
@@ -1221,7 +1221,7 @@
;; definition for method 14 of type editable-face
;; INFO: Used lq/sq
(defmethod edit-get-trans editable-face ((this editable-face))
(defmethod edit-get-trans ((this editable-face))
"Returns the `trans` [[vector]] or [[*null-vector*]]"
"The center of the obj."
(cond
@@ -1249,7 +1249,7 @@
)
;; definition for method 22 of type editable-face
(defmethod editable-method-22 editable-face ((this editable-face) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-face) (arg0 editable-array) (arg1 int) (arg2 int))
(let ((s4-0 (clear *temp-string*)))
(format s4-0 "insert into region_face set kind='face',region_id=~D" (-> this region id))
(if (logtest? (-> this flags) (editable-flag orient))
@@ -1269,7 +1269,7 @@
)
;; definition for method 25 of type editable-face
(defmethod editable-method-25 editable-face ((this editable-face) (arg0 editable-array))
(defmethod editable-method-25 ((this editable-face) (arg0 editable-array))
(dotimes (s4-0 (-> this length))
(let ((s3-0 (-> this vertex s4-0)))
(set! (-> s3-0 owner) (delete! this (-> s3-0 owner)))
@@ -1280,7 +1280,7 @@
)
;; definition for method 26 of type editable-face
(defmethod editable-method-26 editable-face ((this editable-face) (arg0 editable) (arg1 editable-array))
(defmethod editable-method-26 ((this editable-face) (arg0 editable) (arg1 editable-array))
(-> this length)
(countdown (v1-1 (-> this length))
(when (= (-> this vertex v1-1) arg0)
@@ -1304,7 +1304,7 @@
;; definition for method 27 of type editable-face
;; WARN: Return type mismatch editable-face vs editable.
(defmethod editable-method-27 editable-face ((this editable-face) (arg0 editable-array))
(defmethod editable-method-27 ((this editable-face) (arg0 editable-array))
(let ((gp-1 (the-as editable-face (call-parent-method this arg0))))
(dotimes (s4-0 (-> gp-1 length))
(set! (-> gp-1 vertex s4-0) (the-as editable-point (editable-method-27 (-> gp-1 vertex s4-0) arg0)))
@@ -1316,7 +1316,7 @@
;; definition for method 24 of type editable-face
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-24 editable-face ((this editable-face))
(defmethod editable-method-24 ((this editable-face))
(logxor! (-> this flags) (editable-flag orient))
(editable-face-method-31 this (-> this normal))
(logior! (-> this flags) (editable-flag changed))
@@ -1327,7 +1327,7 @@
;; definition for method 30 of type editable-face
;; INFO: Used lq/sq
(defmethod editable-face-method-30 editable-face ((this editable-face) (arg0 (inline-array vector)))
(defmethod editable-face-method-30 ((this editable-face) (arg0 (inline-array vector)))
(let ((v1-0 (-> this length)))
(cond
((or (zero? v1-0) (= v1-0 1))
@@ -1358,7 +1358,7 @@
;; definition for method 31 of type editable-face
;; INFO: Used lq/sq
(defmethod editable-face-method-31 editable-face ((this editable-face) (arg0 vector))
(defmethod editable-face-method-31 ((this editable-face) (arg0 vector))
(let ((s4-0 (new 'stack-no-clear 'matrix)))
(dotimes (v1-0 6)
(set! (-> s4-0 quad v1-0) (the-as uint128 0))
@@ -1375,7 +1375,7 @@
;; definition for method 13 of type editable-face
;; INFO: Used lq/sq
(defmethod edit-get-distance editable-face ((this editable-face) (arg0 vector))
(defmethod edit-get-distance ((this editable-face) (arg0 vector))
"Returns the distance from the camera to the [[editable]], or -1.0"
(let ((gp-0 (new 'stack-no-clear 'vector))
(s5-0 (editable-face-method-31 this (new 'stack-no-clear 'vector)))
@@ -1468,7 +1468,7 @@
;; WARN: Stack slot offset 400 signed mismatch
;; WARN: Stack slot offset 292 signed mismatch
;; WARN: Return type mismatch int vs symbol.
(defmethod editable-method-29 editable-face ((this editable-face) (arg0 editable-filter))
(defmethod editable-method-29 ((this editable-face) (arg0 editable-filter))
(local-vars
(sv-208 (inline-array vector))
(sv-216 int)
@@ -1629,7 +1629,7 @@
;; definition for method 10 of type editable-face
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-10 editable-face ((this editable-face))
(defmethod editable-method-10 ((this editable-face))
(local-vars (sv-112 int))
(let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 6)))
(dotimes (v1-0 6)
@@ -1692,7 +1692,7 @@
)
;; definition for method 14 of type editable-plane
(defmethod edit-get-trans editable-plane ((this editable-plane))
(defmethod edit-get-trans ((this editable-plane))
"Returns the `trans` [[vector]] or [[*null-vector*]]"
(if (>= (-> this length) 1)
(edit-get-trans (-> this vertex 0))
@@ -1701,7 +1701,7 @@
)
;; definition for method 22 of type editable-plane
(defmethod editable-method-22 editable-plane ((this editable-plane) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-plane) (arg0 editable-array) (arg1 int) (arg2 int))
(let ((s4-0 (clear *temp-string*)))
(format
s4-0
@@ -1723,7 +1723,7 @@
)
;; definition for method 25 of type editable-plane
(defmethod editable-method-25 editable-plane ((this editable-plane) (arg0 editable-array))
(defmethod editable-method-25 ((this editable-plane) (arg0 editable-array))
(dotimes (s4-0 (-> this length))
(let ((s3-0 (-> this vertex s4-0)))
(set! (-> s3-0 owner) (delete! this (-> s3-0 owner)))
@@ -1734,7 +1734,7 @@
)
;; definition for method 26 of type editable-plane
(defmethod editable-method-26 editable-plane ((this editable-plane) (arg0 editable) (arg1 editable-array))
(defmethod editable-method-26 ((this editable-plane) (arg0 editable) (arg1 editable-array))
(editable-array-method-15 arg1 this)
((method-of-type editable editable-method-26) this arg0 arg1)
(none)
@@ -1742,7 +1742,7 @@
;; definition for method 27 of type editable-plane
;; WARN: Return type mismatch editable-plane vs editable.
(defmethod editable-method-27 editable-plane ((this editable-plane) (arg0 editable-array))
(defmethod editable-method-27 ((this editable-plane) (arg0 editable-array))
(let ((gp-1 (the-as editable-plane (call-parent-method this arg0))))
(dotimes (s4-0 (-> gp-1 length))
(set! (-> gp-1 vertex s4-0) (the-as editable-point (editable-method-27 (-> gp-1 vertex s4-0) arg0)))
@@ -1754,7 +1754,7 @@
;; definition for method 24 of type editable-plane
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-24 editable-plane ((this editable-plane))
(defmethod editable-method-24 ((this editable-plane))
(let ((s5-1
(vector-!
(new 'stack-no-clear 'vector)
@@ -1776,7 +1776,7 @@
)
;; definition for method 30 of type editable-plane
(defmethod editable-plane-method-30 editable-plane ((this editable-plane) (arg0 (inline-array vector)))
(defmethod editable-plane-method-30 ((this editable-plane) (arg0 (inline-array vector)))
(case (-> this length)
((2)
(let* ((v1-2 (editable-plane-method-31 this (new 'stack-no-clear 'vector)))
@@ -1812,7 +1812,7 @@
)
;; definition for method 31 of type editable-plane
(defmethod editable-plane-method-31 editable-plane ((this editable-plane) (arg0 vector))
(defmethod editable-plane-method-31 ((this editable-plane) (arg0 vector))
(case (-> this length)
((2)
(let ((s3-0 (-> this vertex 0))
@@ -1828,7 +1828,7 @@
;; definition for method 13 of type editable-plane
;; INFO: Used lq/sq
(defmethod edit-get-distance editable-plane ((this editable-plane) (arg0 vector))
(defmethod edit-get-distance ((this editable-plane) (arg0 vector))
"Returns the distance from the camera to the [[editable]], or -1.0"
(let ((gp-0 (new 'stack-no-clear 'vector))
(s5-0 (editable-plane-method-31 this (new 'stack-no-clear 'vector)))
@@ -1866,7 +1866,7 @@
;; definition for method 10 of type editable-plane
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-10 editable-plane ((this editable-plane))
(defmethod editable-method-10 ((this editable-plane))
(let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 4)))
(dotimes (v1-0 4)
(set! (-> gp-0 v1-0 quad) (the-as uint128 0))
@@ -1908,7 +1908,7 @@
;; definition for method 17 of type editable-plane
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-17 editable-plane ((this editable-plane) (arg0 vector))
(defmethod editable-method-17 ((this editable-plane) (arg0 vector))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -1929,7 +1929,7 @@
;; definition for method 7 of type editable-array
;; WARN: Return type mismatch (array editable) vs editable-array.
(defmethod relocate editable-array ((this editable-array) (arg0 int))
(defmethod relocate ((this editable-array) (arg0 int))
(the-as editable-array (when (nonzero? (-> this selection))
(let ((v0-0 (&+ (-> this selection) arg0)))
(set! (-> this selection) v0-0)
@@ -1940,18 +1940,18 @@
)
;; definition for method 4 of type editable-array
(defmethod length editable-array ((this editable-array))
(defmethod length ((this editable-array))
(-> this length)
)
;; definition for method 5 of type editable-array
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of editable-array ((this editable-array))
(defmethod asize-of ((this editable-array))
(the-as int (+ (-> this type size) (* (-> this allocated-length) 4)))
)
;; definition for method 11 of type editable-array
(defmethod editable-array-method-11 editable-array ((this editable-array))
(defmethod editable-array-method-11 ((this editable-array))
(dotimes (v1-0 (-> this length))
(if (not (-> this data v1-0))
(return v1-0)
@@ -1965,7 +1965,7 @@
)
;; definition for method 10 of type editable-array
(defmethod editable-array-method-10 editable-array ((this editable-array) (arg0 vector) (arg1 int))
(defmethod editable-array-method-10 ((this editable-array) (arg0 vector) (arg1 int))
(when (or (!= (-> arg0 x) (-> *editable-work* last-x)) (!= (-> arg0 y) (-> *editable-work* last-y)))
(set! (-> *editable-work* last-found) 0)
(set! (-> *editable-work* last-x) (-> arg0 x))
@@ -2037,7 +2037,7 @@
)
;; definition for method 14 of type editable-array
(defmethod editable-array-method-14 editable-array ((this editable-array) (arg0 (function editable editable-region symbol)) (arg1 editable-region))
(defmethod editable-array-method-14 ((this editable-array) (arg0 (function editable editable-region symbol)) (arg1 editable-region))
(let ((gp-0 (-> this selection)))
(set! (-> gp-0 length) 0)
(let* ((s2-0 (-> this length))
@@ -2061,7 +2061,7 @@
;; definition for method 15 of type editable-array
;; WARN: Return type mismatch int vs none.
(defmethod editable-array-method-15 editable-array ((this editable-array) (arg0 editable))
(defmethod editable-array-method-15 ((this editable-array) (arg0 editable))
(let ((gp-0 (-> arg0 region)))
(when gp-0
(editable-method-25 arg0 this)
@@ -2124,7 +2124,7 @@
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Return type mismatch symbol vs none.
;; WARN: Function (method 12 editable-array) has a return type of none, but the expression builder found a return statement.
(defmethod editable-array-method-12 editable-array ((this editable-array) (arg0 editable-array))
(defmethod editable-array-method-12 ((this editable-array) (arg0 editable-array))
(local-vars
(sv-16 sql-result)
(sv-20 sql-result)
@@ -2500,7 +2500,7 @@
;; definition for method 13 of type editable-array
;; WARN: Return type mismatch int vs none.
(defmethod editable-array-method-13 editable-array ((this editable-array) (arg0 editable-command) (arg1 editable-command) (arg2 string))
(defmethod editable-array-method-13 ((this editable-array) (arg0 editable-command) (arg1 editable-command) (arg2 string))
(set! (-> this target) #f)
(set! (-> this target-mode) arg0)
(set! (-> this target-command) arg1)
@@ -2512,7 +2512,7 @@
;; definition for method 16 of type editable-array
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod editable-array-method-16 editable-array ((this editable-array))
(defmethod editable-array-method-16 ((this editable-array))
(cond
((-> this edit-plane)
(editable-plane-method-31 (-> this edit-plane) (-> this edit-plane-normal))
@@ -2531,7 +2531,7 @@
;; definition for method 17 of type editable-array
;; INFO: Used lq/sq
(defmethod editable-array-method-17 editable-array ((this editable-array) (arg0 vector) (arg1 vector))
(defmethod editable-array-method-17 ((this editable-array) (arg0 vector) (arg1 vector))
(cond
((and (cpad-hold? 0 up) *target*)
(set! (-> arg0 quad) (-> (get-trans *target* 0) quad))