[SCM] Lisaac compiler branch, stable, updated. lisaac-0.12-563-g31b1d18
Mildred Ki'Lya
silkensedai at online.fr
Wed Nov 11 11:30:17 UTC 2009
The following commit has been merged in the stable branch:
commit 31b1d1880106cb3621454ff63b7744caff73f6ac
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date: Wed Nov 11 12:19:31 2009 +0100
Update -version flag to use externals instead of C constants
diff --git a/src/lisaac.li b/src/lisaac.li
index 7f7da2c..3b98e1d 100644
--- a/src/lisaac.li
+++ b/src/lisaac.li
@@ -639,16 +639,12 @@ Section Public
( + file_output:POINTER;
//+ entry:ENTRY;
+ begin_time,end_time:UINTEGER_64;
- + clk_date :DATE;
- + clk_time :TIME;
+ time:INTEGER;
+ txt:STRING;
+ s:LIP_SLOT_CODE;
ALIAS_STR.make;
- clk_date := CLOCK.date;
- clk_time := CLOCK.time;
begin_time := SYSTEM.get_universal_time;
//
@@ -680,17 +676,6 @@ Section Public
output_decl.append "private static String arg[];\n";
} else {
output_decl.copy "// C code generated by Lisaac compiler (www.isaacOS.com) //\n\n";
-
- output_decl.append "#define _LISAAC_COMPILE_DATE\n";
- output_decl.append "#define _LISAAC_COMPILE_DATE_YEAR "; clk_date.year.append_in output_decl; output_decl.add_last '\n';
- output_decl.append "#define _LISAAC_COMPILE_DATE_MONTH "; clk_date.month.append_in output_decl; output_decl.add_last '\n';
- output_decl.append "#define _LISAAC_COMPILE_DATE_DAY "; clk_date.day.append_in output_decl; output_decl.add_last '\n';
- output_decl.append "#define _LISAAC_COMPILE_DATE_WDAY "; clk_date.week_day.append_in output_decl; output_decl.add_last '\n';
- output_decl.append "#define _LISAAC_COMPILE_TIME "; clk_time.to_csecond.append_in output_decl; output_decl.add_last '\n';
- output_decl.append "#define _LISAAC_DEBUG_LEVEL "; debug_level_option.append_in output_decl; output_decl.add_last '\n';
- output_decl.append "#define _LISAAC_INLINE_LEVEL "; inline_level.append_in output_decl; output_decl.add_last '\n';
- output_decl.append "#define _LISAAC_DEBUG_CODE "; debug_with_code.to_integer.append_in output_decl; output_decl.add_last '\n';
- output_decl.append "#define _LISAAC_OPTIM "; is_optimization.to_integer.append_in output_decl; output_decl.add_last '\n';
output_decl.add_last '\n';
// Large file headers
diff --git a/src/tools/common.li b/src/tools/common.li
index 705817e..6433a79 100644
--- a/src/tools/common.li
+++ b/src/tools/common.li
@@ -74,43 +74,32 @@ Section Public
\Bug report: https://alioth.debian.org/projects/lisaac/ \n";
- print_info <-
- ( + b:BOOLEAN;
- + i:INTEGER;
- "Built on: ".print; compile_date.print; " ".print;
- compile_time.print; "\n".print;
- `
- #if defined(_LISAAC_DEBUG_LEVEL) && defined(_LISAAC_DEBUG_CODE)
- `;
- b := `_LISAAC_DEBUG_CODE`:BOOLEAN{TRUE,FALSE};
- i := `_LISAAC_DEBUG_LEVEL`:INTEGER;
- "Debug Level: ".print; i.print;
- b.if {
- " (with source code)".println;
+ ( + debug_code, lisaac_optim :STRING_CONSTANT;
+
+ compiler_debug_with_code.if {
+ debug_code := " (with source code)";
+ } else {
+ debug_code := " (without source code)";
+ };
+ compiler_optimization.if {
+ lisaac_optim := "yes";
} else {
- " (without source code)".println;
+ lisaac_optim := "no";
};
- `
- #endif
- #ifdef _LISAAC_INLINE_LEVEL
- `;
- i := `_LISAAC_INLINE_LEVEL`:INTEGER;
- "Inline Level: ".print; i.println;
- `
- #endif
- #ifdef _LISAAC_OPTIM
- `;
- i := `_LISAAC_OPTIM`:INTEGER;
- "Optimization Level: ".print; i.println;
- `
- #endif
- `;
+
+ "Built on: ".print; compile_date.print; " ".print;
+ compile_time.print; "\n".print;
+ "Debug Level: ".print; debug_level.print; debug_code.println;
+ "Inline Level: ".print; compiler_inlining_level.println;
+ "Lisaac optimizations: ".print; lisaac_optim.println;
+
'\n'.print;
(path_lisaac_builtin = path_lisaac).if {
- "Lisaac path: ".print; path_lisaac.println;
+ "Lisaac path: ".print; path_lisaac.println;
} else {
"Lisaac path:".println;
- " builtin: ".print; path_lisaac_builtin.println;
- " current: ".print; path_lisaac.println;
+ " builtin: ".print; path_lisaac_builtin.println;
+ " current: ".print; path_lisaac.println;
};
);
@@ -155,30 +144,3 @@ Section Public
};
path_lisaac
);
-
- - compile_time :TIME <-
- ( + i:INTEGER;
- `
- #ifdef _LISAAC_COMPILE_TIME
- `;
- i := `_LISAAC_COMPILE_TIME`:INTEGER;
- `
- #endif
- `;
- TIME.create_csecond i
- );
-
- - compile_date :DATE <-
- ( + i,j,k,l:INTEGER;
- `
- #ifdef _LISAAC_COMPILE_DATE
- `;
- i := `_LISAAC_COMPILE_DATE_YEAR`:INTEGER;
- j := `_LISAAC_COMPILE_DATE_MONTH`:INTEGER;
- k := `_LISAAC_COMPILE_DATE_DAY`:INTEGER;
- l := `_LISAAC_COMPILE_DATE_WDAY`:INTEGER;
- `
- #endif
- `;
- DATE.create (i, j, k, l)
- );
--
Lisaac compiler
More information about the Lisaac-commits
mailing list