summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4f2c685)
* src/mes.c (scm_symbol_arch, scm_symbol_compiler): New symbol.
(mes_symbols, bload_env): Add them.
(scm_symbol_gnuc, scm_symbol_mesc): Remove.
* scaffold/mini-mes.c: Likewise.
* module/mes/mes-0.scm (%arch, %compiler): New public variable.
* tests/srfi-13.test: Expect number->string INT-MIN to fail for
gcc-x86.
* HACKING (Bugs): Add it.
+** mes: gcc-x86 compiled, tests/srfi-13.test number->string INT-MIN fails:
+test: number->string INT-MIN: fail
+expected: -2147483648
+actual: -./,),(-*,(
** tcc: tcc-built lib/libc+tcc.c segfaults with mes, with tcc.
** mes: remove pmatch-car/pmatch-cdr hack.
** mescc: softcode stack frame size, now hardcoded and very large
** tcc: tcc-built lib/libc+tcc.c segfaults with mes, with tcc.
** mes: remove pmatch-car/pmatch-cdr hack.
** mescc: softcode stack frame size, now hardcoded and very large
guile?
guile-1.8?
guile-2?
guile?
guile-1.8?
guile-2?
))
(define-macro (mes-use-module . rest) #t)
))
(define-macro (mes-use-module . rest) #t)
(define guile-2? (equal? (major-version) "2"))
(define EOF (if #f #f))
(define append2 append)
(define guile-2? (equal? (major-version) "2"))
(define EOF (if #f #f))
(define append2 append)
+(define %arch (car (string-split %host-type #\-)))
+(define %compiler "gcc")
struct scm scm_type_vector = {TSYMBOL, "<cell:vector>",0};
struct scm scm_type_broken_heart = {TSYMBOL, "<cell:broken-heart>",0};
struct scm scm_type_vector = {TSYMBOL, "<cell:vector>",0};
struct scm scm_type_broken_heart = {TSYMBOL, "<cell:broken-heart>",0};
-struct scm scm_symbol_gnuc = {TSYMBOL, "%gnuc",0};
-struct scm scm_symbol_mesc = {TSYMBOL, "%mesc",0};
+struct scm scm_symbol_compiler = {TSYMBOL, "%compiler",0};
+struct scm scm_symbol_arch = {TSYMBOL, "%arch",0};
struct scm scm_test = {TSYMBOL, "test",0};
struct scm scm_test = {TSYMBOL, "test",0};
a = acons (cell_symbol_call_with_current_continuation, cell_call_with_current_continuation, a);
a = acons (cell_symbol_sc_expand, cell_f, a);
a = acons (cell_symbol_call_with_current_continuation, cell_call_with_current_continuation, a);
a = acons (cell_symbol_sc_expand, cell_f, a);
-#if __GNUC__
- a = acons (cell_symbol_gnuc, cell_t, a);
- a = acons (cell_symbol_mesc, cell_f, a);
-#else
- a = acons (cell_symbol_gnuc, cell_f, a);
- a = acons (cell_symbol_mesc, cell_t, a);
+ char *compiler = "gcc";
+#if __MESC__
+ compiler = "mescc";
+#elif __TINYC__
+ compiler = "tcc";
+#endif
+ a = acons (cell_symbol_compiler, MAKE_STRING (cstring_to_list (compiler)), a);
+
+ char *arch = "x86";
+#if __x86_64__
+ arch = "x86_64";
+ a = acons (cell_symbol_arch, MAKE_STRING (cstring_to_list (arch)), a);
a = acons (cell_closure, a, a);
a = acons (cell_closure, a, a);
g_stdin = STDIN;
r0 = mes_builtins (r0);
g_stdin = STDIN;
r0 = mes_builtins (r0);
-#if __GNUC__
- set_env_x (cell_symbol_gnuc, cell_t, r0);
- set_env_x (cell_symbol_mesc, cell_f, r0);
-#else
- set_env_x (cell_symbol_gnuc, cell_f, r0);
- set_env_x (cell_symbol_mesc, cell_t, r0);
+ char *compiler = "gcc";
+#if __MESC__
+ compiler = "mescc";
+#elif __TINYC__
+ compiler = "tcc";
+#endif
+ set_env_x (cell_symbol_compiler, MAKE_STRING (cstring_to_list (compiler)), r0);
+
+ char *arch = "x86";
+#if __x86_64__
+ arch = "x86_64";
+ set_env_x (cell_symbol_arch, MAKE_STRING (cstring_to_list (arch)), r0);
struct scm scm_type_vector = {TSYMBOL, "<cell:vector>",0};
struct scm scm_type_broken_heart = {TSYMBOL, "<cell:broken-heart>",0};
struct scm scm_type_vector = {TSYMBOL, "<cell:vector>",0};
struct scm scm_type_broken_heart = {TSYMBOL, "<cell:broken-heart>",0};
-struct scm scm_symbol_gnuc = {TSYMBOL, "%gnuc",0};
-struct scm scm_symbol_mesc = {TSYMBOL, "%mesc",0};
+struct scm scm_symbol_compiler = {TSYMBOL, "%compiler",0};
+struct scm scm_symbol_arch = {TSYMBOL, "%arch",0};
-struct scm scm_test = {TSYMBOL, "test",0};
+struct scm scm_test = {TSYMBOL, "%%test",0};
#if !_POSIX_SOURCE
#include "mes.mes.symbols.h"
#if !_POSIX_SOURCE
#include "mes.mes.symbols.h"
g_cells[cell_vm_return] = scm_vm_return;
g_free++;
g_cells[cell_vm_return] = scm_vm_return;
g_free++;
-g_cells[cell_symbol_gnuc] = scm_symbol_gnuc;
+g_cells[cell_symbol_compiler] = scm_symbol_compiler;
-g_cells[cell_symbol_mesc] = scm_symbol_mesc;
+g_cells[cell_symbol_arch] = scm_symbol_arch;
g_free++;
g_cells[cell_test] = scm_test;
g_free++;
g_cells[cell_test] = scm_test;
g_cells[cell_vm_call_with_current_continuation2].car = g_cells[cell_vm_evlis].car;
g_cells[cell_vm_return].car = g_cells[cell_vm_evlis].car;
g_cells[cell_vm_call_with_current_continuation2].car = g_cells[cell_vm_evlis].car;
g_cells[cell_vm_return].car = g_cells[cell_vm_evlis].car;
-g_cells[cell_symbol_gnuc].car = cstring_to_list (scm_symbol_gnuc.name);
-g_cells[cell_symbol_mesc].car = cstring_to_list (scm_symbol_mesc.name);
+g_cells[cell_symbol_compiler].car = cstring_to_list (scm_symbol_compiler.name);
+g_cells[cell_symbol_arch].car = cstring_to_list (scm_symbol_arch.name);
g_cells[cell_test].car = cstring_to_list (scm_test.name);
////////////////// gc
g_cells[cell_test].car = cstring_to_list (scm_test.name);
////////////////// gc
a = acons (cell_symbol_mes_version, MAKE_STRING (cstring_to_list (VERSION)), a);
a = acons (cell_symbol_mes_prefix, MAKE_STRING (cstring_to_list (PREFIX)), a);
a = acons (cell_symbol_mes_version, MAKE_STRING (cstring_to_list (VERSION)), a);
a = acons (cell_symbol_mes_prefix, MAKE_STRING (cstring_to_list (PREFIX)), a);
-#if __GNUC__
- a = acons (cell_symbol_gnuc, cell_t, a);
- a = acons (cell_symbol_mesc, cell_f, a);
-#else
- a = acons (cell_symbol_gnuc, cell_f, a);
+ char *compiler = "gcc";
+#if __MESC__
+ compiler = "mescc";
+#elif __TINYC__
+ compiler = "tcc";
+#endif
+ a = acons (cell_symbol_compiler, MAKE_STRING (cstring_to_list (compiler)), a);
+ char *arch = "x86";
+#if __x86_64__
+ arch = "x86_64";
+ a = acons (cell_symbol_arch, MAKE_STRING (cstring_to_list (arch)), a);
+
#endif // !MES_MINI
a = acons (cell_type_char, MAKE_NUMBER (TCHAR), a);
#endif // !MES_MINI
a = acons (cell_type_char, MAKE_NUMBER (TCHAR), a);
g_stdin = STDIN;
r0 = mes_builtins (r0);
g_stdin = STDIN;
r0 = mes_builtins (r0);
-#if __GNUC__
- set_env_x (cell_symbol_gnuc, cell_t, r0);
- set_env_x (cell_symbol_mesc, cell_f, r0);
-#else
- set_env_x (cell_symbol_gnuc, cell_f, r0);
- set_env_x (cell_symbol_mesc, cell_t, r0);
+ char *compiler = "gcc";
+#if __MESC__
+ compiler = "mescc";
+#elif __TINYC__
+ compiler = "tcc";
+#endif
+ a = acons (cell_symbol_compiler, MAKE_STRING (cstring_to_list (compiler)), a);
+
+ char *arch = "x86";
+#if __x86_64__
+ arch = "x86_64";
+ a = acons (cell_symbol_arch, MAKE_STRING (cstring_to_list (arch)), a);
(pass-if-equal "string-replace" "fubar"
(string-replace "foobar" "u" 1 3))
(pass-if-equal "string-replace" "fubar"
(string-replace "foobar" "u" 1 3))
+(result 'report (if (and (equal? %compiler "gcc") (equal? %arch "x86")) 1 0))