[SCM] Lisaac compiler branch, mildred-backend, updated. lisaac-0.12-524-g7710f76

Mildred Ki'Lya silkensedai at online.fr
Tue Aug 25 21:54:01 UTC 2009


The following commit has been merged in the mildred-backend branch:
commit 7710f7687c4c5185b71b8c118ec413275b7a093b
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date:   Tue Aug 25 23:53:37 2009 +0200

    Cleanup workaround (generate struct content inline)

diff --git a/src/tools/backend.li b/src/tools/backend.li
index 10c57f5..1f08d8b 100644
--- a/src/tools/backend.li
+++ b/src/tools/backend.li
@@ -133,7 +133,6 @@ Section Public
 	slot_data.genere buf;
 	num_slots := num_slots + 1;
       };
-      tab.clear;
     };
 
     //
diff --git a/src/tools/backend_c.li b/src/tools/backend_c.li
index a3f82c3..7f85b18 100644
--- a/src/tools/backend_c.li
+++ b/src/tools/backend_c.li
@@ -91,29 +91,6 @@ Section Public
 
   - generate_type_struct_for t:TYPE in buf:STRING <-
   (
-
-    //
-    // Ahead generation of the struct content.
-    //
-    // If not outside the if, the following error is triggered when
-    // bootstrapping:
-    //
-    // --SEMANTIC---------
-    // Slot is not possible with a type C
-    // Line 35 column 21 in LIP_CODE:
-    //   + parent_itm_object:Expanded ITM_OBJECT;
-    //                      ^
-    // This error is strange as for the compiler, the type BOOLEAN contains
-    // slots from LIP_CODE (this error was triggered in BOOLEAN, I checked)
-    //
-    // Possible cause: if the struct content is not generated, some slots stay
-    // in TYPE.slot_size and the next type generated keep the slots from the
-    // previous type (in this case LIP_CALL keep the slots from BOOLEAN)
-    //
-
-    string_tmp.clear;
-    generate_type_struct_contents_for t in string_tmp;
-
     (t.alias_slot = NULL).if {
 
       //
@@ -126,7 +103,7 @@ Section Public
       //
       // Struct Contents
       //
-      buf.append string_tmp;
+      generate_type_struct_contents_for t in buf;
 
       //
       // End structure declaration
diff --git a/src/type/type.li b/src/type/type.li
index 266e66a..da5e4ed 100644
--- a/src/type/type.li
+++ b/src/type/type.li
@@ -501,7 +501,15 @@ Section Public
       };
 
       //
-      // Sort slot. (whatever that might mean)
+      // Clear slot_size
+      //
+
+      (slot_size.upper).downto (slot_size.lower) do { j:INTEGER;
+	slot_size.item j.clear;
+      };
+
+      //
+      // Sort slot. (by size ?)
       //
 
       (slot_run.lower).to (slot_run.upper) do { j:INTEGER;

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list