Fix omission of VM frames from backtrace
authorNeil Jerram <neil@ossau.uklinux.net>
Wed, 16 Sep 2009 23:14:16 +0000 (00:14 +0100)
committerNeil Jerram <neil@ossau.uklinux.net>
Wed, 16 Sep 2009 23:19:47 +0000 (00:19 +0100)
From the time when a #<program> was a SMOB, really_make_boot_program
in vm.c was still using SCM_SET_SMOB_FLAGS to set the
SCM_F_PROGRAM_IS_BOOT flag - which meant that it was setting flag
1<<32 :-) which obviously was then missed by the SCM_PROGRAM_IS_BOOT
calls in stacks.c.

* libguile/programs.h (SCM_F_PROGRAM_IS_BOOT): Use a less significant
  bit for this flag, now that programs use a tc7 type.

* libguile/vm.c (really_make_boot_program): Don't use
  SCM_SET_SMOB_FLAGS, now that programs aren't SMOBs.

libguile/programs.h
libguile/vm.c

index d52631f..c846c1b 100644 (file)
@@ -26,7 +26,7 @@
  * Programs
  */
 
-#define SCM_F_PROGRAM_IS_BOOT (1<<16)
+#define SCM_F_PROGRAM_IS_BOOT 0x100
 
 #define SCM_PROGRAM_P(x)       (!SCM_IMP (x) && SCM_TYP7(x) == scm_tc7_program)
 #define SCM_PROGRAM_OBJCODE(x) (SCM_CELL_OBJECT_1 (x))
index 4e4a361..d41c8cd 100644 (file)
@@ -203,7 +203,7 @@ really_make_boot_program (long nargs)
                              sizeof (struct scm_objcode) + sizeof (text));
   ret = scm_make_program (scm_bytecode_to_objcode (u8vec),
                           SCM_BOOL_F, SCM_BOOL_F);
-  SCM_SET_SMOB_FLAGS (ret, SCM_F_PROGRAM_IS_BOOT);
+  SCM_SET_CELL_WORD_0 (ret, SCM_CELL_WORD_0 (ret) | SCM_F_PROGRAM_IS_BOOT);
 
   return ret;
 }