Next steps

7 views
Skip to first unread message

Bill Cox

unread,
Mar 24, 2023, 2:57:47 PM3/24/23
to Rune language discussion
Rune is getting to what I hope will be a fun stage of development.  We're going to rewrite Rune in Rune.  This will allow contributors to write in Rune, rather than having to learn the details of DataDraw-backed C development.

Next goals could include:
  • Complete design doc for Rune's High-level IR (HIR) design.  I have a doc in progress, and will share after the initial review.
  • Modify the existing bootstrap/database to conform to the updated HIR design.
  • Add any additional HIR classes required to parse and print out Rune HIR.
    • There is little work here.  For example, we don't need Datatype or even Class yet.  We'll need Tclass, but not Signature.
  • Rewrite the dynamic LALR-1 parse I have in C in Rune
  • Add support to the bootstrap compiler to be able to compile and then dynamically link and run compile-time modules:
    • Needed to parse Rune directly into HIR.  We can bypass AST if we like, as we do in the C Rune compiler.
    • Needed later for executing the existing code generators in the builtin directory
  • Run the Rune parser and build HIR for most of the initial supported Rune bootstrap HIR needed to represent Rune code.
  • Write a Rune code printer from HIR that pretty-prints into legal Rune source code
There are still many steps after that... this may take a year or two as a 20% project.   Before compiling and running helloworld.rn with the bootstrap compiler, we'll still have to write:
  • Pass for initial semantic checking
  • Pass for local/global variable creation
  • Pass for event-driven type inferencing
  • Initial C-code generator from HIR
I'm leaning towards writing a C code generator first, rather than the new LLVM IR generator because:
  • We can win benchmarks if we run our C output through Clang/Gcc.  Without all the optimizations, such as vectorization and loop unrolling done before writing out LLVM IR, we'll lose all but the most memory intensive benchmarks.
  • A C backend will help us port Rune to platforms not fully supported by Clang.
  • It allows a C-based Rune compiler to easily stay in sync with the Rune based compiler.  I'll feel better deleting the original C Rune compiler.
Bill

Aiden Hall

unread,
Mar 28, 2023, 10:13:59 AM3/28/23
to Bill Cox, Rune language discussion
Hurrah! Stoked for more Rune development :)

--
You received this message because you are subscribed to the Google Groups "Rune language discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rune-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rune-discuss/CAH9QtQG2zEEzT8YyhJt8sC_5sp448uVq8Gmjcoe0OVjcH_Pf%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages