mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Attemping to add write barrier for set operations
This commit is contained in:
parent
4e30e6d551
commit
e4c4148a74
2 changed files with 12 additions and 1 deletions
|
@ -41,7 +41,8 @@ extern const object Cyc_EOF;
|
|||
|
||||
object cell_get(object cell);
|
||||
|
||||
#define global_set(glo,value) (glo=value)
|
||||
#define global_set(glo,value) Cyc_global_set(data, (object *)&glo, value)
|
||||
object Cyc_global_set(void *thd, object *glo, object value);
|
||||
|
||||
/* Variable argument count support
|
||||
|
||||
|
|
10
runtime.c
10
runtime.c
|
@ -12,6 +12,16 @@
|
|||
//int JAE_DEBUG = 0;
|
||||
//int gcMoveCountsDEBUG[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||
|
||||
TODO: still not good enough, need to be smarter when marking grey objs that are
|
||||
still on the stack (??). see reg-port in read.sld
|
||||
|
||||
object Cyc_global_set(void *thd, object *glo, object value)
|
||||
{
|
||||
gc_mut_update((gc_thread_data *)thd, *glo, value);
|
||||
*(glo) = value;
|
||||
return value;
|
||||
}
|
||||
|
||||
/* Error checking section - type mismatch, num args, etc */
|
||||
/* Type names to use for error messages */
|
||||
const char *tag_names[21] = { \
|
||||
|
|
Loading…
Add table
Reference in a new issue