From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William ML Leslie Newsgroups: gmane.lisp.guile.devel Subject: Re: CPS Update Date: Mon, 25 Feb 2013 15:54:57 +1100 Message-ID: References: <871ucgrryo.fsf@tines.lan> <87txpcq7nx.fsf@tines.lan> <871uccgtqo.fsf@tines.lan> <871uc78o6t.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1361768112 21723 80.91.229.3 (25 Feb 2013 04:55:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Feb 2013 04:55:12 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Feb 25 05:55:33 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U9q61-00043o-B2 for guile-devel@m.gmane.org; Mon, 25 Feb 2013 05:55:25 +0100 Original-Received: from localhost ([::1]:32966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9q5g-0008MZ-MX for guile-devel@m.gmane.org; Sun, 24 Feb 2013 23:55:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9q5c-0008LE-9z for guile-devel@gnu.org; Sun, 24 Feb 2013 23:55:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9q5b-0006xs-1s for guile-devel@gnu.org; Sun, 24 Feb 2013 23:55:00 -0500 Original-Received: from mail-bk0-f51.google.com ([209.85.214.51]:43143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9q5a-0006xf-QW for guile-devel@gnu.org; Sun, 24 Feb 2013 23:54:58 -0500 Original-Received: by mail-bk0-f51.google.com with SMTP id ik5so1083407bkc.24 for ; Sun, 24 Feb 2013 20:54:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=PfyA7ffZpSstuNYzp3km7LD3Qjs6Q8VUN4cKt1xymaM=; b=oyu+SeeePu4rQHzFEFrVg8kHZVzJR6vosz10IxenEspGI2DVYAHBwAkQDJwvWvEPwJ Qw7gc4kz6WUSodwFz1VeKmBbs65dWxjNKlEjWQNJbelfOqyfiCrpOOYe+uLUV43OKHuo /6afS8zcAuAl9BZ1DmC7nA6zfvzwgxUT9WLcWMmRCCqOPDLaGJMnYotYpd/EnLGi5xOH gUUGHYrv/4Q9mEHkeEqPD76qgtpFnTuHmahqylERsqQOXrbVvN/7n1i/raixJb5WDFYA mkB+y0lSaEnywU8Ww3MiCf+USm9nWbW4j3HoPm+UVVwybhb/dZaeIISyYU4phCVJ/52O 45hg== X-Received: by 10.204.156.8 with SMTP id u8mr4308803bkw.78.1361768097437; Sun, 24 Feb 2013 20:54:57 -0800 (PST) Original-Received: by 10.204.245.129 with HTTP; Sun, 24 Feb 2013 20:54:57 -0800 (PST) In-Reply-To: <871uc78o6t.fsf@tines.lan> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.214.51 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15827 Archived-At: On 23 February 2013 18:49, Mark H Weaver wrote: > William ML Leslie writes: >> Recompiling every procedure that uses + when somebody binds it means >> compiling a lot of code that probably isn't going to be used. More >> likely, if + has been inlined here, the compiler will have to emit a >> guard that checks inlining assumptions as the start of the let body. > > I'm afraid this isn't good enough. Even if one ignores the possibility > of multiple threads, checks would have to be added not just at the start > of each let body, but also upon return from every procedure that might > rebind '+' or capture its continuation. This includes all procedures > accessed through toplevel/module bindings. Not each let body, the let body in the example code. Specifically, a guard needs to be placed whenever code with undetermined effect happens-before a 'call' to an inlined function. That we are talking about happens-before means the possibility of runtime invalidation of code is limited not only by calls to functions of unknown effect, but also by usages of the variable. > Therefore, I repeat my initial assertion that this is a can of worms. Except that most dynamic compilers for imperative languages already do this (because it's a pretty common thing to need to do). -- William Leslie