summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-12 22:08:18 +0800
committerJohn Hodge <tpg@mutabah.net>2016-12-12 22:08:18 +0800
commit4c97c1d984eb2812fe3e9dbd4656826a54d80d9f (patch)
treecbc665caf0dc219aa95f72aa1316e37716167a6c /src/main.cpp
parent48560772db858bcd142886a0c277e2b2dae9cf14 (diff)
downloadmrust-4c97c1d984eb2812fe3e9dbd4656826a54d80d9f.tar.gz
Trans C - Constants
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 96d05f29..33bed1bb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -315,6 +315,7 @@ int main(int argc, char *argv[])
CompilePhaseV("Resolve HIR Markings", [&]() {
ConvertHIR_Markings(*hir_crate);
});
+ // Basic constant evalulation (intergers/floats only)
CompilePhaseV("Constant Evaluate", [&]() {
ConvertHIR_ConstantEvaluate(*hir_crate);
});
@@ -389,14 +390,24 @@ int main(int argc, char *argv[])
CompilePhaseV("Constant Evaluate Full", [&]() {
ConvertHIR_ConstantEvaluateFull(*hir_crate);
});
-
CompilePhaseV("Dump HIR", [&]() {
::std::ofstream os (FMT(params.outfile << "_2_hir.rs"));
HIR_Dump( os, *hir_crate );
});
+ // - Expand constants in MIR
+ CompilePhaseV("MIR Const Expand", [&]() {
+ //MIR_ExpandConstants(*hir_crate);
+ });
// Optimise the MIR
- // TODO: MIR Optimisation
+ CompilePhaseV("MIR Optimise", [&]() {
+ //MIR_Optimise(*hir_crate);
+ });
+
+ CompilePhaseV("Dump MIR", [&]() {
+ ::std::ofstream os (FMT(params.outfile << "_3_mir.rs"));
+ MIR_Dump( os, *hir_crate );
+ });
if( params.last_stage == ProgramParams::STAGE_MIR ) {
return 0;