A code-generator written in Perl 6 for compiling Perl 6 code to the LLVM.
License
ekiru/Bennu
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Bennu is a code-generator, written in Perl 6, for a Perl 6 to LLVM compiler. It currently uses the SIC format produced by the Yapsi Perl 6 in Perl 6 compiler, but eventually, we might end up implementing our own parser for Perl 6. The Bennu is a mythical Egyptian bird that is similar to the phoenix. It was also said to be the soul of Ra. Some Egyptian myths claim that the Bennu created itself from the fire burned on a holy tree in Ra's temple. Similarly, Bennu is Perl 6 creating itself. To use Bennu, you need Yapsi to turn your Perl 6 into SIC, and you need LLVM to compile to native code the LLVM assembly Bennu generates. You also need GNU libtool(at /usr/local/bin/libtool unless you hack the runtime/ Makefile), and, depending on whether you want to compile to LLVM bitcode or native code, either a LLVM C front-end(probably LLVM-GCC, because I'm not sure Clang supports the macro syntax used for the message sends) or a C compiler(probably GCC, because, again, I think the BENNU_OBJ_SEND macro might be GNU-C-only). Before you can compile the code to native code, you must build the runtime in the runtime/ directory by changing to that directory and running "make". Use "yapsi --target=sic" to convert the Perl 6 code into SIC. Then use the "bennu" script on the generate SIC. After that, compile the generated LLVM assembly to native assembly code with "llc", then assemble it, and subsequently link it to the libbennu library("libtool --mode=link gcc -o foo foo.o /usr/local/lib/libbennu.la" works for me, but you can probably get whatever linker you want to do the right thing with the right options, too).
About
A code-generator written in Perl 6 for compiling Perl 6 code to the LLVM.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published