From eeed3845cd504028779c333665e0b9fad2070357 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 6 Oct 2016 21:49:36 -0700 Subject: 3456 --- html/012transform.cc.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'html/012transform.cc.html') diff --git a/html/012transform.cc.html b/html/012transform.cc.html index c20c09fd..97978c50 100644 --- a/html/012transform.cc.html +++ b/html/012transform.cc.html @@ -32,6 +32,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 //: Phase 2: Filter loaded recipes through an extensible list of 'transforms'.
 //:
+//:   The process of running mu code:
+//:     load -> transform -> run
+//:
 //: The hope is that this framework of transform tools will provide a
 //: deconstructed alternative to conventional compilers.
 //:
@@ -56,7 +59,10 @@ transformed_until = -1;:(before "End Globals")
 vector<transform_fn> Transform;
 
-:(after "int main")
+:(before "End One-time Setup")
+initialize_transforms();
+:(code)
+void initialize_transforms() {
   // Begin Transforms
     // Begin Instruction Inserting/Deleting Transforms
     // End Instruction Inserting/Deleting Transforms
@@ -67,8 +73,8 @@ vector<transform_fn> Transform;
 
   // Begin Checks
   // End Checks
+}
 
-:(code)
 void transform_all() {
   trace(9990, "transform") << "=== transform_all()" << end();
 //?   cerr << "=== transform_all\n";
@@ -76,7 +82,6 @@ vector<transform_fn> Transform;
 //?     cerr << "transform " << t << '\n';
     for (map<recipe_ordinal, recipe>::iterator p = Recipe.begin(); p != Recipe.end(); ++p) {
       recipe& r = p->second;
-      if (r.steps.empty()) continue;
       if (r.transformed_until != t-1) continue;
       // End Transform Checks
       (*Transform.at(t))(/*recipe_ordinal*/p->first);
-- 
cgit 1.4.1-2-gfad0