Disabling write barrier, not needed for pairs

This commit is contained in:
Justin Ethier 2015-03-09 22:01:46 -04:00
parent d73f20ea4c
commit 30cf7b58a4

View file

@ -429,7 +429,6 @@ static object find_or_add_symbol(const char *name){
/* Write Barrier
This is necessary when a mutation (EG: set-car!) occurs, because otherwise
if the new value is on the stack, it will never be transported to the heap.
*/
list write_barrier = nil;
static void add_to_write_barrier(object obj);
@ -460,7 +459,7 @@ static void clear_write_barrier() {
}
write_barrier = nil;
}
/* END write barrier */
* END write barrier */
/* Global variables. */
@ -796,13 +795,11 @@ static object Cyc_eq(object x, object y) {
}
static object Cyc_set_car(object l, object val) {
//add_to_write_barrier(val);
((list)l)->cons_car = val;
return l;
}
static object Cyc_set_cdr(object l, object val) {
//add_to_write_barrier(val);
((list)l)->cons_cdr = val;
return l;
}
@ -1753,8 +1750,8 @@ static void GC_loop(int major, closure cont, object *ans, int num_ans)
#endif
/* Transport global variables. */
transp_write_barrier();
clear_write_barrier(); /* Reset for next time */
// transp_write_barrier();
// clear_write_barrier(); /* Reset for next time */
transp(Cyc_global_variables); /* Internal global used by the runtime */
GC_GLOBALS
while (scanp<allocp) /* Scan the newspace. */