[SCM] Lisaac compiler branch, master, updated. lisaac-0.12-385-g16ec326
Benoit Sonntag
sonntag at icps.u-strasbg.fr
Wed Aug 5 02:21:20 UTC 2009
The following commit has been merged in the master branch:
commit 16ec326fd3d0616b48a5761ce5a0d83bd094db0e
Author: Benoit Sonntag <sonntag at icps.u-strasbg.fr>
Date: Wed Aug 5 04:21:17 2009 +0200
bootstrap in Twilight Zone
diff --git a/lib/string/abstract_string.li b/lib/string/abstract_string.li
index 5afbb6a..2bdfbab 100644
--- a/lib/string/abstract_string.li
+++ b/lib/string/abstract_string.li
@@ -922,8 +922,6 @@ Section Public
- print <-
(
IO.put_string Self;
- print_runtime_stack;
- die_with_code 0;
);
- printline <-
diff --git a/src/code_life/list.li b/src/code_life/list.li
index f8489a7..a71461d 100644
--- a/src/code_life/list.li
+++ b/src/code_life/list.li
@@ -149,6 +149,15 @@ Section Public
new_depend_pass;
position := p;
expr_list := FAST_ARRAY[INSTR].create_with_capacity 2;
+ /*
+ "execute list #".print;
+ object_id.print; '\n'.print;
+ (object_id = 220500).if {
+ // crash_with_message "BUG!!!";
+ };
+ */
+
+
);
- my_copy:SELF <-
@@ -205,7 +214,7 @@ Section Public
- execute_case <-
( + new_expr:INSTR;
+ old_list_current:LIST;
-
+
//
seq_list.add_last Self;
seq_inline := seq_inline + 1;
diff --git a/src/code_life/switch.li b/src/code_life/switch.li
index 84591ae..f9f04dd 100644
--- a/src/code_life/switch.li
+++ b/src/code_life/switch.li
@@ -328,6 +328,24 @@ Section Public
buffer.add_last ' ';
buffer.append "break;\n";
};
+
+ ( + code:STRING_CONSTANT;
+ buffer.append indent;
+ buffer.append "default: ";
+ (debug_level_option != 0).if {
+ code :=
+ "stack_print(top_context); \
+ \print_string(\"Call on Twilight Zone\\n\"); \
+ \die_with_code(1);";
+ } else {
+ code :=
+ "print_string(\"Call on Twilight Zone\\n\
+ \(Use `debug' option)\\n\"); \
+ \die_with_code(1);";
+ };
+ buffer.append code;
+ );
+
buffer.append indent;
buffer.add_last '}';
(first_case != 0).if {
diff --git a/src/lisaac.li b/src/lisaac.li
index 745596a..76b2f62 100644
--- a/src/lisaac.li
+++ b/src/lisaac.li
@@ -443,7 +443,7 @@ Section Private
buf.append
"void push_first(_____CONTEXT *path,unsigned long code)\n\
- \{ \n";
+ \{ int n; _____CONTEXT *c; static int mx=0;\n";
(debug_level_option = 20).if {
buf.append
" _____CONTEXT *cur,loop;\n\
@@ -461,6 +461,10 @@ Section Private
" path->back = top_context;\n\
\ path->code = code;\n\
\ top_context = path;\n\
+ \ \n\
+ \ /*c = path; n=0;\n\
+ \ while (c != NULL) { n++; c = c->back; };\n\
+ \ if ((n > mx) ) { print_integer(n); print_string(\"\\n\"); mx = n; };*/ \n\
\} \n\
\ \n\
\void push(_____CONTEXT *path,unsigned long code)\n\
diff --git a/src2/code_life/switch.li b/src2/code_life/switch.li
index 831d112..aac2d42 100644
--- a/src2/code_life/switch.li
+++ b/src2/code_life/switch.li
@@ -328,6 +328,24 @@ Section Public
buffer.add_last ' ';
buffer.append "break;\n";
};
+
+ ( + code:STRING_CONSTANT;
+ buffer.append indent;
+ buffer.append "default: ";
+ (debug_level_option != 0).if {
+ code :=
+ "stack_print(top_context); \
+ \print_string(\"Call on Twilight Zone\\n\"); \
+ \die_with_code(1),";
+ } else {
+ code :=
+ "print_string(\"Call on Twilight Zone\\n\
+ \(Use `debug' option)\\n\"); \
+ \die_with_code(1);";
+ };
+ buffer.append code;
+ );
+
buffer.append indent;
buffer.add_last '}';
(first_case != 0).if {
diff --git a/src2/constant/integer_cst.li b/src2/constant/integer_cst.li
index a9b17e1..84d6030 100644
--- a/src2/constant/integer_cst.li
+++ b/src2/constant/integer_cst.li
@@ -135,7 +135,7 @@ Section Public
- cast_type p:TYPE_FULL <-
(
- ? { p.raw != type_integer };
+ // ? { p.raw != type_integer };
static_type := p;
check_type;
);
diff --git a/src2/type/type.li b/src2/type/type.li
index 95f3170..7935b3c 100644
--- a/src2/type/type.li
+++ b/src2/type/type.li
@@ -150,7 +150,13 @@ Section Public
{result = NULL}
}.while_do {
ts ?= slot_run.item j.result_type;
- typ := ts.to_run_for Self.raw;
+ typ := ts.to_run_for Self.raw;
+ (typ.prototype = NULL).if {
+ `/* ICI BEN */`;
+ typ.print; '\n'.print;
+ `/* ICI BEN FIN */`;
+ crash_with_message "TYPE: BUG Compiler : search_require";
+ };
result := typ.prototype.slot_list.fast_reference_at n;
((result = NULL) || {result.require = NULL}).if {
result := typ.search_require n;
--
Lisaac compiler
More information about the Lisaac-commits
mailing list