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

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


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

    doc

diff --git a/Changelog b/Changelog
index 3c55372..c746159 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,25 @@
+mildred-stable
+==============
+ * compiler: workaround: sometimes a variable read is generated but it is not
+   declared in the C source code. Now, every read makes sure the variable is
+   declared. This may be a little slower though. (grep for WORKAROUND)
+ * lib: workaround: don't trigger native array bug (see README and grep for
+   WORKAROUND)
+ * lib: deferred slots and crash now display the current dynamic type
+
+mildred-r3
+==========
+ * Only disable gcc optimization -fstrict-overflow
+
+mildred-r2
+==========
+ * Disable gcc -O2 optimizations as it makes compiler crash
+
+mildred-r1
+==========
+ * Code coverage
+ * Lot of things
+
 Version 0.39 rc1:
 =================
 2009/12/01
diff --git a/README b/README
index cf36488..e559f2e 100644
--- a/README
+++ b/README
@@ -22,7 +22,31 @@ For those who want to install everything manually:
 Known Problems
 ==============
 
-  * Doesn't work when lisaac is compiled with gcc optimizations
+  * Doesn't work when lisaac is compiled with gcc optimization -fstrict-overflow
+  
+  * The compiler can crash on a deferred slot when using empty ARRAYs.
+    
+    The deferred slot in in VARIABLE. The VARIABLE object is created by
+    TYPE_GENERIC for the NATIVE_ARRAY special case. This variable is used by the
+    PUT_TO and ITEM instructions.
+    
+    When an array is created empty (using for example FAST_ARRAY(E).create 0)
+    and the compiler can statically know that the array will be used empty for
+    the first time, it will crash.
+    
+    There are two workarounds:
+    
+      - When you create the array, create it with an element and remove it just
+        after
+      - Or create it with a capacity of 1. This can be done in the FAST_ARRAY
+        prototype directly if you don't know which array in your code triggered
+        this error.
+        
+  * Perhaps related to the previous error: code generation can sometimes
+    generate variables but don't declare them. This cause a C error. The cause
+    of this isn't known yet. The best way is to avoid writing code that might
+    trigger this error.
+
 
 Directory description.
 ======================
diff --git a/src/aliaser_local.li b/src/aliaser_local.li
index 39d4b8a..3a23dde 100644
--- a/src/aliaser_local.li
+++ b/src/aliaser_local.li
@@ -25,7 +25,9 @@ Section Header
   - copyright := "2003-2009 Sonntag Benoit";
 
   - author    := "Sonntag Benoit (sonntag at icps.u-strasbg.fr)";
-  - comment   := "Aliaser local";
+  - comment   := "Aliaser local. Track which variables are generated in a \
+                 \function body so that they are all declared in the function. \
+                 \This is also used to determine if some locals can be reused.";
 
 Section Inherit
 
@@ -38,6 +40,7 @@ Section ALIASER_LOCAL,LIST
   - top_context:INTEGER;
 
   - var_size:FAST_ARRAY(FAST_ARRAY(LOCAL)) :=
+  // List of locals ordered by size in bytes.
   ( + result:FAST_ARRAY(FAST_ARRAY(LOCAL));
 
     result := FAST_ARRAY(FAST_ARRAY(LOCAL)).create_with_capacity 4;
@@ -52,6 +55,7 @@ Section Public
   - is_on:BOOLEAN := TRUE;
 
   - reset <-
+  // Reset state. Remove all locals from the list
   (
     (var_size.lower).to (var_size.upper) do { i:INTEGER;
       var_size.item i.clear;
@@ -69,6 +73,7 @@ Section Public
     ((is_on) && {loc.style = '+'}).if {
       loc2 := loc.my_alias;
       (loc2 = NULL).if {
+        // No alias
         loc2 := search_alias loc;
         (loc2 = loc).if {
           add_var_size loc;

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list