<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>I'm pretty sure it can work, but you need also a local "dense" volatile integer that describes where in the function you are. That isn't free, but it is much cheaper than calling setjmp/PushFrame for each try.<div><br></div><div><br></div><div>Try writing similar C++ for NT/x86 and look at what you get.</div><div>"PushFrame" is highly optimized to build a linked list through fs:0.</div><div>And even that is only done at most once per function.</div><div><br></div><div><br></div><div>Java VM also specifies scope tables with a similar intent.</div><div><br></div><div><br></div><div>The key is figuring out the algorithm to assign the scope ids, and computing and interpreting the resulting tables. It is a little tricky.</div><div><br></div><div><br></div><div> - Jay<br><br><br><div><hr id="stopSpelling">Date: Sun, 19 Jul 2015 10:57:11 +0200<br>From: estellnb@elstel.org<br>To: jay.krell@cornell.edu; m3devel@elegosoft.com<br>Subject: Re: [M3devel] frame per procedure instead of frame per TRY?<br><br>
<br>
<div class="ecxmoz-cite-prefix">Am 2015-07-18 um 13:05 schrieb Jay K:<br>
</div>
<blockquote cite="mid:COL130-W5029CFBDDFEF7AF47CB19BE6870@phx.gbl">
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">
<div><br>
</div>
<div>However, has anyone considered a form that does use setjmp
but</div>
<div>uses at most one frame per procedure, instead of a frame
per TRY?</div>
</div>
</blockquote>
<br>
I don`t think that this will work for the general case.<br>
Consider a try - except in the middle of a code block.<br>
If you leave it, it needs to continue after the END of<br>
the TRY-EXCEPT and not after the END of the <br>
procedure.<br>
<br>
What you can do is re-use the same jumpbuf-frame<br>
for a nested try-finally and try - except :<br>
<br>
TRY<br>
TRY<br>
...<br>
EXCEPT<br>
...<br>
END;<br>
FINALLY<br>
...<br>
END;<br>
<br>
or simply<br>
<br>
TRY<br>
....<br>
EXCEPT<br>
....<br>
FINALLY<br>
...<br>
END;<br>
<br>
I can remember having once implemented the latter for PM3.<br>
However I am no more sure about the intrinsics...<br>
<br>
<br>
<br>
<br>
<br>_______________________________________________
M3devel mailing list
M3devel@elegosoft.com
https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3devel</div></div> </div></body>
</html>