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

Replace ~80% of code in llvm_interpreter.rs by just hand-writing a prelude #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bollu
Copy link
Contributor

@bollu bollu commented Jun 15, 2017

I'm using your project as a guinea pig (again). I want to see how successful this approach of storing the prelude as a .ll file is.

This will also help to add more stuff, because now it's just a raw .ll file that anyone can read & see.

I should be able to rip out a huge chunk of the source code that tries to generate this prelude, and focus on the actual compile step.

  • rip out prelude.ll
  • load prelude.ll as an LLVM module
  • JIT with external prelude
  • what's the packaging story for prelude.ll? @polybuildr, I don't know how to package "assets" like these. Any ideas?

@bollu bollu force-pushed the make-llvm-prelude branch from 8d13870 to a28f735 Compare June 15, 2017 22:00
@polybuildr
Copy link
Owner

This seems like a lovely idea. Since you're familiar enough with LLVM to hand-write the prelude, this works out nicely.

About the packaging story, I believe cargo will bring the entire git repository when installing something but I'm ready to delay finding out until I actually distribute Balloon using Cargo. As for the location, it seems like this is a "lib"-like thing (where preludes written in Balloon for Balloon will also go), so we could make a /lib/llvm and put it there?

@bollu
Copy link
Contributor Author

bollu commented Jun 16, 2017

sure, lib sounds like a decent idea.

@bollu bollu force-pushed the make-llvm-prelude branch from edac864 to 13f7453 Compare June 17, 2017 17:28
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

Successfully merging this pull request may close these issues.

2 participants