[SCM] Lisaac compiler branch, mildred-stable, updated. mildred-r4

Mildred Ki'Lya silkensedai at online.fr
Fri May 6 10:25:10 UTC 2011


The following commit has been merged in the mildred-stable branch:
commit 835e3f3590139c7ab8833aea24c8a7d5bbf2d759
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date:   Fri May 6 12:16:53 2011 +0200

    Workaround native array bug in FAST_ARRAY

diff --git a/lib/standard/collection/fast_array.li b/lib/standard/collection/fast_array.li
index 66b7b5b..8e80a06 100644
--- a/lib/standard/collection/fast_array.li
+++ b/lib/standard/collection/fast_array.li
@@ -65,7 +65,14 @@ Section Public
   ( + result:SELF;
 
     result := clone;
-    result.make new_count;
+    // WORKAROUND: Mildred: Avoid create arrays with empty capacity. When those
+    // are used before any value is placed in it, the compiler crash with a slot
+    // deferred.
+    (new_count = 0).if {
+      result.with_capacity 1;
+    } else {
+      result.make new_count;
+    };
     result
   );
 

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list