<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Don't we have a test for this at the moment?</p>
<div id="x_Signature">
<div id="x_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="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">
<div class="x__rp_U4 x_ms-font-weight-regular x_ms-font-color-neutralDark x_rpHighlightAllClass x_rpHighlightBodyClass" id="x_Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="x_divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="x_Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</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 commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Donnerstag, 26. März 2020 17:20:00<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: Compiler-ct.424.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Christoph Thiede uploaded a new version of Compiler to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Compiler-ct.424.mcz">http://source.squeak.org/inbox/Compiler-ct.424.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Compiler-ct.424<br>
Author: ct<br>
Time: 26 March 2020, 5:19:54.71456 pm<br>
UUID: 10f4405b-896c-3149-b76b-b9cd45ca5734<br>
Ancestors: Compiler-nice.420<br>
<br>
Fixes a bug regarding decompilation of FullBlockClosures<br>
<br>
Sample to reproduce: [^ true] decompile should NOT return {[]}!<br>
<br>
=============== Diff against Compiler-nice.420 ===============<br>
<br>
Item was changed:<br>
----- Method: Decompiler>>blockTo: (in category 'control') -----<br>
blockTo: end<br>
+ "Decompile a range of code as in statementsTo:, but return a block node. NB: end is an exclusive index."<br>
- "Decompile a range of code as in statementsTo:, but return a block node."<br>
| exprs block oldBase lastStatementOfBlockIsNil |<br>
oldBase := blockStackBase.<br>
blockStackBase := stack size.<br>
exprs := self statementsTo: end.<br>
lastStatementOfBlockIsNil := pc < method endPC and: [exprs notEmpty and: [exprs last == (constTable at: 4)]].<br>
lastStatementOfBlockIsNil ifTrue:<br>
[exprs := exprs allButLast].<br>
block := constructor codeBlock: exprs returns: lastReturnPc = lastPc.<br>
blockStackBase := oldBase.<br>
lastReturnPc := -1. "So as not to mislead outer calls"<br>
^block!<br>
<br>
Item was changed:<br>
----- Method: Decompiler>>doClosureCopy:copiedValues: (in category 'control') -----<br>
doClosureCopy: aCompiledBlock copiedValues: blockCopiedValues<br>
"implementation note: must be invoked on a copy because it modifies states"<br>
| savedPC blockArgs blockTemps blockTempsOffset block mark |<br>
numLocalTemps := aCompiledBlock numTemps - aCompiledBlock numArgs - blockCopiedValues size.<br>
blockTempsOffset := aCompiledBlock numArgs + blockCopiedValues size.<br>
(blockStartsToTempVars notNil "implies we were intialized with temp names."<br>
and: [blockStartsToTempVars includesKey: aCompiledBlock])<br>
ifTrue:<br>
[tempVars := blockStartsToTempVars at: aCompiledBlock]<br>
ifFalse:<br>
[blockArgs := (1 to: aCompiledBlock numArgs) collect:<br>
[:i| (constructor<br>
codeTemp: i - 1<br>
named: 't', (tempVarCount + i) printString)<br>
beBlockArg].<br>
blockTemps := (1 to: numLocalTemps) collect:<br>
[:i| constructor<br>
codeTemp: i + blockTempsOffset - 1<br>
named: 't', (tempVarCount + i + aCompiledBlock numArgs) printString].<br>
tempVars := blockArgs, blockCopiedValues, blockTemps].<br>
tempVarCount := tempVarCount + aCompiledBlock numArgs + numLocalTemps.<br>
lastJumpIfPcStack := OrderedCollection new.<br>
caseExits := OrderedCollection new.<br>
statements := OrderedCollection new: 20.<br>
savedPC := pc.<br>
self method: (method := aCompiledBlock) pc: aCompiledBlock initialPC.<br>
mark := stack size.<br>
+ block := self blockTo: aCompiledBlock endPC + 1.<br>
- block := self blockTo: aCompiledBlock endPC.<br>
mark = stack size ifFalse: [self error: 'block did alter the stack'].<br>
^((constructor<br>
codeArguments: (tempVars copyFrom: 1 to: aCompiledBlock numArgs)<br>
temps: (tempVars copyFrom: blockTempsOffset + 1 to: blockTempsOffset + numLocalTemps)<br>
block: block)<br>
pc: aCompiledBlock -> savedPC; "c.f. BytecodeEncoder>>pc"<br>
yourself).!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>