Re: catch and throw, was Is multi-level function return possible?

Ivan Godard <ivan@ootbcomp.com>
Fri, 28 Mar 2014 21:32:46 -0700

          From comp.compilers

Related articles
[5 earlier articles]
Re: catch and throw, was Is multi-level function return possible? gneuner2@comcast.net (George Neuner) (2014-03-28)
Re: catch and throw, was Is multi-level function return possible? acolvin@efunct.com (mac) (2014-03-28)
Re: catch and throw, was Is multi-level function return possible? ivan@ootbcomp.com (Ivan Godard) (2014-03-28)
Re: catch and throw, was Is multi-level function return possible? kaz@kylheku.com (Kaz Kylheku) (2014-03-29)
Re: catch and throw, was Is multi-level function return possible? kaz@kylheku.com (Kaz Kylheku) (2014-03-29)
Re: catch and throw, was Is multi-level function return possible? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-03-29)
Re: catch and throw, was Is multi-level function return possible? ivan@ootbcomp.com (Ivan Godard) (2014-03-28)
Re: catch and throw, was Is multi-level function return possible? alan@scooby-doo.csail.mit.edu (Alan Bawden) (2014-03-29)
| List of all articles for this month |

From: Ivan Godard <ivan@ootbcomp.com>
Newsgroups: comp.compilers
Date: Fri, 28 Mar 2014 21:32:46 -0700
Organization: A noiseless patient Spider
References: 14-03-065 14-03-068 14-03-070 14-03-076 14-03-077 14-03-080
Keywords: architecture, errors
Posted-Date: 29 Mar 2014 00:56:15 EDT

On 3/28/2014 7:47 PM, Kaz Kylheku wrote:
> On 2014-03-29, Ivan Godard <ivan@ootbcomp.com> wrote:


>> Useful or no, the ability to resume requires retaining the illusion of
>> sequential execution. You have no idea how expensive, in power and
>> performance, that illusion is. And it's flat-out impossible on wide
>> issue machine such as VLIWs.
>
> I suspect you're may be thinking about resuming the exact instruction with the
> exact machine state where some exception occured.
>
> That's not even necessarily the best, most useful way to resume.


<massive snip>


In machine terms, you are describing throw/catch, not resume. It
happens that your catch does a programming-language-level resume, as
opposed to a hardware resume. However, programming languages consume
zero power; my note was about machines, which unfortunately do a bit
worse :-)


Even in your throw/catch, it is extremely difficult to provide a
consistent model of side-effects that have, or have not, happened at
resumption. Of course, the language level (which runs infinitely fast)
can say that the program state is memoized at try and restored at
catch. That's not a recommended practice on finite machines though.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.