[SCM] Lisaac compiler branch, master, updated. lisaac-0.12-625-g95c5831
Benoit Sonntag
sonntag at icps.u-strasbg.fr
Sat Apr 17 20:56:45 UTC 2010
The following commit has been merged in the master branch:
commit 95c583111bcd6962575a860f5bb6d3e6ceb6f301
Author: Benoit Sonntag <sonntag at icps.u-strasbg.fr>
Date: Sat Apr 17 22:56:06 2010 +0200
bug Xav.
diff --git a/src/any.li b/src/any.li
index edd19a3..4db5a7c 100644
--- a/src/any.li
+++ b/src/any.li
@@ -89,6 +89,8 @@ Section Public
//
- late_binding_counter:INTEGER;
+ - late_binding_expanded_counter:INTEGER;
+ - late_binding_self_counter:INTEGER;
- null_counter:INTEGER;
diff --git a/src/dispatcher/node_type.li b/src/dispatcher/node_type.li
index 8549b5f..241e929 100644
--- a/src/dispatcher/node_type.li
+++ b/src/dispatcher/node_type.li
@@ -57,6 +57,15 @@ Section Public
expr := e;
data := d;
late_binding_counter := late_binding_counter + 1;
+ ((e.static_type.is_expanded) || {e.static_type.raw = type_boolean}).if {
+ late_binding_expanded_counter := late_binding_expanded_counter + 1;
+ } else {
+ + self:READ_LOCAL;
+ self ?= e;
+ ((self != NULL) && {self.variable.name = ALIAS_STR.variable_self}).if {
+ late_binding_self_counter := late_binding_self_counter + 1;
+ };
+ };
);
//
diff --git a/src/lisaac.li b/src/lisaac.li
index b619a82..47c8374 100644
--- a/src/lisaac.li
+++ b/src/lisaac.li
@@ -799,6 +799,8 @@ Section Public
STD_ERROR.put_string "\n";
print " Null call score : " stat null_counter for late_binding_counter;
print " Polymorphic call : " stat polymorphic_counter for late_binding_counter;
+ print " Call on Expanded : " stat late_binding_expanded_counter for late_binding_counter;
+ print " Call on Self : " stat late_binding_self_counter for late_binding_counter;
//
print " Recursivity function : "
stat (PROFIL.counter_recursivity_function) for (PROFIL.counter_function);
diff --git a/src/type/type.li b/src/type/type.li
index 59bd8f3..94cfd42 100644
--- a/src/type/type.li
+++ b/src/type/type.li
@@ -595,6 +595,29 @@ Section Public
};
};
};
+ (
+ (!parse_type_c "char") && {!parse_type_c "short"} && {!parse_type_c "int"} &&
+ {!parse_type_c "long"} && {!parse_type_c "float"} && {!parse_type_c "double"} &&
+ {!parse_type_c "void"}
+ ).if {
+ output_glob.append "__";
+ output_glob.append intern_name;
+ output_glob.add_last ' ';
+ output_glob.append intern_name;
+ output_glob.add_last '_';
+ output_glob.append ";\n";
+ output_glob.append "#define ";
+ output_glob.append intern_name;
+ output_glob.append "__ (&";
+ output_glob.append intern_name;
+ output_glob.append "_)\n";
+ output_glob.append "#define __";
+ output_glob.append intern_name;
+ output_glob.append "__ ";
+ id_counter_without_type.append_in output_glob;
+ id_counter_without_type := id_counter_without_type + 1;
+ output_glob.append "\n\n";
+ };
} else {
output_decl.append "/* ";
output_decl.append intern_name;
@@ -1290,4 +1313,21 @@ Section TYPE,PROTOTYPE
type_parent.verify_cyclic_inheritance ref;
idx := idx + 1;
};
+ );
+
+Section Private
+
+ - parse_type_c t:ABSTRACT_STRING :BOOLEAN <-
+ ( + idx,idx2:INTEGER;
+ + result:BOOLEAN;
+ idx := type_c.first_substring_index t;
+ (idx != 0).if {
+ ((idx=1) || {!type_c.item (idx - 1).is_letter_or_digit} || {!type_c.item (idx - 1) != '_').if {
+ idx2 := idx + type_c.count;
+ result := (
+ (idx2>type_c.upper) || {!type_c.item idx2.is_letter_or_digit} || {!type_c.item idx2 != '_'}
+ );
+ };
+ };
+ result
);
\ No newline at end of file
--
Lisaac compiler
More information about the Lisaac-commits
mailing list