[BUG] Obsolete primitives?

Dan Ingalls Dan.Ingalls at disney.com
Mon Sep 6 18:42:58 UTC 1999


>If anyone wants to explore Squeaks primitives you may use this code
>snippet which opens a browser on all primitives:
>
>  | aColl method prim |
>  aColl _ OrderedCollection new: 200.
>  Cursor execute showWhile: [Smalltalk allBehaviorsDo: [:class |
>    class selectorsDo: [:sel | 
>      method _ class compiledMethodAt: sel.
>      (method primitive ~= 0 and: [method isQuick not]) ifTrue: [
>        prim _ String streamContents: [ :s |
>          s nextPutAll: class name; space;
>            nextPutAll: sel; space.
>          method printPrimitiveOn: s].
>        aColl addLast: method primitive -> prim]]].
>    aColl _ aColl asSortedCollection collect: [:assoc | assoc value]].
>  Smalltalk browseMessageList: aColl name: 'primitive messages'.

.... or simply ...

    Smalltalk browseAllSelect: [:m | m primitive ~= 0 and: [m isQuick not]]

	- Dan





More information about the Squeak-dev mailing list