Skip to content
Snippets Groups Projects
Commit f5e3627a authored by wlott's avatar wlott
Browse files

Added noise do deal with fixing the raw function address in symbols.

parent 5069c7dc
No related branches found
No related tags found
No related merge requests found
/* Purify. */ /* Purify. */
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/purify.c,v 1.3 1990/07/18 10:57:55 wlott Exp $ */ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/purify.c,v 1.4 1990/09/21 06:04:43 wlott Exp $ */
#include <mach.h> #include <mach.h>
...@@ -354,6 +354,20 @@ static lispobj ptrans_otherptr(thing, header) ...@@ -354,6 +354,20 @@ static lispobj ptrans_otherptr(thing, header)
} }
} }
static int pscav_symbol(symbol)
struct symbol *symbol;
{
#define RAW_ADDR_OFFSET (sizeof(struct function_header)-1-type_FunctionHeader)
if ((char *)(symbol->function + RAW_ADDR_OFFSET) == symbol->raw_function_addr) {
pscav(&symbol->value, sizeof(struct symbol)/sizeof(lispobj) - 1);
symbol->raw_function_addr = (char *)(symbol->function + RAW_ADDR_OFFSET);
return sizeof(struct symbol) / sizeof(lispobj);
}
else
return 1;
}
static int pscav_code(addr) static int pscav_code(addr)
lispobj *addr; lispobj *addr;
{ {
...@@ -425,6 +439,11 @@ static lispobj *pscav(addr, nwords) ...@@ -425,6 +439,11 @@ static lispobj *pscav(addr, nwords)
count = HeaderValue(thing)+1; count = HeaderValue(thing)+1;
break; break;
case type_SymbolHeader:
/* Symbols must have the raw function addr fixed up. */
count = pscav_symbol((struct symbol *)addr);
break;
case type_SimpleVector: case type_SimpleVector:
if (HeaderValue(thing) == subtype_VectorValidHashing) if (HeaderValue(thing) == subtype_VectorValidHashing)
*addr = (subtype_VectorMustRehash<<type_Bits) | *addr = (subtype_VectorMustRehash<<type_Bits) |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment