How to reliably tell if a BlockContextTemplate is optimized?

49 views
Skip to first unread message

jtu...@objektfabrik.de

unread,
Jul 17, 2012, 1:31:07 AM7/17/12
to va-sma...@googlegroups.com
Hi there,

I'm trying to find out what method/class evaluated a Block. Unfortunately, all my attempts at doing so only partly work, and most of the times, it seems to be due to the fact that optimized Blocks behave differently than normal Blocks.

First question: with #thisContext in VisualWorks and other dialects, this seems to be easy. But there seems to be no equivalent to this in VAST.

So first I need a way to reliably tell whether a BlockContextTemplate that I picked from the stack (using stackAtFrame:offset:) is optimized or not. I am under the impression that #receiverVisible is just testing for a side effect and doesn't always tell the truth about optimized or not.

Then, I guess I need to walk back on the stack fro another x frames. Maybe another x for optimized and non-optimized Blocks. I seem to have some success with going back another 2 frames, but only for non-optimized Blocks.

Is there any kind of documentation other than some comments in stackAtFrame:offset: etc.? So far I found next to nothing that could be applied to VAST. I've spent quite a while in the debugger (which, unfortunately leads to the fact that all frame offsets on the stack are different for obvious reasons), but nothing I've tried so far gets me very far.

Any help is greatly appreciated,

Joachim

John O'Keefe

unread,
Jul 19, 2012, 3:11:37 PM7/19/12
to va-sma...@googlegroups.com
Joachim -
 
Can you give me a little information on what you are trying to do? That might help me in figuring out how to answer the question.
 
John

jtu...@objektfabrik.de

unread,
Jul 23, 2012, 3:04:58 PM7/23/12
to va-sma...@googlegroups.com
John,

I'll send you more info via PM.

Thanks a lot

Joachim
Reply all
Reply to author
Forward
0 new messages