Skip to content
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

Support for cast assignment operator =# #116

Closed
Tracked by #231
x87 opened this issue Dec 14, 2020 · 2 comments
Closed
Tracked by #231

Support for cast assignment operator =# #116

x87 opened this issue Dec 14, 2020 · 2 comments
Labels
priority:p3 Low priority scope:compiler type:feature New feature or request
Milestone

Comments

@x87
Copy link
Collaborator

x87 commented Dec 14, 2020

https://gtamods.com/wiki/SCM_language#Compound_assignment

=# Cast assignment expr0 =# expr1 Cast expr1 to any other type and store the result to expr0

VARIABLES ON BOTH SIDES SHOULD BE DECLARED WITH A TYPE (INT OR FLOAT)

Operation Opcode Expression
CSET_VAR_INT_TO_VAR_FLOAT 008C $i =# $f
CSET_VAR_FLOAT_TO_VAR_INT 008D $f =# $i
CSET_LVAR_INT_TO_VAR_FLOAT 008E 0@ =# $f
CSET_LVAR_FLOAT_TO_VAR_INT 008F 1@ =# $i
CSET_VAR_INT_TO_LVAR_FLOAT 0090 $i =# 1@
CSET_VAR_FLOAT_TO_LVAR_INT 0091 $f =# 0@
CSET_LVAR_INT_TO_LVAR_FLOAT 0092 0@ =# 1@
CSET_LVAR_FLOAT_TO_LVAR_INT 0093 1@ =# 0@
@x87 x87 added type:feature New feature or request priority:p2 Medium priority scope:compiler labels Dec 14, 2020
@x87
Copy link
Collaborator Author

x87 commented Dec 14, 2020

Could be done with the new binary parser #97

@x87 x87 added priority:p3 Low priority and removed priority:p2 Medium priority labels Dec 14, 2020
@x87
Copy link
Collaborator Author

x87 commented Jul 15, 2023

Also need typing info to resolve correct opcode

@x87 x87 mentioned this issue Jul 15, 2023
46 tasks
@x87 x87 added this to the v3.9.0 milestone Jul 15, 2023
@x87 x87 closed this as completed Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:p3 Low priority scope:compiler type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant