From 38454b870db4c2c77d6b8ed2c917df6550d3546e Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 22 Aug 2016 17:08:15 +0800 Subject: README - Updated readme with new progress and subtly changed goals --- Notes/todo.txt | 1 + README.md | 17 +++++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Notes/todo.txt b/Notes/todo.txt index 495e4dbd..065c1642 100644 --- a/Notes/todo.txt +++ b/Notes/todo.txt @@ -6,3 +6,4 @@ TODO: - Test compile against a no_std program - MIR Optimisations - HIR Optimisation (remove dead code in `if true/if false` branches) +- Convert enum variants to point to structs for the data type diff --git a/README.md b/README.md index a9c847db..699ff42d 100644 --- a/README.md +++ b/README.md @@ -7,30 +7,27 @@ Intro === This project is an attempt at creating a simple rust compiler in C++, with the ultimate goal of being a seperate reimplementation. -The short-term goal is to compile pre-borrowchecked rust code into C, for passing to an existing C compiler. Thankfully, (from what I have seen), the borrow checker is not needed to compile rust code (just to ensure that it's valid) +The short-term goal is to compile pre-borrowchecked rust code into some intermediate form (e.g. LLVM IR, x86-64 assembly, or C code). Thankfully, (from what I have seen), the borrow checker is not needed to compile rust code (just to ensure that it's valid) Current Features === - Successfully parses libcore and rustc's run-pass tests - Attribute and macro expansion - Resolves all paths to absolute forms -- Outputs the processed AST as (almost) rust code - - Almost because it uses special path types to handle external crates and anonymous modules. -- Converts name-resolved AST into a more compact "HIR" +- Converts name-resolved AST into a more compact "HIR" (simplified module and expression ree) - Hackily evaluates constants - Constant evaluation is done by using duck-typing, which is then validated by the Type Check pass -- Partial type checking and inferrence + - This is how rustc did (or still does?) const eval before MIR +- Type inferrence and checking +- Closure and operator desugaring +- MIR generation (with partial validation pass) Short-Term Plans === -- Completed type checking, including a validation pass -- Convert HIR expressions into a MIR similar to rustc's - Storing of HIR/MIR for `extern crate` handling +- Code generation (including picking the output format) Medium-Term Goals === -- Convert MIR or HIR into C - - Bonus points for making it readable C - - NOTE: Due to `#[cfg]` attributes being resolved already, the C code won't be portable. - Propagate lifetime annotations so that MIR can include a borrow checker -- cgit v1.2.3