--- libgo/runtime/proc.c | 20 -------------------- libgo/runtime/runtime.h | 4 ---- 2 files changed, 24 deletions(-)
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index 87cd3ed..e52d37c 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -3370,26 +3370,6 @@ runtime_proc_scan(struct Workbuf** wbufp, void (*enqueue1)(struct Workbuf**, Obj enqueue1(wbufp, (Obj){(byte*)&runtime_sched, sizeof runtime_sched, 0}); } -// When a function calls a closure, it passes the closure value to -// __go_set_closure immediately before the function call. When a -// function uses a closure, it calls __go_get_closure immediately on -// function entry. This is a hack, but it will work on any system. -// It would be better to use the static chain register when there is -// one. It is also worth considering expanding these functions -// directly in the compiler. - -void -__go_set_closure(void* v) -{ - g->closure = v; -} - -void * -__go_get_closure(void) -{ - return g->closure; -} - // Return whether we are waiting for a GC. This gc toolchain uses // preemption instead. bool diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h index c96290a..5a9bc71 100644 --- a/libgo/runtime/runtime.h +++ b/libgo/runtime/runtime.h @@ -195,7 +195,6 @@ struct Location struct G { - void* closure; // Closure value. Defer* defer; Panic* panic; void* exception; // current exception being thrown @@ -834,9 +833,6 @@ int32 getproccount(void); #define PREFETCH(p) __builtin_prefetch(p) -void __go_set_closure(void*); -void* __go_get_closure(void); - bool runtime_gcwaiting(void); void runtime_badsignal(int); Defer* runtime_newdefer(void); -- 1.9.3