[squeak-dev] CharacterScanner and stopConditions

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Oct 9 23:46:55 UTC 2013


A few years ago, I have wrapped the stopConditions Array into a more
complex TextStopCondition object.
This was because #endOfRun and #crossedX did occupy position of valid
unicode charCode (A macron...).

But adding an intermediate object in inner loop costs (until some more
aggressive inlining occur in the VM, and until COG is avaliable on ARM).
It also is one more hurdle for having primitive 103 working (or an
equivalent).

The question is will we ever use anything else than #endOfRun and #crossedX
for endOfRun and crossedX stop conditions?
If no, we shall better replace ^stopConditions endOfRun with more simple
^#endOfRun, same for ^#corssedX.
If we do so, the last message sent to stopConditions will be at: and
at:put:, so we can just restore a stopConditions Array (as easy as changing
the CharacterScanner class>>initialize).

Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20131010/fef9c5a0/attachment.htm


More information about the Squeak-dev mailing list