Clean up the code for (set-param-obj!)

This commit is contained in:
Justin Ethier 2017-03-16 14:10:51 +00:00
parent 3f75e8d231
commit d8a11c2ea6

View file

@ -956,16 +956,21 @@
return_closcall1(data, k, thd->param_objs); ") return_closcall1(data, k, thd->param_objs); ")
(define-c set-param-obj! (define-c set-param-obj!
"(void *data, int argc, closure _, object k, object obj)" "(void *data, int argc, closure _, object k, object obj)"
" make_pair(p, obj, ((gc_thread_data *)data)->param_objs); " gc_thread_data *thd = (gc_thread_data *)data;
gc_thread_data *thd = (gc_thread_data *)data; make_pair(c, obj, thd->param_objs);
//Cyc_st_add(data, \"scheme/base.sld:set-param-objs!\"); thd->param_objs = &c;
//fprintf(stderr, \"scheme/base.sld:set-param-objs!\\n\"); return_closcall1(data, k, &c); ")
global_set((thd->param_objs), &p); ;"(void *data, int argc, closure _, object k, object obj)"
//thd->param_objs = (object)(&p); ;" make_pair(p, obj, ((gc_thread_data *)data)->param_objs);
// obj is on the stack, need to add it to write barrier ; gc_thread_data *thd = (gc_thread_data *)data;
// to ensure it is transported to the heap ; //Cyc_st_add(data, \"scheme/base.sld:set-param-objs!\");
//add_mutation(data, &p, -1, obj); ; //fprintf(stderr, \"scheme/base.sld:set-param-objs!\\n\");
return_closcall1(data, k, boolean_t); ") ; global_set((thd->param_objs), &p);
; //thd->param_objs = (object)(&p);
; // obj is on the stack, need to add it to write barrier
; // to ensure it is transported to the heap
; //add_mutation(data, &p, -1, obj);
; return_closcall1(data, k, boolean_t); ")
(define *parameter-id* 0) (define *parameter-id* 0)
(define (make-parameter init . o) (define (make-parameter init . o)
(let* ((converter (let* ((converter