<div dir="ltr"><div>I think this was the first time I saw #in: <br>There are still a few senders, so someone else might discover the pattern despite this removal...<br></div>A good point of #in: usage here was to make it clear that we were kind of inlining a method per se.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-11 2:13 GMT+01:00 <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/CollectionsTests-nice.258.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/CollectionsTests-nice.258.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: CollectionsTests-nice.258<br>
Author: nice<br>
Time: 11 November 2015, 2:13:17.734 am<br>
UUID: ae069e82-965d-43ce-85ff-82cc44b73d48<br>
Ancestors: CollectionsTests-ul.257<br>
<br>
Use fresh new withoutPrimitive utility, and let one more test pass in Spur.<br>
<br>
=============== Diff against CollectionsTests-ul.257 ===============<br>
<br>
Item was changed:<br>
----- Method: StringTest>>testFindSubstringInStartingAtMatchTable (in category 'tests - finding') -----<br>
testFindSubstringInStartingAtMatchTable<br>
<br>
| str tbl cm |<br>
str := 'hello '.<br>
tbl := String classPool at: #CaseSensitiveOrder.<br>
self assert: (str findSubstring: ' ' in: str startingAt: 1 matchTable: tbl) = 6.<br>
self assert: (str findSubstring: 'q' in: str startingAt: 1 matchTable: tbl) = 0.<br>
self assert: (str findSubstring: 'q' in: str startingAt: -1 matchTable: tbl) = 0.<br>
self assert: (str findSubstring: ' ' in: str startingAt: -1 matchTable: tbl) = 6.<br>
<br>
<br>
"The next test ensures that the fallback code works just as well"<br>
+ cm := (ByteString >> #findSubstring:in:startingAt:matchTable:) withoutPrimitive.<br>
- cm := (ByteString >> #findSubstring:in:startingAt:matchTable:) in: [:origMethod |<br>
- "Adapted from CompiledMethod>>#newFrom: "<br>
- | inst header|<br>
- header := origMethod header bitAnd: 16r1FF bitInvert.<br>
- "CompiledMethod newFrom: CompiledMethod class >> #newFrom:"<br>
- inst := CompiledMethod<br>
- newMethod: origMethod basicSize - origMethod initialPC + 1<br>
- header: header.<br>
- 1 to: origMethod numLiterals do: [:index| inst literalAt: index put: (origMethod literalAt: index)].<br>
- origMethod initialPC to: origMethod size do: [:index | inst at: index put: (origMethod at: index)].<br>
- inst postCopy].<br>
self assert: (cm valueWithReceiver: str arguments: {' '. str. 1. tbl}) = 6.<br>
self assert: (cm valueWithReceiver: str arguments: {'q'. str. 1. tbl}) = 0.<br>
self assert: (cm valueWithReceiver: str arguments: {'q'. str. -1. tbl}) = 0.<br>
self assert: (cm valueWithReceiver: str arguments: {' '. str. -1. tbl}) = 6.<br>
!<br>
<br>
<br>
</blockquote></div><br></div>