comp.lang.ada
 help / color / mirror / Atom feed
From: alby.gamper@gmail.com
Subject: Re: Fun with trampolines
Date: Fri, 16 Mar 2018 17:11:13 -0700 (PDT)
Date: 2018-03-16T17:11:13-07:00	[thread overview]
Message-ID: <f6db13fe-fc3d-4679-be35-aa3a1c95f178@googlegroups.com> (raw)
In-Reply-To: <ly7eqbhp5y.fsf@pushface.org>

On Saturday, March 17, 2018 at 5:05:14 AM UTC+11, Simon Wright wrote:
> 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?

Yes, I meant GCC 7.1

> 
> 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).

Exactly

> 
> 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-17  0:11 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
2018-03-17  0:11     ` alby.gamper [this message]
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