[uim-commit] r1627 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Sep 27 17:21:40 PDT 2005
Author: yamaken
Date: 2005-09-27 17:21:36 -0700 (Tue, 27 Sep 2005)
New Revision: 1627
Modified:
branches/r5rs/sigscheme/TODO
branches/r5rs/sigscheme/datas.c
branches/r5rs/sigscheme/read.c
branches/r5rs/sigscheme/sigschemeinternal.h
Log:
* sigscheme/sigschemeinternal.h
- (DEBUG_PARSER, DEBUG_GC): Removed
* sigscheme/read.c
- (read_sexpression, read_list, read_char, read_string, read_symbol,
read_number_or_symbol, read_word, read_char_sequence): Replace
SigScm_CategorizedDebug() with CDBG(), and remove DEBUG_PARSER
* sigscheme/datas.c
- (allocate_heap, add_heap, gc_mark_and_sweep, gc_mark_locations,
gc_mark, gc_sweep): Replace
SigScm_CategorizedDebug() with CDBG(), and remove DEBUG_GC
* sigscheme/TODO
- Update
Modified: branches/r5rs/sigscheme/TODO
===================================================================
--- branches/r5rs/sigscheme/TODO 2005-09-28 00:06:04 UTC (rev 1626)
+++ branches/r5rs/sigscheme/TODO 2005-09-28 00:21:36 UTC (rev 1627)
@@ -6,9 +6,6 @@
- Rename call/cc with call/ec? ([Anthy-dev 2216])
- Implement assert-error in unittest.scm
- [uim] Make uim-sh loop workable even if error occurred
-
-* Support SIOD-compatible verbose message control (suppressing backtrace, GC
- stat, error, etc based on verbose-level)
- [uim] Make the GaUnit-based testing framework workable
*
Modified: branches/r5rs/sigscheme/datas.c
===================================================================
--- branches/r5rs/sigscheme/datas.c 2005-09-28 00:06:04 UTC (rev 1626)
+++ branches/r5rs/sigscheme/datas.c 2005-09-28 00:21:36 UTC (rev 1627)
@@ -226,9 +226,7 @@
int i = 0;
ScmObj heap, cell;
-#if DEBUG_GC
- SigScm_CategorizedDebug(SCM_DBG_GC, "allocate_heap num:%d size:%d", num_heap, HEAP_SIZE);
-#endif
+ CDBG((SCM_DBG_GC, "allocate_heap num:%d size:%d", num_heap, HEAP_SIZE));
/* allocate heap */
(*heaps) = (ScmObj*)malloc(sizeof(ScmObj) * num_heap);
@@ -258,9 +256,7 @@
int num_heap = 0;
ScmObj heap, cell;
-#if DEBUG_GC
- SigScm_CategorizedDebug(SCM_DBG_GC, "add_heap current num of heaps:%d", *orig_num_heap);
-#endif
+ CDBG((SCM_DBG_GC, "add_heap current num of heaps:%d", *orig_num_heap));
/* increment num_heap */
(*orig_num_heap) += 1;
@@ -321,9 +317,7 @@
static void gc_mark_and_sweep(void)
{
-#if DEBUG_GC
- SigScm_CategorizedDebug(SCM_DBG_GC, "[ gc start ]");
-#endif
+ CDBG((SCM_DBG_GC, "[ gc start ]"));
gc_preprocess();
gc_mark();
@@ -331,9 +325,7 @@
/* we cannot sweep the object, so let's add new heap */
if (NULLP(scm_freelist)) {
-#if DEBUG_GC
- SigScm_CategorizedDebug(SCM_DBG_GC, "Cannot sweep the object, allocating new heap.");
-#endif
+ CDBG((SCM_DBG_GC, "Cannot sweep the object, allocating new heap."));
add_heap(&scm_heaps, &scm_heap_num, SCM_HEAP_SIZE, &scm_freelist);
}
}
@@ -470,9 +462,7 @@
/* get size */
size = end - start;
-#if DEBUG_GC
- SigScm_CategorizedDebug(SCM_DBG_GC, "gc_mark_locations() : size = %d", size);
-#endif
+ CDBG((SCM_DBG_GC, "gc_mark_locations() : size = %d", size));
gc_mark_locations_n(start, size);
}
@@ -490,9 +480,7 @@
ScmObj stack_end;
void *save_regs_buf_end = (char *)save_regs_buf + sizeof(save_regs_buf);
-#if DEBUG_GC
- SigScm_CategorizedDebug(SCM_DBG_GC, "gc_mark()");
-#endif
+ CDBG((SCM_DBG_GC, "gc_mark()"));
setjmp(save_regs_buf);
gc_mark_locations((ScmObj *)save_regs_buf, (ScmObj *)save_regs_buf_end);
@@ -588,9 +576,7 @@
}
}
-#if DEBUG_GC
- SigScm_CategorizedDebug(SCM_DBG_GC, "heap[%d] swept = %d", i, corrected_obj_num);
-#endif
+ CDBG((SCM_DBG_GC, "heap[%d] swept = %d", i, corrected_obj_num));
}
scm_freelist = scm_new_freelist;
}
Modified: branches/r5rs/sigscheme/read.c
===================================================================
--- branches/r5rs/sigscheme/read.c 2005-09-28 00:06:04 UTC (rev 1626)
+++ branches/r5rs/sigscheme/read.c 2005-09-28 00:21:36 UTC (rev 1627)
@@ -164,16 +164,12 @@
int c = 0;
int c1 = 0;
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_sexpression");
-#endif
+ CDBG((SCM_DBG_PARSER, "read_sexpression"));
while (1) {
c = skip_comment_and_space(port);
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_sexpression c = %c", c);
-#endif
+ CDBG((SCM_DBG_PARSER, "read_sexpression c = %c", c));
switch (c) {
case '(':
@@ -244,16 +240,12 @@
int c2 = 0;
char *token = NULL;
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_list");
-#endif
+ CDBG((SCM_DBG_PARSER, "read_list"));
while (1) {
c = skip_comment_and_space(port);
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_list c = [%c]", c);
-#endif
+ CDBG((SCM_DBG_PARSER, "read_list c = [%c]", c));
if (c == EOF) {
if (SCM_PORTINFO_PORTTYPE(port) == PORT_FILE)
@@ -265,10 +257,7 @@
} else if (c == '.') {
c2 = 0;
SCM_PORT_GETC(port, c2);
-
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_list process_dot c2 = [%c]", c2);
-#endif
+ CDBG((SCM_DBG_PARSER, "read_list process_dot c2 = [%c]", c2));
if (isspace(c2) || c2 == '(' || c2 == '"' || c2 == ';') {
cdr = read_sexpression(port);
if (NULLP(list_tail))
@@ -316,9 +305,7 @@
{
char *ch = read_char_sequence(port);
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_char : ch = %s", ch);
-#endif
+ CDBG((SCM_DBG_PARSER, "read_char : ch = %s", ch));
/* check special sequence "space" and "newline" */
if (strcmp(ch, "space") == 0) {
@@ -345,16 +332,12 @@
int stringlen = 0;
int c = 0;
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_string");
-#endif
+ CDBG((SCM_DBG_PARSER, "read_string"));
while (1) {
SCM_PORT_GETC(port, c);
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_string c = %c", c);
-#endif
+ CDBG((SCM_DBG_PARSER, "read_string c = %c", c));
switch (c) {
case EOF:
@@ -402,9 +385,7 @@
ScmObj sym = Scm_Intern(sym_name);
free(sym_name);
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_symbol");
-#endif
+ CDBG((SCM_DBG_PARSER, "read_symbol"));
return sym;
}
@@ -417,9 +398,7 @@
char *first_nondigit = NULL;
ScmObj ret = SCM_NULL;
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_number_or_symbol");
-#endif
+ CDBG((SCM_DBG_PARSER, "read_number_or_symbol"));
/* read char sequence */
str = read_word(port);
@@ -448,9 +427,7 @@
while (1) {
SCM_PORT_GETC(port, c);
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "c = %c", c);
-#endif
+ CDBG((SCM_DBG_PARSER, "c = %c", c));
switch (c) {
case EOF: /* don't became an error for handling c-eval, like Scm_eval_c_string("some-symbol"); */
@@ -478,9 +455,7 @@
while (1) {
SCM_PORT_GETC(port, c);
-#if DEBUG_PARSER
- SigScm_CategorizedDebug(SCM_DBG_PARSER, "c = %c", c);
-#endif
+ CDBG((SCM_DBG_PARSER, "c = %c", c));
switch (c) {
case EOF:
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-28 00:06:04 UTC (rev 1626)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-28 00:21:36 UTC (rev 1627)
@@ -83,10 +83,6 @@
/*=======================================
Macro Declarations
=======================================*/
-/* Debugging Flags */
-#define DEBUG_PARSER SCM_DEBUG_PARSER
-#define DEBUG_GC SCM_DEBUG_GC
-
/* FreeCell Handling Macros */
#define SCM_FREECELLP(a) (SCM_TYPE(a) == ScmFreeCell)
#define SCM_AS_FREECELL(a) (SCM_ASSERT_TYPE(SCM_FREECELLP(a), (a)))
More information about the uim-commit
mailing list