summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-05-21 09:52:21 +0800
committerJohn Hodge <tpg@mutabah.net>2016-05-21 09:52:21 +0800
commit6e8fa812d8ab6c148213eebc716f7433e6e6b557 (patch)
tree9842fe94b946d72c44f4f857a3e2f43c9ed43f00 /src/main.cpp
parentd5f9153fe1c753d8dd7d675027ee2a3d03f910ce (diff)
downloadmrust-6e8fa812d8ab6c148213eebc716f7433e6e6b557.tar.gz
Main - Planning next passes
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/main.cpp b/src/main.cpp
index df8ca562..4338487c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -120,8 +120,7 @@ int main(int argc, char *argv[])
CompilePhaseV("Resolve", [&]() {
Resolve_Use(crate); // - Absolutise and resolve use statements
Resolve_Index(crate); // - Build up a per-module index of avalable names (faster and simpler later resolve)
- Resolve_Absolutise(crate);
- //Resolve_UfcsPaths(crate);
+ Resolve_Absolutise(crate); // - Convert all paths to Absolute or UFCS, and resolve variables
// OLD resolve code, kinda bad
//ResolvePaths(crate);
@@ -137,31 +136,34 @@ int main(int argc, char *argv[])
hir_crate = LowerHIR_FromAST(mv$( crate ));
});
- // Replace type aliases (`type`) into the actual type
+ // Perform type checking on items
+ // - Replace type aliases (`type`) into the actual type
CompilePhaseV("Resolve Type Aliases", [&]() {
- //
+ //Typecheck_ExpandAliases(hir_crate);
});
-
- // Perform type checking on items
-
- //
// Typecheck / type propagate module (type annotations of all values)
// - Check all generic conditions (ensure referenced trait is valid)
// > Also mark parameter with applicable traits
CompilePhaseV("TypecheckBounds", [&]() {
//Typecheck_GenericBounds(crate);
});
-
- // - Check all generic parameters match required conditions
+ // - Check all generic parameters match required conditions (without doing full typeck)
CompilePhaseV("TypecheckParams", [&]() {
//Typecheck_GenericParams(crate);
});
- // - Typecheck statics and consts
- // - Typecheck + propagate functions
- // > Forward pass first
+ // - Full function typeck
CompilePhaseV("TypecheckExpr", [&]() {
//Typecheck_Expr(crate);
});
+
+ // Expand closures into items
+ CompilePhaseV("Lower Closures", [&]() {
+ //
+ });
+ // Lower expressions into MIR
+ CompilePhaseV("Lower MIR", [&]() {
+ //
+ });
CompilePhaseV("Output", [&]() {
Dump_Rust( FMT(params.outfile << ".rs").c_str(), crate );