Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Exceptions
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jerome Vouillon  
View profile  
 More options Aug 5 2002, 3:48 pm
Newsgroups: perl.perl6.internals
From: vouil...@pps.jussieu.fr (Jerome Vouillon)
Date: Mon, 5 Aug 2002 20:49:17 +0200
Local: Mon, Aug 5 2002 2:49 pm
Subject: Re: Exceptions

On Mon, Aug 05, 2002 at 01:36:49PM -0400, Dan Sugalski wrote:
> Okay, it's time for exceptions. So, the proposed ops:

> pushx LABEL : Push an exception handler on the stack

> throw PMC : Throw an exception object

> When an exception is thrown, it pops elements off the control stack
> until it gets to an exception handler. (Pops are error pops)

You don't really need a pushx opcode.  If the "die" is in the scope of
a "catch", then you can directy jump to the handler.  Otherwise, you
unwind the stack until you arrive in the scope of a "catch".  In order
to know whether this is the case, you simply build a table at compile
time which associate to each possible return address a corresponding
handler (if any).  The advantage is that the cost of "catch" is null
when no exception is raised.  As a subroutine block is implicitely a
"catch" (it catches return exceptions), this may be interesting.

-- Jerome


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.