summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-08-29 14:38:07 +0800
committerJohn Hodge <tpg@mutabah.net>2016-08-29 14:38:07 +0800
commit3ba6f9cece9b99362f964d5bb1356a6d96dc9a30 (patch)
tree3b0465f478943f59b3055a1aa5b80fb71a54d447 /src/main.cpp
parentd717794c3a9e97579bb89e54a13346cf4b1af4f4 (diff)
downloadmrust-3ba6f9cece9b99362f964d5bb1356a6d96dc9a30.tar.gz
Main - Split resolve into three logged passes
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 71da37c8..6d056fd4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -34,7 +34,9 @@ void init_debug_list()
g_debug_disable_map.insert( "Parse" );
g_debug_disable_map.insert( "Expand" );
- g_debug_disable_map.insert( "Resolve" );
+ g_debug_disable_map.insert( "Resolve Use" );
+ g_debug_disable_map.insert( "Resolve Index" );
+ g_debug_disable_map.insert( "Resolve Absolute" );
g_debug_disable_map.insert( "HIR Lower" );
@@ -167,13 +169,17 @@ int main(int argc, char *argv[])
// Resolve names to be absolute names (include references to the relevant struct/global/function)
// - This does name checking on types and free functions.
// - Resolves all identifiers/paths to references
- CompilePhaseV("Resolve", [&]() {
+ CompilePhaseV("Resolve Use", [&]() {
Resolve_Use(crate); // - Absolutise and resolve use statements
+ });
+ CompilePhaseV("Resolve Index", [&]() {
Resolve_Index(crate); // - Build up a per-module index of avalable names (faster and simpler later resolve)
+ });
+ CompilePhaseV("Resolve Absolute", [&]() {
Resolve_Absolutise(crate); // - Convert all paths to Absolute or UFCS, and resolve variables
});
- // XXX: Dump crate before typecheck
+ // XXX: Dump crate before HIR
CompilePhaseV("Temp output - Resolved", [&]() {
Dump_Rust( FMT(params.outfile << "_1_res.rs").c_str(), crate );
});