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

Update instruction set #1

Open
rlbr opened this issue May 2, 2021 · 4 comments
Open

Update instruction set #1

rlbr opened this issue May 2, 2021 · 4 comments

Comments

@rlbr
Copy link

rlbr commented May 2, 2021

I was super happy to see your project since I've been looking for a mindustry assembly compiler and was scared I would have to write a compiler backend from scratch. This being said, there have been additions to the instruction set and I was willing to update code to include these instructions, but looking at the way compiler.py is implemented there seems to be a lot of finickiness I would have to overcome. For example, the @Unit constant and sensor instruction. With the current implementation, the '@' character is unable to be externed in c code, thus using Edit: that part is easy

Another thing I see as problematic is the sheer number of instructions added since the start of the project. In my view, parsing include/builtins.h for instruction declaration dynamically may be better than statically defining them all in instructions.py. The methods for processing instruction arguments are also hardcoded (eg elif name == "radar"), but again with the amount of instructions added generalization may be a good idea.

Considering the scope of the project, I don't really expect you to put in weekends into it and I am willing to take the project under my wing if you no longer are interested. If however you are still interested, just point me in the direction you want to go and I'll do my best to contribute to the compiler.

@SuperStormer
Copy link
Owner

Feel free to adopt the project if you are interested; this project has basically been abandoned by me for the time being.

@phinner
Copy link

phinner commented Jun 11, 2021

If its possible to embed it with jython, I may have a plan to revive it @SuperStormer

@rlbr
Copy link
Author

rlbr commented Jun 11, 2021

@phinner Check my fork I've done some work on updating it.

@phinner
Copy link

phinner commented Jun 12, 2021

👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants