From: Taylor R Campbell Date: Thu, 22 Jul 2010 23:12:37 +0000 (+0000) Subject: Relax plausible_cc_block_p. X-Git-Tag: 20101212-Gtk~136 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=effdfb64a50216d4bbf8f7ebee629b43449849c9;p=mit-scheme.git Relax plausible_cc_block_p. Some leaf procedures and continuations do not have GC trap prefixes, so don't require the block in question to have one. On i386, this makes the trap handler successfully figure out where it is in (FIX:QUOTIENT 1 0). FIX:QUOTIENT is a leaf procedure, unlike FLO:/, although perhaps FIX:QUOTIENT ought to do checks and defer to the microcode primitive like FLO:/. --- diff --git a/src/microcode/cmpint.c b/src/microcode/cmpint.c index 6b840865b..7eea4d298 100644 --- a/src/microcode/cmpint.c +++ b/src/microcode/cmpint.c @@ -1691,11 +1691,11 @@ plausible_cc_block_p (SCHEME_OBJECT * block) if ((read_cc_entry_type ((&cet), entry)) || ((cet.marker) != CET_EXPRESSION)) { - entry += CC_ENTRY_GC_TRAP_SIZE; - if ((read_cc_entry_type ((&cet), entry)) - || (! (((cet.marker) == CET_PROCEDURE) - || ((cet.marker) == CET_CONTINUATION)))) - return (0); + insn_t * real_entry = (entry + CC_ENTRY_GC_TRAP_SIZE); + if ((! (read_cc_entry_type ((&cet), real_entry))) + && (((cet.marker) == CET_PROCEDURE) + || ((cet.marker) == CET_CONTINUATION))) + entry = real_entry; } } {