[SCM] Lisaac compiler branch, master, updated. lisaac-0.12-525-g5032081

Benoit Sonntag sonntag at icps.u-strasbg.fr
Tue Oct 27 20:32:26 UTC 2009


The following commit has been merged in the master branch:
commit 5032081ef421dcffd6f98d7e1d8252c5599529b1
Author: Benoit Sonntag <sonntag at icps.u-strasbg.fr>
Date:   Tue Oct 27 21:32:26 2009 +0100

    bug mildred 312024 (2)

diff --git a/lib/collection/hashed_set.li b/lib/collection/hashed_set.li
index 58e821d..58bc7f4 100644
--- a/lib/collection/hashed_set.li
+++ b/lib/collection/hashed_set.li
@@ -295,6 +295,22 @@ Section Public
     };
     result
   );
+
+  - reference_at e:V with cmp:{(V,V); BOOLEAN} :V <-
+  ( + idx:INTEGER; 
+    + node:HASHED_SET_NODE(V);
+    + result:V;
+				
+    idx := e.hash_code % capacity;
+    node := buckets.item idx;
+    {(node = NULL) || {cmp.value (node.item,e)}}.until_do {
+      node := node.next;
+    };
+    (node != NULL).if {
+      result := node.item;
+    };
+    result
+  );
   
   //
   // To provide iterating facilities:
diff --git a/lib/kernel/i_dont_know_prototyping.li b/lib/kernel/i_dont_know_prototyping.li
index d0f380b..d95a0f6 100644
--- a/lib/kernel/i_dont_know_prototyping.li
+++ b/lib/kernel/i_dont_know_prototyping.li
@@ -66,7 +66,7 @@ Section Public
   // Print.
   //
   
-  - print str:ABSTRACT_STRING <-
+  - printf str:ABSTRACT_STRING <-
   (
     str.print;
   );
diff --git a/src/item/itm_slot.li b/src/item/itm_slot.li
index d8b1e1f..15d4350 100644
--- a/src/item/itm_slot.li
+++ b/src/item/itm_slot.li
@@ -139,11 +139,21 @@ Section Public
 	(other.position).put_position;
 	POSITION.send_error;
       };
-      (argument_list != NULL).if {
-	? {argument_list.count = other.argument_list.count};
-	(argument_list.lower).to (argument_list.upper) do { j:INTEGER;
-	  argument_list.item j.is_equal (other.argument_list.item j);
-	};	  
+      (
+        ((other.argument_list = NULL) ^ (argument_list = NULL)) || 
+        {(argument_list != NULL) && {argument_list.count != other.argument_list.count}}
+      ).if {
+        POSITION.put_error warning text 
+        "Invariance argument number.";
+        position.put_position;
+        (other.position).put_position;
+        POSITION.send_error;
+      } else {
+        (argument_list != NULL).if {        
+          (argument_list.lower).to (argument_list.upper) do { j:INTEGER;
+            argument_list.item j.is_equal (other.argument_list.item j);
+          };	  
+        };
       };
     };
   );
diff --git a/src/tools/types_tmp.li b/src/tools/types_tmp.li
index f1842b2..b0b9fbe 100644
--- a/src/tools/types_tmp.li
+++ b/src/tools/types_tmp.li
@@ -105,7 +105,7 @@ Section Public
     (is_empty).if {
       result := types_empty;    
     } else {
-      result := bucket.reference_at Self;
+      result := bucket.reference_at Self with { (e1,e2:TYPES); e1 ~= e2};
       (result = NULL).if {
 	result := TYPES.create Self;
 	bucket.fast_add result;
diff --git a/src/type/type_full.li b/src/type/type_full.li
index de113e8..150425c 100644
--- a/src/type/type_full.li
+++ b/src/type/type_full.li
@@ -243,7 +243,7 @@ Section Public
       }.elseif {is_expanded} then {
         // A: Expanded.
         result := 
-        ((other.is_strict)    && {raw == other.raw      }) ||
+        ((other.is_strict)    && {raw ~= other.raw      }) ||
         {(raw = type_boolean) && {other.is_sub_type Self}} ||
         {(raw = type_pointer) && {other.raw = TYPE_NULL }};	  
       } else {

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list