[squeak-dev] The Trunk: Kernel-ul.550.mcz

Eliot Miranda eliot.miranda at gmail.com
Tue Mar 15 16:59:18 UTC 2011


Hi Levente,

    don't know about you, but I'd like to see all of MethodReference in the
base, and not have it as a series of extensions all over the place.  This is
really important reflective infrastructure.

best,
Eliot

On Mon, Mar 14, 2011 at 9:51 AM, <commits at source.squeak.org> wrote:

> Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
> http://source.squeak.org/trunk/Kernel-ul.550.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-ul.550
> Author: ul
> Time: 13 March 2011, 8:55:41.533 pm
> UUID: 0fbe4def-75cd-a747-9d26-44e6a9daaa04
> Ancestors: Kernel-ul.549
>
> - moved MethodReference >> #actualClass to the System package
> - CompiledMethod >> #getPreambleFrom:at: allocates a non-empty buffer
> - added Behavior >> #whichSelectorsReferTo:special:byte:thorough: which
> unifies
> #whichSelectorsReferTo:special:byte: and
> #thoroughWhichSelectorsReferTo:special:byte:
>
> =============== Diff against Kernel-ul.549 ===============
>
> Item was changed:
>  ----- Method: Behavior>>thoroughWhichSelectorsReferTo:special:byte: (in
> category 'testing method dictionary') -----
>  thoroughWhichSelectorsReferTo: literal special: specialFlag byte:
> specialByte
>        "Answer a set of selectors whose methods access the argument as a
>        literal. Dives into the compact literal notation, making it slow but
>        thorough "
>
> +       ^self whichSelectorsReferTo: literal special: specialFlag byte:
> specialByte thorough: true!
> -       | who |
> -       who := IdentitySet new.
> -       self selectorsAndMethodsDo:
> -               [:sel :method |
> -               ((method hasLiteralThorough: literal) or: [specialFlag and:
> [method scanFor: specialByte]])
> -                       ifTrue:
> -                               [((literal isVariableBinding) not
> -                                       or: [method literals allButLast
> includes: literal])
> -                                               ifTrue: [who add: sel]]].
> -       ^ who!
>
> Item was changed:
>  ----- Method: Behavior>>whichSelectorsReferTo:special:byte: (in category
> 'testing method dictionary') -----
>  whichSelectorsReferTo: literal special: specialFlag byte: specialByte
>        "Answer a set of selectors whose methods access the argument as a
> literal."
>
> +       ^self whichSelectorsReferTo: literal special: specialFlag byte:
> specialByte thorough: false!
> -       | who |
> -       who := IdentitySet new.
> -       self selectorsAndMethodsDo:
> -               [:sel :method |
> -               ((method hasLiteral: literal) or: [specialFlag and: [method
> scanFor: specialByte]])
> -                       ifTrue:
> -                               [((literal isVariableBinding) not
> -                                       or: [method literals allButLast
> includes: literal])
> -                                               ifTrue: [who add: sel]]].
> -       ^ who!
>
> Item was added:
> + ----- Method: Behavior>>whichSelectorsReferTo:special:byte:thorough: (in
> category 'testing method dictionary') -----
> + whichSelectorsReferTo: literal special: specialFlag byte: specialByte
> thorough: thorough
> +       "Answer a set of selectors whose methods access the argument as a
> literal. If thorough is true, then dives into the compact literal notation,
> making it slow but thorough "
> +
> +       | who |
> +       who := IdentitySet new.
> +       self selectorsAndMethodsDo: [ :selector :method |
> +               (((thorough
> +                       ifFalse: [ method hasLiteral: literal ]
> +                       ifTrue: [ method hasLiteralThorough: literal ]) or:
> [
> +                               specialFlag and: [ method scanFor:
> specialByte ] ]) and: [
> +                       literal isVariableBinding not or: [
> +                               method literals allButLast includes:
> literal] ]) ifTrue: [
> +                       who add: selector ] ].
> +       ^who!
>
> Item was changed:
>  ----- Method: CompiledMethod>>getPreambleFrom:at: (in category 'source
> code management') -----
>  getPreambleFrom: aFileStream at: position
>
>        |  writeStream |
> +       writeStream := (String new: 100) writeStream.
> -       writeStream := String new writeStream.
>        position to: 0 by: -1 do: [ :p |
>                | c |
>                aFileStream position: p.
>                (c := aFileStream basicNext) == $!!
>                        ifTrue: [ ^writeStream contents reversed ]
>                        ifFalse: [ writeStream nextPut: c ] ]!
>
> Item was removed:
> - ----- Method: MethodReference>>actualClass (in category '*Kernel-Traits')
> -----
> - actualClass
> -
> -       | actualClass |
> -
> -       actualClass := Smalltalk at: classSymbol ifAbsent: [^nil].
> -       classIsMeta ifTrue: [^actualClass classSide].
> -       ^actualClass
> -
> - !
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20110315/e53566f4/attachment.htm


More information about the Squeak-dev mailing list