X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fprint.c;h=73ec03ba560e9c84ff37953a8c5d428a6aa6d582;hb=6127c0b282bb6d7fa6d225ee91d0a601d9b82360;hp=8e3ba511b7a52615b5d53c3a5b9be5c9cfe25887;hpb=eb7b749ab699ed56499c608e1ec4c36870e99aed;p=sbcl.git diff --git a/src/runtime/print.c b/src/runtime/print.c index 8e3ba51..73ec03b 100644 --- a/src/runtime/print.c +++ b/src/runtime/print.c @@ -237,7 +237,8 @@ static void print_fixnum(lispobj obj) static void brief_otherimm(lispobj obj) { - int type, c, idx; + int type, c; + unsigned int idx; char buffer[10]; type = widetag_of(obj); @@ -288,7 +289,9 @@ static void brief_otherimm(lispobj obj) static void print_otherimm(lispobj obj) { - int type, idx; + int type; + + unsigned int idx; type = widetag_of(obj); idx = type >> 2; @@ -335,7 +338,7 @@ static void brief_list(lispobj obj) obj = NIL; break; } - print_obj(NULL, cons->car); + print_obj("", cons->car); obj = cons->cdr; space = 1; if (obj == NIL) @@ -343,16 +346,18 @@ static void brief_list(lispobj obj) } if (obj != NIL) { printf(" . "); - print_obj(NULL, obj); + print_obj("", obj); } putchar(')'); } } +#ifdef LISP_FEATURE_X86_64 static void print_unknown(lispobj obj) { - printf("unknown object: %p", obj); + printf("unknown object: %p", (void *)obj); } +#endif static void print_list(lispobj obj) { @@ -377,7 +382,7 @@ static void brief_struct(lispobj obj) static void print_struct(lispobj obj) { struct instance *instance = (struct instance *)native_pointer(obj); - int i; + unsigned int i; char buffer[16]; print_obj("type: ", ((struct instance *)native_pointer(obj))->slots[0]); for (i = 1; i < HeaderValue(instance->header); i++) { @@ -729,8 +734,10 @@ static void print_obj(char *prefix, lispobj obj) dont_descend = 1; if (var == NULL && - /* FIXME: What does this "x & y & z & .." expression mean? */ - (obj & FUN_POINTER_LOWTAG & LIST_POINTER_LOWTAG & INSTANCE_POINTER_LOWTAG & OTHER_POINTER_LOWTAG) != 0) + ((obj & LOWTAG_MASK) == FUN_POINTER_LOWTAG || + (obj & LOWTAG_MASK) == LIST_POINTER_LOWTAG || + (obj & LOWTAG_MASK) == INSTANCE_POINTER_LOWTAG || + (obj & LOWTAG_MASK) == OTHER_POINTER_LOWTAG)) var = define_var(NULL, obj, 0); if (var != NULL)