[M3devel] frame per procedure instead of frame per TRY?
jay.krell at cornell.edu
Sun Jul 19 11:10:53 CEST 2015
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.
Try writing similar C++ for NT/x86 and look at what you get."PushFrame" is highly optimized to build a linked list through fs:0.And even that is only done at most once per function.
Java VM also specifies scope tables with a similar intent.
The key is figuring out the algorithm to assign the scope ids, and computing and interpreting the resulting tables. It is a little tricky.
Date: Sun, 19 Jul 2015 10:57:11 +0200
From: estellnb at elstel.org
To: jay.krell at cornell.edu; m3devel at elegosoft.com
Subject: Re: [M3devel] frame per procedure instead of frame per TRY?
Am 2015-07-18 um 13:05 schrieb Jay K:
However, has anyone considered a form that does use setjmp
uses at most one frame per procedure, instead of a frame
I don`t think that this will work for the general case.
Consider a try - except in the middle of a code block.
If you leave it, it needs to continue after the END of
the TRY-EXCEPT and not after the END of the
What you can do is re-use the same jumpbuf-frame
for a nested try-finally and try - except :
I can remember having once implemented the latter for PM3.
However I am no more sure about the intrinsics...
M3devel mailing list
M3devel at elegosoft.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the M3devel