From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14158 invoked by alias); 10 Oct 2014 20:43:48 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 14005 invoked by uid 89); 10 Oct 2014 20:43:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=unavailable version=3.3.2 X-HELO: mail-qa0-f51.google.com Received: from mail-qa0-f51.google.com (HELO mail-qa0-f51.google.com) (209.85.216.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 10 Oct 2014 20:43:42 +0000 Received: by mail-qa0-f51.google.com with SMTP id k15so2214465qaq.10 for ; Fri, 10 Oct 2014 13:43:40 -0700 (PDT) X-Received: by 10.224.54.129 with SMTP id q1mr13233705qag.6.1412973820427; Fri, 10 Oct 2014 13:43:40 -0700 (PDT) Received: from anchor.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPSA id s49sm5909008qge.15.2014.10.10.13.43.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Oct 2014 13:43:39 -0700 (PDT) From: Richard Henderson To: gcc-patches@gcc.gnu.org Cc: libffi-discuss@sourceware.org, gofrontend-dev@googlegroups.com Subject: [PATCH 09/13] libgo: Remove __go_get/set_closure Date: Fri, 10 Oct 2014 20:43:00 -0000 Message-Id: <1412973773-3942-10-git-send-email-rth@redhat.com> In-Reply-To: <1412973773-3942-1-git-send-email-rth@redhat.com> References: <1412973773-3942-1-git-send-email-rth@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014/txt/msg00103.txt.bz2 --- 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