jak-project/test/goalc/source_templates/with_game
ManDude cd68cb671e
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>
2023-10-30 03:20:02 +00:00
..
defun-return-constant.static.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
defun-return-symbol.static.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
inlined-packed-basics.gc deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
sqrtf.gc add sqrt (#270) 2021-02-17 00:57:21 -05:00
test-access-bitfield128.gc [compiler] support 128-bit bitfields (#500) 2021-05-18 21:25:29 -04:00
test-access-inline-array.gc [Compiler] Bug fixes (#230) 2021-02-03 11:07:47 -05:00
test-addr-of-var.gc [compiler/decompiler] Take the address of a variable (#554) 2021-06-04 13:43:19 -04:00
test-addr-of.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-append.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-approx-pi-stack.gc support inline arrays on stack (#726) 2021-07-26 21:39:05 -04:00
test-approx-pi.gc Add support for stack integers (#135) 2020-11-22 12:22:19 -05:00
test-array-ref-static.gc [decomp] Clean up - part 2 (#687) 2021-07-11 16:35:25 -04:00
test-assoc-1.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-assoc-2.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-assoce-1.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-assoce-2.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-basic-type-check.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-basic-vector-math.gc add an optional, less-accurate-but-faster sprite render and fix silly math bug (#1102) 2022-01-21 21:11:57 -05:00
test-behaviors.gc Support Behaviors (#678) 2021-07-04 16:54:07 -04:00
test-bfloat.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-binteger-print.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-bitfield-access.gc [Compiler] Bitfield Types (#146) 2020-11-29 18:01:30 -05:00
test-bitfield-and-enum-types.gc support inline arrays on stack (#726) 2021-07-26 21:39:05 -04:00
test-bitfield-tricky-access.gc [Compiler] Bitfield Types (#146) 2020-11-29 18:01:30 -05:00
test-boxed-array-index.gc better array indexing (#176) 2020-12-31 22:15:17 -05:00
test-build-all-code.gc make linux tests pass again (#1371) 2022-05-21 20:55:29 -04:00
test-build-game.gc remove some duplicate build files (#1357) 2022-05-19 22:08:01 +01:00
test-condition-boolean.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-delete-car.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-delete-list.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-dynamic-type.gc [Decompiler] Clean up the output (#245) 2021-02-09 20:59:14 -05:00
test-false-in-static-pointer.gc fix pointer set to #f in static (#864) 2021-09-28 22:20:45 -04:00
test-fancy-static-fields.gc [decomp] loader prelim work + some cleanup (#697) 2021-07-23 18:30:49 -04:00
test-find-parent-method.gc [Decomp] Decompile gcommon, gstring-h, and gkernel-h (#249) 2021-02-11 09:49:15 -05:00
test-format.gc jak2: Create goal_src skeleton (#1576) 2022-06-29 22:20:09 -04:00
test-forward-declared-method.gc [goalc] fix static array length (#836) 2021-09-08 18:49:49 -04:00
test-function128.gc support inline arrays on stack (#726) 2021-07-26 21:39:05 -04:00
test-game-count.gc Support "game count" and v4 objects (#140) 2020-11-24 20:48:38 -05:00
test-game-text.gc support inline arrays on stack (#726) 2021-07-26 21:39:05 -04:00
test-get-enum-vals.gc add get-enum-vals (#737) 2021-08-02 22:01:10 -04:00
test-i128-simple.gc support inline arrays on stack (#726) 2021-07-26 21:39:05 -04:00
test-insert-cons.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-integer-boxed-array.gc [Compiler] Bug fixes (#230) 2021-02-03 11:07:47 -05:00
test-kernel-alloc.gc [runtime] add process allocations (#834) 2021-09-06 18:27:24 -04:00
test-last.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-load-game.gc [decomp] clean up KERNEL.CGO code (#1420) 2022-06-05 15:20:33 -04:00
test-load-static-vector.gc Compiler - Implementing more VU Instructions (Part 1 of 2) (#221) 2021-02-05 15:00:17 -05:00
test-local-vars.gc [Decompiler] Expression 5 (#218) 2021-02-01 20:41:37 -05:00
test-math.gc update 2020-11-28 19:59:23 -05:00
test-matrix.gc [Decompiler] Make matrix decompile (#341) 2021-03-28 20:26:30 -04:00
test-member-1.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-member-2.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-memcpy.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-memset.gc [gcommon decomp] compiler and decompiler fixes (#239) 2021-02-07 18:21:00 -05:00
test-method-replace.gc deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
test-min-max.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-mips2c-call.gc [decomp] add mips2c converter (#842) 2021-09-11 20:52:35 -04:00
test-mips2c-goal.gc [sparticle] 2d hud particles (#849) 2021-09-26 11:41:58 -04:00
test-new-array.gc Add more array stuff and clean up field access (#80) 2020-10-14 13:42:14 -04:00
test-new-inline-array-class.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-new-static-basic.gc [Compiler] Add static data features (#162) 2020-12-19 15:21:29 -05:00
test-new-static-structure-integers.gc Add compiler features for gkernel (#83) 2020-10-16 17:08:26 -04:00
test-new-string.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-number-comparison.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-pair-asize.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-pair-length.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-pand-por-pnor.gc support inline arrays on stack (#726) 2021-07-26 21:39:05 -04:00
test-partial-define-type-field.gc Allow setting a field with partially defined field (#646) 2021-06-28 19:20:36 -04:00
test-pextlw.gc [jak2] GOAL side texture animation stuff (#2766) 2023-06-24 10:11:47 -04:00
test-pw-shifts.gc [decomp] collectables + works ingame! (#971) 2021-11-23 18:25:57 -05:00
test-ray-sphere.gc Get started on collide-func and clean up log forms in decompiler (#713) 2021-07-23 20:51:26 -04:00
test-ref.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-set-bitfield.gc [Compiler] Bitfield Types (#146) 2020-11-29 18:01:30 -05:00
test-set-self.gc [Decompiler] Clean up the output (#245) 2021-02-09 20:59:14 -05:00
test-set-u64-from-float.gc set u64 from float 2021-08-12 20:09:25 -04:00
test-short-circuit.gc [Compiler] Implement and/or in the compiler instead of a macro (#231) 2021-02-03 16:12:51 -05:00
test-size-of.gc support inline arrays on stack (#726) 2021-07-26 21:39:05 -04:00
test-sort-2.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-sort-3.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-sort.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-sound-name.gc [decompiler] bitfield support for sound-name (#582) 2021-06-12 12:55:38 -04:00
test-stack-inline-array.gc support inline arrays on stack (#726) 2021-07-26 21:39:05 -04:00
test-stack-singleton-type.gc add an optional, less-accurate-but-faster sprite render and fix silly math bug (#1102) 2022-01-21 21:11:57 -05:00
test-stack-singleton.gc add an optional, less-accurate-but-faster sprite render and fix silly math bug (#1102) 2022-01-21 21:11:57 -05:00
test-static-array-field.gc [decomp] ctywide-obs (#2250) 2023-02-25 14:00:16 -05:00
test-static-array-of-lambdas.gc d/jak2: decompile fodder and nav-enemy (#2080) 2023-01-01 21:03:07 -05:00
test-static-array-of-types.gc goalc: support static arrays of types (#2140) 2023-01-21 21:40:39 -05:00
test-static-array-subtype.gc d/jak2: decompile all *-texture files except castle-texture (#2149) 2023-01-28 17:37:37 -05:00
test-static-array.gc [Decomp] Decompile engine math library types (#272) 2021-02-20 11:42:46 -05:00
test-static-bitfield.gc [Compiler] Support dynamically constructed bitfields (#354) 2021-04-11 19:21:49 -04:00
test-static-boxed-array.gc Change syntax for boxed array to support different length and allocated-length (#568) 2021-06-07 20:22:06 -04:00
test-static-field-inline-arrays.gc [Compiler] Support array fields in static objects (#284) 2021-02-25 22:49:46 -05:00
test-static-inline-array.gc [Compiler] Support array fields in static objects (#284) 2021-02-25 22:49:46 -05:00
test-static-lambda.gc [decompiler/compiler] Fixes for task-control (#668) 2021-07-01 21:38:19 -04:00
test-static-pair-1.gc [decomp] cleanup default-menu, fix dangerous IOP bug, autoconvert ints in pairs to/from bintegers (#997) 2021-12-09 18:39:40 -05:00
test-string-type.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-tests.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-trig.gc support inline arrays on stack (#726) 2021-07-26 21:39:05 -04:00
test-type-arrays.gc Copy over LISP code 2020-10-08 00:05:01 -04:00
test-type-ref.gc support type-ref (#613) 2021-06-20 12:59:39 -04:00
test-type-type.gc Make all tests hermetic, only the tests with kernel left 2020-10-09 13:23:41 -04:00
test-vector-dot.gc [gcommon decomp] compiler and decompiler fixes (#239) 2021-02-07 18:21:00 -05:00
test-vector-int-float-conversions.gc [decomp] collectables + works ingame! (#971) 2021-11-23 18:25:57 -05:00
test-vector-math-1-operand.template.gc compiler: Support the majority of the remaining VU VF instructions (#258) 2021-02-16 21:41:33 -05:00
test-vector-math-2-operand-acc.template.gc compiler: Support the majority of the remaining VU VF instructions (#258) 2021-02-16 21:41:33 -05:00
test-vector-math-2-operand.template.gc compiler: Support the majority of the remaining VU VF instructions (#258) 2021-02-16 21:41:33 -05:00
test-vector-math-division.template.gc compiler: Support the majority of the remaining VU VF instructions (#258) 2021-02-16 21:41:33 -05:00
test-vector-math-sqrt.template.gc compiler: Support the majority of the remaining VU VF instructions (#258) 2021-02-16 21:41:33 -05:00
test-vector-outer-product.gc decomp - vector.gc - Decompile vector.gc (#289) 2021-03-06 10:46:26 -05:00
test-vector.gc [Decompile] vector.gc (finally) (#394) 2021-04-28 17:14:54 -04:00
test-vf-load-and-store.gc Compiler - Implementing more VU Instructions (Part 1 of 2) (#221) 2021-02-05 15:00:17 -05:00
test-weird-multiplies.gc [OpenGOAL] make multiplication/divsion like GOAL and support in decompiler (#483) 2021-05-14 18:43:12 -04:00
test-xmm-spill.gc [Compiler] Improve spills and register backups (#175) 2020-12-31 15:59:11 -05:00
tricky-floats.gc fix really old compiler bug (#799) 2021-08-31 22:12:30 -04:00