-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deftype
and defmethod
syntax major changes
#3094
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ManDude
changed the title
Oct 18, 2023
deftype
and defmethod
syntax changesdeftype
and defmethod
syntax major changes
…k-project into d/state-methods-def
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Major change to how
deftype
shows up in our code:offset-assert
,method-count-assert
,size-assert
andflag-assert
parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come fromall-types
which already has those parameters. This also doesn't break type consistency because:all-types
, which has the asserts, which will throw an error if they're bad.heap-base
parameter unless necessary now.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.:in this structure, the offset of
flags
will be 12 because that is the final offset ofvec
'sw
field within this structure.: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.state-methods
list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as thestates
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.