[squeak-dev] The Inbox: Kernel-ct.1255.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Aug 9 20:59:29 UTC 2019


But do you always do queries?


For example, Process>>#releaseCriticalSection: just checks if a method has a pragma. Vivide seems to do so sometimes, too.


Or do I miss an easier protocol?


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Tobias Pape <Das.Linux at gmx.de>
Gesendet: Freitag, 9. August 2019 22:31:02
An: squeak-dev at lists.squeakfoundation.org
Betreff: Re: [squeak-dev] The Inbox: Kernel-ct.1255.mcz

I think the typical way to access Pragmas is the other way round.

Instead of asking some Compiled Method, rather use the class-side methods of Pragma to _query_ for pragmas.
That way, you would only touch compiled methods if necessary.

Best regards
        -Tobias

> On 09.08.2019, at 22:08, commits at source.squeak.org wrote:
>
> A new version of Kernel was added to project The Inbox:
> http://source.squeak.org/inbox/Kernel-ct.1255.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-ct.1255
> Author: ct
> Time: 9 August 2019, 10:08:18.927412 pm
> UUID: 2355c96f-9cc4-2f45-aebe-385f6465737e
> Ancestors: Kernel-mt.1254
>
> Propose convenience method for pragma analysis
>
> =============== Diff against Kernel-mt.1254 ===============
>
> Item was added:
> + ----- Method: CompiledMethod>>hasPragma: (in category 'accessing-pragmas & properties') -----
> + hasPragma: aSymbol
> +
> +      ^ (self pragmaAt: aSymbol) notNil!
>
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190809/f0dffe99/attachment.html>


More information about the Squeak-dev mailing list