comp.lang.ada
 help / color / mirror / Atom feed
* Fun with trampolines
@ 2018-03-14 18:03 Simon Wright
  2018-03-16 10:27 ` alby.gamper
  2018-03-16 15:38 ` Shark8
  0 siblings, 2 replies; 5+ messages in thread
From: Simon Wright @ 2018-03-14 18:03 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fun with trampolines
  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-16 15:38 ` Shark8
  1 sibling, 1 reply; 5+ messages in thread
From: alby.gamper @ 2018-03-16 10:27 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fun with trampolines
  2018-03-14 18:03 Fun with trampolines Simon Wright
  2018-03-16 10:27 ` alby.gamper
@ 2018-03-16 15:38 ` Shark8
  1 sibling, 0 replies; 5+ messages in thread
From: Shark8 @ 2018-03-16 15:38 UTC (permalink / raw)


On Wednesday, March 14, 2018 at 12:03:28 PM UTC-6, Simon Wright wrote:
> 
> https://forward-in-code.blogspot.co.uk/2018/03/tcltk-vs-trampolines.html

I liked your article, thank you for writing and sharing it.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fun with trampolines
  2018-03-16 10:27 ` alby.gamper
@ 2018-03-16 18:05   ` Simon Wright
  2018-03-17  0:11     ` alby.gamper
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Wright @ 2018-03-16 18:05 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fun with trampolines
  2018-03-16 18:05   ` Simon Wright
@ 2018-03-17  0:11     ` alby.gamper
  0 siblings, 0 replies; 5+ messages in thread
From: alby.gamper @ 2018-03-17  0:11 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-17  0:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-03-16 15:38 ` Shark8

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