-struct timeval start_tv, stop_tv;
- struct rusage start_rusage, stop_rusage;
- double real_time, system_time, user_time;
- double percent_retained, gc_rate;
- unsigned long size_discarded;
- unsigned long size_retained;
-#endif
- lispobj *current_static_space_free_pointer;
- unsigned long static_space_size;
- unsigned long control_stack_size, binding_stack_size;
- sigset_t tmp, old;
+ struct timeval start_tv, stop_tv;
+ struct rusage start_rusage, stop_rusage;
+ double real_time, system_time, user_time;
+ double percent_retained, gc_rate;
+ unsigned long size_discarded;
+ unsigned long size_retained;
+#endif
+ lispobj *current_static_space_free_pointer;
+ unsigned long static_space_size;
+ unsigned long control_stack_size, binding_stack_size;
+ sigset_t tmp, old;
- fprintf(stderr,"from_space = %lx\n",
- (unsigned long) current_dynamic_space);
-#endif
- if (current_dynamic_space == (lispobj *) DYNAMIC_0_SPACE_START)
- new_space = (lispobj *)DYNAMIC_1_SPACE_START;
- else if (current_dynamic_space == (lispobj *) DYNAMIC_1_SPACE_START)
- new_space = (lispobj *) DYNAMIC_0_SPACE_START;
- else {
- lose("GC lossage. Current dynamic space is bogus!\n");
- }
- new_space_free_pointer = new_space;
+ fprintf(stderr,"from_space = %lx\n",
+ (unsigned long) current_dynamic_space);
+#endif
+ if (current_dynamic_space == (lispobj *) DYNAMIC_0_SPACE_START)
+ new_space = (lispobj *)DYNAMIC_1_SPACE_START;
+ else if (current_dynamic_space == (lispobj *) DYNAMIC_1_SPACE_START)
+ new_space = (lispobj *) DYNAMIC_0_SPACE_START;
+ else {
+ lose("GC lossage. Current dynamic space is bogus!\n");
+ }
+ new_space_free_pointer = new_space;
+#if 0
+ /* at one time we had the bright idea of using mprotect() to
+ * hide the semispace that we're not using at the moment, so
+ * we'd see immediately if anyone had a pointer to it.
+ * Unfortunately, if we gc during a call to an assembler
+ * routine with a "raw" return style, at least on PPC we are
+ * expected to return into oldspace because we can't easily
+ * update the link register - it's not tagged, and we can't do
+ * it as an offset of reg_CODE because the calling routine
+ * might be nowhere near our code vector. We hope that we
+ * don't run very far in oldspace before it catapults us into
+ * newspace by either calling something else or returning
+ */
- printf("Statistics:\n");
- printf("%10.2f sec of real time\n", real_time);
- printf("%10.2f sec of user time,\n", user_time);
- printf("%10.2f sec of system time.\n", system_time);
+ printf("Statistics:\n");
+ printf("%10.2f sec of real time\n", real_time);
+ printf("%10.2f sec of user time,\n", user_time);
+ printf("%10.2f sec of system time.\n", system_time);
- fprintf(stderr,"Scavenging object at 0x%08x, object = 0x%08x, type = %d\n",
- (unsigned long) start, (unsigned long) object, type);
-#endif
-
- if (is_lisp_pointer(object)) {
- /* It be a pointer. */
- if (from_space_p(object)) {
- /* It currently points to old space. Check for a */
- /* forwarding pointer. */
- lispobj first_word;
-
- first_word = *((lispobj *)native_pointer(object));
- if (is_lisp_pointer(first_word) &&
- new_space_p(first_word)) {
- /* Yep, there be a forwarding pointer. */
- *start = first_word;
- words_scavenged = 1;
- }
- else {
- /* Scavenge that pointer. */
- words_scavenged = (scavtab[type])(start, object);
- }
- }
- else {
- /* It points somewhere other than oldspace. Leave */
- /* it alone. */
- words_scavenged = 1;
- }
- }
- else if(nwords==1) {
- /* there are some situations where an
- other-immediate may end up in a descriptor
- register. I'm not sure whether this is
- supposed to happen, but if it does then we
- don't want to (a) barf or (b) scavenge over the
- data-block, because there isn't one. So, if
- we're checking a single word and it's anything
- other than a pointer, just hush it up */
-
- words_scavenged=1;
- if((scavtab[type]==scav_lose) ||
- (((scavtab[type])(start,object))>1)) {
- fprintf(stderr,"warning: attempted to scavenge non-descriptor value %x at %p. If you can\nreproduce this warning, send a test case to sbcl-devel@lists.sourceforge.net\n",
- object,start);
- }
+ fprintf(stderr,"Scavenging object at 0x%08x, object = 0x%08x, type = %d\n",
+ (unsigned long) start, (unsigned long) object, type);
+#endif
+
+ if (is_lisp_pointer(object)) {
+ /* It be a pointer. */
+ if (from_space_p(object)) {
+ /* It currently points to old space. Check for a */
+ /* forwarding pointer. */
+ lispobj first_word;
+
+ first_word = *((lispobj *)native_pointer(object));
+ if (is_lisp_pointer(first_word) &&
+ new_space_p(first_word)) {
+ /* Yep, there be a forwarding pointer. */
+ *start = first_word;
+ words_scavenged = 1;
- else if ((object & 3) == 0) {
- /* It's a fixnum. Real easy. */
- words_scavenged = 1;
- }
- else {
- /* It's some random header object. */
- words_scavenged = (scavtab[type])(start, object);
-
- }
-
- start += words_scavenged;
- nwords -= words_scavenged;
+ else {
+ /* Scavenge that pointer. */
+ words_scavenged = (scavtab[type])(start, object);
+ }
+ }
+ else {
+ /* It points somewhere other than oldspace. Leave */
+ /* it alone. */
+ words_scavenged = 1;
+ }
+ }
+ else if (nwords==1) {
+ /* there are some situations where an
+ other-immediate may end up in a descriptor
+ register. I'm not sure whether this is
+ supposed to happen, but if it does then we
+ don't want to (a) barf or (b) scavenge over the
+ data-block, because there isn't one. So, if
+ we're checking a single word and it's anything
+ other than a pointer, just hush it up */
+
+ words_scavenged=1;
+ if ((scavtab[type]==scav_lose) ||
+ (((scavtab[type])(start,object))>1)) {
+ fprintf(stderr,"warning: attempted to scavenge non-descriptor value %x at %p. If you can\nreproduce this warning, send a test case to sbcl-devel@lists.sourceforge.net\n",
+ object,start);
+ }
+ }
+ else if ((object & 3) == 0) {
+ /* It's a fixnum. Real easy. */
+ words_scavenged = 1;
+ }
+ else {
+ /* It's some random header object. */
+ words_scavenged = (scavtab[type])(start, object);
+
- lip = *os_context_register_addr(context, reg_LIP);
- /* 0x7FFFFFFF or 0x7FFFFFFFFFFFFFFF ? */
- lip_offset = 0x7FFFFFFF;
- lip_register_pair = -1;
- for (i = 0; i < (sizeof(boxed_registers) / sizeof(int)); i++) {
- unsigned long reg;
- long offset;
- int index;
-
- index = boxed_registers[i];
- reg = *os_context_register_addr(context, index);
- /* would be using PTR if not for integer length issues */
- if ((reg & ~((1L<<N_LOWTAG_BITS)-1)) <= lip) {
- offset = lip - reg;
- if (offset < lip_offset) {
- lip_offset = offset;
- lip_register_pair = index;
- }
- }
+ lip = *os_context_register_addr(context, reg_LIP);
+ /* 0x7FFFFFFF or 0x7FFFFFFFFFFFFFFF ? */
+ lip_offset = 0x7FFFFFFF;
+ lip_register_pair = -1;
+ for (i = 0; i < (sizeof(boxed_registers) / sizeof(int)); i++) {
+ unsigned long reg;
+ long offset;
+ int index;
+
+ index = boxed_registers[i];
+ reg = *os_context_register_addr(context, index);
+ /* would be using PTR if not for integer length issues */
+ if ((reg & ~((1L<<N_LOWTAG_BITS)-1)) <= lip) {
+ offset = lip - reg;
+ if (offset < lip_offset) {
+ lip_offset = offset;
+ lip_register_pair = index;
+ }
-#endif reg_LIP
-
- /* Compute the PC's offset from the start of the CODE */
- /* register. */
- pc_code_offset = *os_context_pc_addr(context) -
- *os_context_register_addr(context, reg_CODE);
-#ifdef SC_NPC
- npc_code_offset = SC_NPC(context) - SC_REG(context, reg_CODE);
-#endif SC_NPC
+ }
+#endif /* reg_LIP */
+
+ /* Compute the PC's offset from the start of the CODE */
+ /* register. */
+ pc_code_offset =
+ *os_context_pc_addr(context) -
+ *os_context_register_addr(context, reg_CODE);
+#ifdef ARCH_HAS_NPC_REGISTER
+ npc_code_offset =
+ *os_context_npc_addr(context) -
+ *os_context_register_addr(context, reg_CODE);
+#endif
+#ifdef ARCH_HAS_LINK_REGISTER
+ lr_code_offset =
+ *os_context_lr_addr(context) -
+ *os_context_register_addr(context, reg_CODE);
+#endif
- index = boxed_registers[i];
- foo = *os_context_register_addr(context,index);
- scavenge((lispobj *) &foo, 1);
- *os_context_register_addr(context,index) = foo;
+ index = boxed_registers[i];
+ foo = *os_context_register_addr(context,index);
+ scavenge((lispobj *) &foo, 1);
+ *os_context_register_addr(context,index) = foo;
- /* Fix the PC if it was in from space */
- if (from_space_p(*os_context_pc_addr(context)))
- *os_context_pc_addr(context) =
- *os_context_register_addr(context, reg_CODE) + pc_code_offset;
-#ifdef SC_NPC
- if (from_space_p(SC_NPC(context)))
- SC_NPC(context) = SC_REG(context, reg_CODE) + npc_code_offset;
-#endif SC_NPC
+ /* Fix the PC if it was in from space */
+ if (from_space_p(*os_context_pc_addr(context)))
+ *os_context_pc_addr(context) =
+ *os_context_register_addr(context, reg_CODE) + pc_code_offset;
+#ifdef ARCH_HAS_LINK_REGISTER
+ /* Fix the LR ditto; important if we're being called from
+ * an assembly routine that expects to return using blr, otherwise
+ * harmless */
+ if (from_space_p(*os_context_lr_addr(context)))
+ *os_context_lr_addr(context) =
+ *os_context_register_addr(context, reg_CODE) + lr_code_offset;
+#endif
+
+#ifdef ARCH_HAS_NPC_REGISTER
+ if (from_space_p(*os_context_npc_addr(context)))
+ *os_context_npc_addr(context) =
+ *os_context_register_addr(context, reg_CODE) + npc_code_offset;
+#endif
- lispobj *start;
- int total_words_not_copied;
-
- printf("Scanning from space ...\n");
-
- total_words_not_copied = 0;
- start = from_space;
- while (start < from_space_free_pointer) {
- lispobj object;
- int forwardp, type, nwords;
- lispobj header;
-
- object = *start;
- forwardp = is_lisp_pointer(object) && new_space_p(object);
-
- if (forwardp) {
- int tag;
- lispobj *pointer;
-
- tag = lowtag_of(object);
-
- switch (tag) {
- case LIST_POINTER_LOWTAG:
- nwords = 2;
- break;
- case INSTANCE_POINTER_LOWTAG:
- printf("Don't know about instances yet!\n");
- nwords = 1;
- break;
- case FUN_POINTER_LOWTAG:
- nwords = 1;
- break;
- case OTHER_POINTER_LOWTAG:
- pointer = (lispobj *) native_pointer(object);
- header = *pointer;
- type = widetag_of(header);
- nwords = (sizetab[type])(pointer);
- }
- } else {
- type = widetag_of(object);
- nwords = (sizetab[type])(start);
- total_words_not_copied += nwords;
- printf("%4d words not copied at 0x%16lx; ",
- nwords, (unsigned long) start);
- printf("Header word is 0x%08x\n",
- (unsigned int) object);
- }
- start += nwords;
+ lispobj *start;
+ int total_words_not_copied;
+
+ printf("Scanning from space ...\n");
+
+ total_words_not_copied = 0;
+ start = from_space;
+ while (start < from_space_free_pointer) {
+ lispobj object;
+ int forwardp, type, nwords;
+ lispobj header;
+
+ object = *start;
+ forwardp = is_lisp_pointer(object) && new_space_p(object);
+
+ if (forwardp) {
+ int tag;
+ lispobj *pointer;
+
+ tag = lowtag_of(object);
+
+ switch (tag) {
+ case LIST_POINTER_LOWTAG:
+ nwords = 2;
+ break;
+ case INSTANCE_POINTER_LOWTAG:
+ printf("Don't know about instances yet!\n");
+ nwords = 1;
+ break;
+ case FUN_POINTER_LOWTAG:
+ nwords = 1;
+ break;
+ case OTHER_POINTER_LOWTAG:
+ pointer = (lispobj *) native_pointer(object);
+ header = *pointer;
+ type = widetag_of(header);
+ nwords = (sizetab[type])(pointer);
+ }
+ } else {
+ type = widetag_of(object);
+ nwords = (sizetab[type])(start);
+ total_words_not_copied += nwords;
+ printf("%4d words not copied at 0x%16lx; ",
+ nwords, (unsigned long) start);
+ printf("Header word is 0x%08x\n",
+ (unsigned int) object);
- type = widetag_of(first);
- switch (type) {
- case SIMPLE_FUN_HEADER_WIDETAG:
- case CLOSURE_FUN_HEADER_WIDETAG:
- copy = trans_fun_header(object);
- break;
- default:
- copy = trans_boxed(object);
- break;
- }
+ type = widetag_of(first);
+ switch (type) {
+ case SIMPLE_FUN_HEADER_WIDETAG:
+ case CLOSURE_FUN_HEADER_WIDETAG:
+ copy = trans_fun_header(object);
+ break;
+ default:
+ copy = trans_boxed(object);
+ break;
+ }
- struct code *new_code;
- lispobj first, l_code, l_new_code;
- int nheader_words, ncode_words, nwords;
- unsigned long displacement;
- lispobj fheaderl, *prev_pointer;
+ struct code *new_code;
+ lispobj first, l_code, l_new_code;
+ int nheader_words, ncode_words, nwords;
+ unsigned long displacement;
+ lispobj fheaderl, *prev_pointer;
- printf("Old code object at 0x%08x, new code object at 0x%08x.\n",
- (unsigned long) code, (unsigned long) new_code);
- printf("Code object is %d words long.\n", nwords);
+ printf("Old code object at 0x%08x, new code object at 0x%08x.\n",
+ (unsigned long) code, (unsigned long) new_code);
+ printf("Code object is %d words long.\n", nwords);
- code = (struct code *) where;
- ncode_words = fixnum_value(code->code_size);
- nheader_words = HeaderValue(object);
- nwords = ncode_words + nheader_words;
- nwords = CEILING(nwords, 2);
+ code = (struct code *) where;
+ ncode_words = fixnum_value(code->code_size);
+ nheader_words = HeaderValue(object);
+ nwords = ncode_words + nheader_words;
+ nwords = CEILING(nwords, 2);
- printf("\nScavening code object at 0x%08x.\n",
- (unsigned long) where);
- printf("Code object is %d words long.\n", nwords);
- printf("Scavenging boxed section of code data block (%d words).\n",
- nheader_words - 1);
-#endif
-
- /* Scavenge the boxed section of the code data block */
- scavenge(where + 1, nheader_words - 1);
-
- /* Scavenge the boxed section of each function object in the */
- /* code data block */
- fheaderl = code->entry_points;
- while (fheaderl != NIL) {
- fheaderp = (struct simple_fun *) native_pointer(fheaderl);
- gc_assert(widetag_of(fheaderp->header) == SIMPLE_FUN_HEADER_WIDETAG);
+ printf("\nScavening code object at 0x%08x.\n",
+ (unsigned long) where);
+ printf("Code object is %d words long.\n", nwords);
+ printf("Scavenging boxed section of code data block (%d words).\n",
+ nheader_words - 1);
+#endif
+
+ /* Scavenge the boxed section of the code data block */
+ scavenge(where + 1, nheader_words - 1);
+
+ /* Scavenge the boxed section of each function object in the */
+ /* code data block */
+ fheaderl = code->entry_points;
+ while (fheaderl != NIL) {
+ fheaderp = (struct simple_fun *) native_pointer(fheaderl);
+ gc_assert(widetag_of(fheaderp->header) == SIMPLE_FUN_HEADER_WIDETAG);
- /* Now, we need to check if the object has been */
- /* forwarded. If it has been, the weak pointer is */
- /* still good and needs to be updated. Otherwise, the */
- /* weak pointer needs to be nil'ed out. */
+ /* Now, we need to check if the object has been */
+ /* forwarded. If it has been, the weak pointer is */
+ /* still good and needs to be updated. Otherwise, the */
+ /* weak pointer needs to be nil'ed out. */
- int i;
-
- /* scavenge table */
- for (i = 0; i < 256; i++)
- scavtab[i] = scav_lose;
- /* scavtab[i] = scav_immediate; */
-
- for (i = 0; i < 32; i++) {
- scavtab[EVEN_FIXNUM_LOWTAG|(i<<3)] = scav_immediate;
- scavtab[FUN_POINTER_LOWTAG|(i<<3)] = scav_fun_pointer;
- /* skipping OTHER_IMMEDIATE_0_LOWTAG */
- scavtab[LIST_POINTER_LOWTAG|(i<<3)] = scav_list_pointer;
- scavtab[ODD_FIXNUM_LOWTAG|(i<<3)] = scav_immediate;
- scavtab[INSTANCE_POINTER_LOWTAG|(i<<3)] =scav_instance_pointer;
- /* skipping OTHER_IMMEDIATE_1_LOWTAG */
- scavtab[OTHER_POINTER_LOWTAG|(i<<3)] = scav_other_pointer;
- }
+ int i;
+
+ /* scavenge table */
+ for (i = 0; i < 256; i++)
+ scavtab[i] = scav_lose;
+ /* scavtab[i] = scav_immediate; */
+
+ for (i = 0; i < 32; i++) {
+ scavtab[EVEN_FIXNUM_LOWTAG|(i<<3)] = scav_immediate;
+ scavtab[FUN_POINTER_LOWTAG|(i<<3)] = scav_fun_pointer;
+ /* skipping OTHER_IMMEDIATE_0_LOWTAG */
+ scavtab[LIST_POINTER_LOWTAG|(i<<3)] = scav_list_pointer;
+ scavtab[ODD_FIXNUM_LOWTAG|(i<<3)] = scav_immediate;
+ scavtab[INSTANCE_POINTER_LOWTAG|(i<<3)] =scav_instance_pointer;
+ /* skipping OTHER_IMMEDIATE_1_LOWTAG */
+ scavtab[OTHER_POINTER_LOWTAG|(i<<3)] = scav_other_pointer;
+ }
- scavtab[COMPLEX_LONG_FLOAT_WIDETAG] = scav_unboxed;
-#endif
- scavtab[SIMPLE_ARRAY_WIDETAG] = scav_boxed;
- scavtab[SIMPLE_STRING_WIDETAG] = scav_string;
- scavtab[SIMPLE_BIT_VECTOR_WIDETAG] = scav_vector_bit;
- scavtab[SIMPLE_VECTOR_WIDETAG] = scav_vector;
- scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_2_WIDETAG] =
- scav_vector_unsigned_byte_2;
- scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_4_WIDETAG] =
- scav_vector_unsigned_byte_4;
- scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG] =
- scav_vector_unsigned_byte_8;
- scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG] =
- scav_vector_unsigned_byte_16;
- scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG] =
- scav_vector_unsigned_byte_32;
+ scavtab[COMPLEX_LONG_FLOAT_WIDETAG] = scav_unboxed;
+#endif
+ scavtab[SIMPLE_ARRAY_WIDETAG] = scav_boxed;
+ scavtab[SIMPLE_STRING_WIDETAG] = scav_string;
+ scavtab[SIMPLE_BIT_VECTOR_WIDETAG] = scav_vector_bit;
+ scavtab[SIMPLE_VECTOR_WIDETAG] = scav_vector;
+ scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_2_WIDETAG] =
+ scav_vector_unsigned_byte_2;
+ scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_4_WIDETAG] =
+ scav_vector_unsigned_byte_4;
+ scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG] =
+ scav_vector_unsigned_byte_8;
+ scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG] =
+ scav_vector_unsigned_byte_16;
+ scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG] =
+ scav_vector_unsigned_byte_32;
- scavtab[SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG] =
- scav_vector_complex_long_float;
-#endif
- scavtab[COMPLEX_STRING_WIDETAG] = scav_boxed;
- scavtab[COMPLEX_BIT_VECTOR_WIDETAG] = scav_boxed;
- scavtab[COMPLEX_VECTOR_WIDETAG] = scav_boxed;
- scavtab[COMPLEX_ARRAY_WIDETAG] = scav_boxed;
- scavtab[CODE_HEADER_WIDETAG] = scav_code_header;
- scavtab[SIMPLE_FUN_HEADER_WIDETAG] = scav_fun_header;
- scavtab[CLOSURE_FUN_HEADER_WIDETAG] = scav_fun_header;
- scavtab[RETURN_PC_HEADER_WIDETAG] = scav_return_pc_header;
+ scavtab[SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG] =
+ scav_vector_complex_long_float;
+#endif
+ scavtab[COMPLEX_STRING_WIDETAG] = scav_boxed;
+ scavtab[COMPLEX_BIT_VECTOR_WIDETAG] = scav_boxed;
+ scavtab[COMPLEX_VECTOR_WIDETAG] = scav_boxed;
+ scavtab[COMPLEX_ARRAY_WIDETAG] = scav_boxed;
+ scavtab[CODE_HEADER_WIDETAG] = scav_code_header;
+ scavtab[SIMPLE_FUN_HEADER_WIDETAG] = scav_fun_header;
+ scavtab[CLOSURE_FUN_HEADER_WIDETAG] = scav_fun_header;
+ scavtab[RETURN_PC_HEADER_WIDETAG] = scav_return_pc_header;
- scavtab[CLOSURE_HEADER_WIDETAG] = scav_boxed;
- scavtab[FUNCALLABLE_INSTANCE_HEADER_WIDETAG] = scav_boxed;
-#endif
- scavtab[VALUE_CELL_HEADER_WIDETAG] = scav_boxed;
- scavtab[SYMBOL_HEADER_WIDETAG] = scav_boxed;
- scavtab[BASE_CHAR_WIDETAG] = scav_immediate;
- scavtab[SAP_WIDETAG] = scav_unboxed;
- scavtab[UNBOUND_MARKER_WIDETAG] = scav_immediate;
- scavtab[WEAK_POINTER_WIDETAG] = scav_weak_pointer;
- scavtab[INSTANCE_HEADER_WIDETAG] = scav_boxed;
+ scavtab[CLOSURE_HEADER_WIDETAG] = scav_boxed;
+ scavtab[FUNCALLABLE_INSTANCE_HEADER_WIDETAG] = scav_boxed;
+#endif
+ scavtab[VALUE_CELL_HEADER_WIDETAG] = scav_boxed;
+ scavtab[SYMBOL_HEADER_WIDETAG] = scav_boxed;
+ scavtab[BASE_CHAR_WIDETAG] = scav_immediate;
+ scavtab[SAP_WIDETAG] = scav_unboxed;
+ scavtab[UNBOUND_MARKER_WIDETAG] = scav_immediate;
+ scavtab[WEAK_POINTER_WIDETAG] = scav_weak_pointer;
+ scavtab[INSTANCE_HEADER_WIDETAG] = scav_boxed;
- transother[COMPLEX_LONG_FLOAT_WIDETAG] = trans_unboxed;
-#endif
- transother[SIMPLE_ARRAY_WIDETAG] = trans_boxed;
- transother[SIMPLE_STRING_WIDETAG] = trans_string;
- transother[SIMPLE_BIT_VECTOR_WIDETAG] = trans_vector_bit;
- transother[SIMPLE_VECTOR_WIDETAG] = trans_vector;
- transother[SIMPLE_ARRAY_UNSIGNED_BYTE_2_WIDETAG] =
- trans_vector_unsigned_byte_2;
- transother[SIMPLE_ARRAY_UNSIGNED_BYTE_4_WIDETAG] =
- trans_vector_unsigned_byte_4;
- transother[SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG] =
- trans_vector_unsigned_byte_8;
- transother[SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG] =
- trans_vector_unsigned_byte_16;
- transother[SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG] =
- trans_vector_unsigned_byte_32;
+ transother[COMPLEX_LONG_FLOAT_WIDETAG] = trans_unboxed;
+#endif
+ transother[SIMPLE_ARRAY_WIDETAG] = trans_boxed;
+ transother[SIMPLE_STRING_WIDETAG] = trans_string;
+ transother[SIMPLE_BIT_VECTOR_WIDETAG] = trans_vector_bit;
+ transother[SIMPLE_VECTOR_WIDETAG] = trans_vector;
+ transother[SIMPLE_ARRAY_UNSIGNED_BYTE_2_WIDETAG] =
+ trans_vector_unsigned_byte_2;
+ transother[SIMPLE_ARRAY_UNSIGNED_BYTE_4_WIDETAG] =
+ trans_vector_unsigned_byte_4;
+ transother[SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG] =
+ trans_vector_unsigned_byte_8;
+ transother[SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG] =
+ trans_vector_unsigned_byte_16;
+ transother[SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG] =
+ trans_vector_unsigned_byte_32;
- transother[SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG] =
- trans_vector_complex_long_float;
-#endif
- transother[COMPLEX_STRING_WIDETAG] = trans_boxed;
- transother[COMPLEX_BIT_VECTOR_WIDETAG] = trans_boxed;
- transother[COMPLEX_VECTOR_WIDETAG] = trans_boxed;
- transother[COMPLEX_ARRAY_WIDETAG] = trans_boxed;
- transother[CODE_HEADER_WIDETAG] = trans_code_header;
- transother[SIMPLE_FUN_HEADER_WIDETAG] = trans_fun_header;
- transother[CLOSURE_FUN_HEADER_WIDETAG] = trans_fun_header;
- transother[RETURN_PC_HEADER_WIDETAG] = trans_return_pc_header;
- transother[CLOSURE_HEADER_WIDETAG] = trans_boxed;
- transother[FUNCALLABLE_INSTANCE_HEADER_WIDETAG] = trans_boxed;
- transother[VALUE_CELL_HEADER_WIDETAG] = trans_boxed;
- transother[SYMBOL_HEADER_WIDETAG] = trans_boxed;
- transother[BASE_CHAR_WIDETAG] = trans_immediate;
- transother[SAP_WIDETAG] = trans_unboxed;
- transother[UNBOUND_MARKER_WIDETAG] = trans_immediate;
- transother[WEAK_POINTER_WIDETAG] = trans_weak_pointer;
- transother[INSTANCE_HEADER_WIDETAG] = trans_boxed;
- transother[FDEFN_WIDETAG] = trans_boxed;
-
- /* Size table */
-
- for (i = 0; i < 256; i++)
- sizetab[i] = size_lose;
-
- for (i = 0; i < 32; i++) {
- sizetab[EVEN_FIXNUM_LOWTAG|(i<<3)] = size_immediate;
- sizetab[FUN_POINTER_LOWTAG|(i<<3)] = size_pointer;
- /* skipping OTHER_IMMEDIATE_0_LOWTAG */
- sizetab[LIST_POINTER_LOWTAG|(i<<3)] = size_pointer;
- sizetab[ODD_FIXNUM_LOWTAG|(i<<3)] = size_immediate;
- sizetab[INSTANCE_POINTER_LOWTAG|(i<<3)] = size_pointer;
- /* skipping OTHER_IMMEDIATE_1_LOWTAG */
- sizetab[OTHER_POINTER_LOWTAG|(i<<3)] = size_pointer;
- }
+ transother[SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG] =
+ trans_vector_complex_long_float;
+#endif
+ transother[COMPLEX_STRING_WIDETAG] = trans_boxed;
+ transother[COMPLEX_BIT_VECTOR_WIDETAG] = trans_boxed;
+ transother[COMPLEX_VECTOR_WIDETAG] = trans_boxed;
+ transother[COMPLEX_ARRAY_WIDETAG] = trans_boxed;
+ transother[CODE_HEADER_WIDETAG] = trans_code_header;
+ transother[SIMPLE_FUN_HEADER_WIDETAG] = trans_fun_header;
+ transother[CLOSURE_FUN_HEADER_WIDETAG] = trans_fun_header;
+ transother[RETURN_PC_HEADER_WIDETAG] = trans_return_pc_header;
+ transother[CLOSURE_HEADER_WIDETAG] = trans_boxed;
+ transother[FUNCALLABLE_INSTANCE_HEADER_WIDETAG] = trans_boxed;
+ transother[VALUE_CELL_HEADER_WIDETAG] = trans_boxed;
+ transother[SYMBOL_HEADER_WIDETAG] = trans_boxed;
+ transother[BASE_CHAR_WIDETAG] = trans_immediate;
+ transother[SAP_WIDETAG] = trans_unboxed;
+ transother[UNBOUND_MARKER_WIDETAG] = trans_immediate;
+ transother[WEAK_POINTER_WIDETAG] = trans_weak_pointer;
+ transother[INSTANCE_HEADER_WIDETAG] = trans_boxed;
+ transother[FDEFN_WIDETAG] = trans_boxed;
+
+ /* Size table */
+
+ for (i = 0; i < 256; i++)
+ sizetab[i] = size_lose;
+
+ for (i = 0; i < 32; i++) {
+ sizetab[EVEN_FIXNUM_LOWTAG|(i<<3)] = size_immediate;
+ sizetab[FUN_POINTER_LOWTAG|(i<<3)] = size_pointer;
+ /* skipping OTHER_IMMEDIATE_0_LOWTAG */
+ sizetab[LIST_POINTER_LOWTAG|(i<<3)] = size_pointer;
+ sizetab[ODD_FIXNUM_LOWTAG|(i<<3)] = size_immediate;
+ sizetab[INSTANCE_POINTER_LOWTAG|(i<<3)] = size_pointer;
+ /* skipping OTHER_IMMEDIATE_1_LOWTAG */
+ sizetab[OTHER_POINTER_LOWTAG|(i<<3)] = size_pointer;
+ }
- sizetab[COMPLEX_LONG_FLOAT_WIDETAG] = size_unboxed;
-#endif
- sizetab[SIMPLE_ARRAY_WIDETAG] = size_boxed;
- sizetab[SIMPLE_STRING_WIDETAG] = size_string;
- sizetab[SIMPLE_BIT_VECTOR_WIDETAG] = size_vector_bit;
- sizetab[SIMPLE_VECTOR_WIDETAG] = size_vector;
- sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_2_WIDETAG] =
- size_vector_unsigned_byte_2;
- sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_4_WIDETAG] =
- size_vector_unsigned_byte_4;
- sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG] =
- size_vector_unsigned_byte_8;
- sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG] =
- size_vector_unsigned_byte_16;
- sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG] =
- size_vector_unsigned_byte_32;
+ sizetab[COMPLEX_LONG_FLOAT_WIDETAG] = size_unboxed;
+#endif
+ sizetab[SIMPLE_ARRAY_WIDETAG] = size_boxed;
+ sizetab[SIMPLE_STRING_WIDETAG] = size_string;
+ sizetab[SIMPLE_BIT_VECTOR_WIDETAG] = size_vector_bit;
+ sizetab[SIMPLE_VECTOR_WIDETAG] = size_vector;
+ sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_2_WIDETAG] =
+ size_vector_unsigned_byte_2;
+ sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_4_WIDETAG] =
+ size_vector_unsigned_byte_4;
+ sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG] =
+ size_vector_unsigned_byte_8;
+ sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG] =
+ size_vector_unsigned_byte_16;
+ sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG] =
+ size_vector_unsigned_byte_32;
- sizetab[SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG] =
- size_vector_complex_long_float;
-#endif
- sizetab[COMPLEX_STRING_WIDETAG] = size_boxed;
- sizetab[COMPLEX_BIT_VECTOR_WIDETAG] = size_boxed;
- sizetab[COMPLEX_VECTOR_WIDETAG] = size_boxed;
- sizetab[COMPLEX_ARRAY_WIDETAG] = size_boxed;
- sizetab[CODE_HEADER_WIDETAG] = size_code_header;
+ sizetab[SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG] =
+ size_vector_complex_long_float;
+#endif
+ sizetab[COMPLEX_STRING_WIDETAG] = size_boxed;
+ sizetab[COMPLEX_BIT_VECTOR_WIDETAG] = size_boxed;
+ sizetab[COMPLEX_VECTOR_WIDETAG] = size_boxed;
+ sizetab[COMPLEX_ARRAY_WIDETAG] = size_boxed;
+ sizetab[CODE_HEADER_WIDETAG] = size_code_header;
- /* Shouldn't see these so just lose if it happens */
- sizetab[SIMPLE_FUN_HEADER_WIDETAG] = size_function_header;
- sizetab[CLOSURE_FUN_HEADER_WIDETAG] = size_function_header;
- sizetab[RETURN_PC_HEADER_WIDETAG] = size_return_pc_header;
-#endif
- sizetab[CLOSURE_HEADER_WIDETAG] = size_boxed;
- sizetab[FUNCALLABLE_INSTANCE_HEADER_WIDETAG] = size_boxed;
- sizetab[VALUE_CELL_HEADER_WIDETAG] = size_boxed;
- sizetab[SYMBOL_HEADER_WIDETAG] = size_boxed;
- sizetab[BASE_CHAR_WIDETAG] = size_immediate;
- sizetab[SAP_WIDETAG] = size_unboxed;
- sizetab[UNBOUND_MARKER_WIDETAG] = size_immediate;
- sizetab[WEAK_POINTER_WIDETAG] = size_weak_pointer;
- sizetab[INSTANCE_HEADER_WIDETAG] = size_boxed;
- sizetab[FDEFN_WIDETAG] = size_boxed;
+ /* Shouldn't see these so just lose if it happens */
+ sizetab[SIMPLE_FUN_HEADER_WIDETAG] = size_function_header;
+ sizetab[CLOSURE_FUN_HEADER_WIDETAG] = size_function_header;
+ sizetab[RETURN_PC_HEADER_WIDETAG] = size_return_pc_header;
+#endif
+ sizetab[CLOSURE_HEADER_WIDETAG] = size_boxed;
+ sizetab[FUNCALLABLE_INSTANCE_HEADER_WIDETAG] = size_boxed;
+ sizetab[VALUE_CELL_HEADER_WIDETAG] = size_boxed;
+ sizetab[SYMBOL_HEADER_WIDETAG] = size_boxed;
+ sizetab[BASE_CHAR_WIDETAG] = size_immediate;
+ sizetab[SAP_WIDETAG] = size_unboxed;
+ sizetab[UNBOUND_MARKER_WIDETAG] = size_immediate;
+ sizetab[WEAK_POINTER_WIDETAG] = size_weak_pointer;
+ sizetab[INSTANCE_HEADER_WIDETAG] = size_boxed;
+ sizetab[FDEFN_WIDETAG] = size_boxed;
fprintf(stderr,
"set_auto_gc_trigger: tried to set gc trigger too low! (%d < %p)\n",
(unsigned int)dynamic_usage,
(os_vm_address_t)dynamic_space_free_pointer
- (os_vm_address_t)current_dynamic_space);
fprintf(stderr,
"set_auto_gc_trigger: tried to set gc trigger too low! (%d < %p)\n",
(unsigned int)dynamic_usage,
(os_vm_address_t)dynamic_space_free_pointer
- (os_vm_address_t)current_dynamic_space);