[SCM] Lisaac compiler branch, living-external, updated. lisaac-0.12-548-gf6e3b14
Mildred Ki'Lya
silkensedai at online.fr
Thu Oct 8 17:06:16 UTC 2009
The following commit has been merged in the living-external branch:
commit 25be0ed1026996d75ef3112808aca79d71ebbea1
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date: Thu Oct 8 16:22:03 2009 +0200
Added hooks to have debug messages in PROFIL_LIST
diff --git a/src/profil_list.li b/src/profil_list.li
index b9b6bf3..6d5342b 100644
--- a/src/profil_list.li
+++ b/src/profil_list.li
@@ -51,11 +51,32 @@ Section Private
(
reduce_profil := profil_list.upper >= life_limit;
{profil_list.upper >= life_limit}.while_do {
+ debug_life (profil_list.last) message "Clean profil: ";
profil_list.last.remove;
! {profil_list.last.set_life_index (-1)};
profil_list.remove_last;
};
);
+
+ - debug_life p:PROFIL message msg:ABSTRACT_STRING <-
+ (
+ /*
+ ((p.slot != NULL) && {p.slot.name != NULL}).if {
+ string_tmp.copy msg;
+ string_tmp.add_last '[';
+ p.life_index.append_in string_tmp;
+ string_tmp.add_last '/';
+ immortal_limit.append_in string_tmp;
+ string_tmp.add_last '/';
+ life_limit.append_in string_tmp;
+ string_tmp.add_last ']';
+ string_tmp.add_last ' ';
+ p.display string_tmp;
+ string_tmp.print;
+ '\n'.print;
+ };
+ */
+ );
Section Public
@@ -65,6 +86,7 @@ Section Public
(
profil_list.add_last p;
p.set_life_index (profil_list.upper);
+ debug_life p message "Add profil: ";
);
- set_life p:PROFIL <-
@@ -73,7 +95,8 @@ Section Public
-? { profil_list.item (p.life_index) = p };
]
( + idx:INTEGER;
-
+
+ debug_life p message "Set profil life: ";
idx := p.life_index;
(idx = life_limit).if {
life_limit := life_limit + 1;
@@ -81,6 +104,7 @@ Section Public
swap idx with life_limit;
life_limit := life_limit + 1;
};
+ debug_life p message " ";
)
[
+? { profil_list.item (p.life_index) = p };
@@ -92,7 +116,8 @@ Section Public
-? { p.life_index != -1 };
]
( + idx:INTEGER;
-
+
+ debug_life p message "Unset profil life: ";
idx := p.life_index;
(idx < life_limit).if {
life_limit := life_limit - 1;
@@ -106,6 +131,7 @@ Section Public
};
};
};
+ debug_life p message " ";
);
- remove p:PROFIL <-
@@ -113,7 +139,8 @@ Section Public
-? { p.life_index != -1 };
]
( + idx:INTEGER;
-
+
+ debug_life p message "Remove profil: ";
unset_life p;
idx := p.life_index;
(idx != profil_list.upper).if {
@@ -174,6 +201,7 @@ Section Public
- genere_handler buffer:STRING <-
(
(profil_list.lower).to (profil_list.upper) do { j:INTEGER;
+ debug_life (profil_list.item j) message "Generate profil handler: ";
profil_list.item j.genere_handler buffer;
};
);
@@ -181,6 +209,7 @@ Section Public
- genere buffer:STRING <-
(
(profil_list.lower).to (profil_list.upper) do { j:INTEGER;
+ debug_life (profil_list.item j) message "Generate profil: ";
profil_list.item j.genere buffer;
};
);
--
Lisaac compiler
More information about the Lisaac-commits
mailing list