comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Fun with trampolines
Date: Fri, 16 Mar 2018 18:05:13 +0000
Date: 2018-03-16T18:05:13+00:00	[thread overview]
Message-ID: <ly7eqbhp5y.fsf@pushface.org> (raw)
In-Reply-To: ec9fb3b0-0c2d-4810-9eb5-6972d3f4d783@googlegroups.com

alby.gamper@gmail.com writes:

> On Thursday, March 15, 2018 at 5:03:28 AM UTC+11, Simon Wright wrote:
>> Some of you might be entertained by my recent encounter with trampolines
>> for Tcl/Tk callbacks. Always tiresome when you visit demo code after a
>> few years and it doesn't work any more.
>> 
>> There's at least a chance that the trampoline (which exists on the
>> stack) might have been trampled on, though I didn't think so when I
>> checked it. The question has to be, _which_ stack is it on? I suppose it
>> has to be that of the code that's executing when 'Access is taken.
>> 
>> https://forward-in-code.blogspot.co.uk/2018/03/tcltk-vs-trampolines.html
>
> Dear Simon
>
> I seem to recall that GCC/GNAT recently (ie 7.1 or 7.2) removed support for
> trampolines ? Could this have an effect on your legacy code ?
>
> Alex

Hi Alex,

I assume you mean FSF GCC 7.1.0, 7.2.0 rather than the
similarly-numbered GNAT Pro releases?

I don't think it's so much that they've removed support for trampolines
as that they've worked out how to avoid using them! (FSF GCC 8.0.1 still
generates them when it finds it necessary, i.e. some combination of
nested & Convention => not-Ada).

Thinking about it, since the trampoline is on the stack it's very
dangerous to pass it to an external library for that library to call it
much later! My only excuse is that it used to work ...

  reply	other threads:[~2018-03-16 18:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 18:03 Fun with trampolines Simon Wright
2018-03-16 10:27 ` alby.gamper
2018-03-16 18:05   ` Simon Wright [this message]
2018-03-17  0:11     ` alby.gamper
2018-03-16 15:38 ` Shark8
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox