<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p>> <span style="font-size: 12pt;">For inspection - I would like the var names to appear in the explorer as </span><span style="font-size: 12pt;">the keys (instead of the #basicAt: indexes).</span></p>
<div><br>
</div>
<p></p>
<p>Are you sure you are not actually inspecting a context object?</p>
<p><br>
</p>
<p>This is how the explorer on a FullBlockClosure looks in my image:</p>
<p><br>
</p>
<p><img size="17029" contenttype="image/png" id="img594822" style="max-width: 99.9%; user-select: none;" contextid="img280686" tabindex="0" src="cid:3fde778d-12a2-48ce-bc1d-c1a384cae1b6"><br>
</p>
<p><br>
</p>
<p>This is how its corresponding Context looks like:</p>
<p><br>
</p>
<p><img size="16246" contenttype="image/png" id="img597797" style="max-width: 99.9%; user-select: none;" contextid="img98643" tabindex="0" src="cid:3e83f3a9-eaee-4265-8949-f390489b9097"><br>
</p>
<p><br>
</p>
<p>But these indexes cannot be mapped directly to the temporaries. Here is a counter-example:</p>
<p><br>
</p>
<p><span></span></p>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div>| y |</div>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div>y := 10.</div>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div>[| x | y raisedTo: (x := 13) modulo: 42] newProcess</div>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div><span style="white-space:pre"></span>runUntil: [:c | c actualStackSize = 2];</div>
</div>
</blockquote>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div><span style="white-space:pre"></span>suspendedContext</div>
</div>
</blockquote>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p><span></span><br>
</p>
<p><span><br>
<img size="19463" contenttype="image/png" id="img803754" style="max-width: 99.9%; user-select: none;" contextid="img974311" tabindex="0" src="cid:a626e7e7-81fc-4516-a428-326d5b89c659"></span></p>
<p><span><br>
</span></p>
<p><span style="font-size: 12pt;">Contexts also hold "anonymous temps" that are only visible on the stack during execution and depend on the bytecode set.</span><br>
</p>
<p><span><br>
</span></p>
<p><span>But we could probably override Context >> #explorerContents in the following way:</span></p>
<p><span><br>
</span></p>
<p><span><img size="19109" contenttype="image/png" id="img103069" style="max-width: 99.9%; user-select: none;" contextid="img102181" tabindex="0" src="cid:381be31c-8892-4f84-9acd-db43acbb0bb6"><br>
</span></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
See attachment. :-)</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
Best,</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
Christoph<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Stéphane Rollandin <lecteur@zogotounga.net><br>
<b>Gesendet:</b> Sonntag, 19. April 2020 23:56 Uhr<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> Re: [squeak-dev] Accessing temp variables bindings in a BlockClosure</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">> But I agree that these are no nice solutions at all. I suppose the point
<br>
> is that in contrast to literal bindings, temporary variables are never <br>
> actually stored as bindings in the block method. For what purpose do you <br>
> need the bindings?<br>
<br>
For inspection - I would like the var names to appear in the explorer as <br>
the keys (instead of the #basicAt: indexes).<br>
<br>
The code I am dealing with at the moment is choke-full of nested blocks, <br>
and it is a pain to see the values of the temp vars in the closures. I <br>
am hacking a modified Explorer to better display this particular info, <br>
but I'm having a hard time...<br>
<br>
Stef<br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>