Skip to content

Compilation #1

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

Open
furesoft opened this issue Nov 11, 2024 · 3 comments
Open

Compilation #1

furesoft opened this issue Nov 11, 2024 · 3 comments

Comments

@furesoft
Copy link

Hi there,

i love your idea and I wanna join. I could make a compiler that translates vb6 to msil. But is this wanted?

@BAndysc
Copy link
Owner

BAndysc commented Nov 11, 2024

Hello,
the response to this project exceeded my wildest expectations! I have coded an interpreter, which covers only a small subset of the language as that was the fastest way to get started. Having a proper compilation would be much nicer. Tho if we were to add a compiler, I am not sure if it wouldn't be even better to try to compile it to native code. The GUI "runtime" is a c# project, but it is compatible with NativeAOT, so we can get a native executable there, so if we could compile VB6 to assembly, it would work nicely together.

The ANTLR4 grammar I used is a good starting point for any further work on this. In the past I wrote a simple compiler in C#, but now I would rather target LLVM IR to make sure many different platforms are supported.

What is your stand on targeting MSIL vs LLVM IR?

@furesoft
Copy link
Author

msil is portable. and the llvm wrappers are not idomatic csharp. so its harder to use it.

I think using DistiIL to build the assembly

@BAndysc
Copy link
Owner

BAndysc commented Nov 11, 2024

msil/dotnet is portable, I mentioned native code as the original VB6 was also able to produce native code.

But this is a project made for fun, if you want to work on a proper compiler to IL, I am more than happy to have it
integrated in this project!

Feel free to contact me on discord: bandysc

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

2 participants