[squeak-dev] null compilation/parsing

Eliot Miranda eliot.miranda at gmail.com
Tue Aug 31 22:57:31 UTC 2021


Hi All,

    I was trying to measure a speedup to JTI code generation that shaves
time off orf e.g. ReadStream>>next.  I wanted to try and do something like
this:

CurrentReadOnlySourceFiles cacheDuring:
[| ed comp |
ed := NullRequestor new.
comp := Compiler new.
[Morph withAllSubclassesDo:
[:mc|
mc selectorsAndMethodsDo:
[:s :m|
[comp
parse: (ed text: m getSourceFromFile)
in: mc
notifying: ed]
on: ParserNotification
do: []]]] timeToRun]

or

CurrentReadOnlySourceFiles cacheDuring:
[| ed parser |
ed := NullRequestor new.
parser := Parser new.
[Morph withAllSubclassesDo:
[:mc|
mc selectorsAndMethodsDo:
[:s :m|
parser
parse: (ed text: m getSourceFromFile)
class: mc
noPattern: false
notifying: ed
ifFail: []]]] timeToRun]

but this doesn't work for a host of reasons:

- shadowed variable warnings are sent straight to the transcript
- the requestor is used only for text selection; it does not mediate error
interactivity

It would be great if the parser could truly run silently if given a
suitable requestor.  How about it, anyone up for the challenge?

_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210831/7c384537/attachment.html>


More information about the Squeak-dev mailing list