<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
Hi Xin!<div><br></div><div>Thanks. :-) Merged. Please add commentary to magic numbers such as "2" the next time.</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
<p style='color: #AAAAAA; margin-top: 10px;'>Am 04.05.2022 15:01:20 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style='font-family:Arial,Helvetica,sans-serif'>A new version of Kernel was added to project The Inbox:<br>http://source.squeak.org/inbox/Kernel-xw.1463.mcz<br><br>==================== Summary ====================<br><br>Name: Kernel-xw.1463<br>Author: xw<br>Time: 4 May 2022, 9:00:19.605843 pm<br>UUID: 03cc3269-c236-214d-a9e7-f7ee0c914b3d<br>Ancestors: Kernel-nice.1462<br><br>Add Unicode support and simplify implementation of CompiledMethod>>#getPreambleFrom:at:<br><br>=============== Diff against Kernel-nice.1462 ===============<br><br>Item was changed:<br> ----- Method: CompiledMethod>>getPreambleFrom:at: (in category 'source code management') -----<br> getPreambleFrom: aFileStream at: endPosition<br>+ | chunk |<br>+ aFileStream position: endPosition + 2.<br>+ [(chunk := aFileStream backChunk) beginsWith: ']lang['] whileTrue.<br>+ ^ chunk!<br>- "This method is an ugly hack. This method assumes that source files have ASCII-compatible encoding and that preambles contain no non-ASCII characters."<br>- <br>- | chunkSize chunk |<br>- chunkSize := 160 min: endPosition.<br>- [<br>- | index |<br>- chunk := aFileStream<br>- position: (endPosition - chunkSize + 1 max: 0);<br>- basicNext: chunkSize.<br>- (index := chunk lastIndexOf: $!! startingAt: chunk size) ~= 0 ifTrue: [<br>- ^chunk copyFrom: index + 1 to: chunk size ].<br>- chunkSize := chunkSize * 2.<br>- chunkSize <= endPosition ] whileTrue.<br>- ^chunk!<br><br><br></div></blockquote>
</div></body>