summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-05-11 13:25:20 +0800
committerJohn Hodge <tpg@mutabah.net>2016-05-11 13:25:20 +0800
commit8e9e3a395f211dc871c3abc816b1cc892ed74312 (patch)
tree54efa6d90a427c2a5e0488da9fe8d59b91a325a7 /src/main.cpp
parent1ac071bb74b47a0904e080f1343b31142da9da90 (diff)
downloadmrust-8e9e3a395f211dc871c3abc816b1cc892ed74312.tar.gz
HIR - Start on conversion
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 74e5e7f1..74e92f76 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -54,9 +54,11 @@ template <typename Rv, typename Fcn>
Rv CompilePhase(const char *name, Fcn f) {
::std::cout << name << ": V V V" << ::std::endl;
g_cur_phase = name;
+ auto start = clock();
auto rv = f();
+ auto end = clock();
g_cur_phase = "";
- ::std::cout << name << ": DONE" << ::std::endl;
+ ::std::cout << name << ": DONE (" << static_cast<double>(end - start) / static_cast<double>(CLOCKS_PER_SEC) << " s)" << ::std::endl;
return rv;
}
template <typename Fcn>
@@ -130,8 +132,9 @@ int main(int argc, char *argv[])
Dump_Rust( FMT(params.outfile << "_1_res.rs").c_str(), crate );
});
+ ::HIR::CratePtr hir_crate;
CompilePhaseV("HIR Lower", [&]() {
- //hir_crate = LowerHIR_FromAST(mv$( crate ));
+ hir_crate = LowerHIR_FromAST(mv$( crate ));
});
// Replace type aliases (`type`) into the actual type