The Trunk: System-fbs.535.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-fbs.535.mcz

commits-2
Frank Shearar uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-fbs.535.mcz

==================== Summary ====================

Name: System-fbs.535
Author: fbs
Time: 21 May 2013, 9:22:56.014 pm
UUID: f41c3215-fd9f-478a-a4db-0bea16b3b456
Ancestors: System-fbs.534

Environmentally-aware SystemNavigation didn't look at the metaclass heirarchy, so couldn't find class-side implementors, for instance.

=============== Diff against System-fbs.534 ===============

Item was changed:
  ----- Method: MethodReference>>printOn: (in category 'printing') -----
  printOn: aStream
+ | actualClass |
  "Print the receiver on a stream"
+ actualClass := classSymbol asString.
+ classIsMeta ifTrue: [actualClass := actualClass, ' class'].
-
  super printOn: aStream.
+ aStream nextPutAll: ' ', actualClass, ' >> ', methodSymbol printString.!
- aStream nextPutAll: ' ', self actualClass name, ' >> ', methodSymbol!

Item was changed:
  ----- Method: SystemNavigation>>allBehaviorsDo: (in category 'query') -----
  allBehaviorsDo: aBlock
  "Evaluate the argument, aBlock, for each kind of Behavior in the system
  (that is, Object and its subclasses and Traits).
  ar 7/15/1999: The code below will not enumerate any obsolete or anonymous
  behaviors for which the following should be executed:
 
  Smalltalk allObjectsDo:[:obj| obj isBehavior ifTrue:[aBlock value: obj]].
 
  but what follows is way faster than enumerating all objects."
 
+ self environment allClassesAndTraitsDo: [:class |
+ aBlock value: class.
+ aBlock value: class class].!
- self environment allClassesAndTraitsDo: aBlock.!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-fbs.535.mcz

Frank Shearar-3
On 21 May 2013 21:23,  <[hidden email]> wrote:

> Frank Shearar uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-fbs.535.mcz
>
> ==================== Summary ====================
>
> Name: System-fbs.535
> Author: fbs
> Time: 21 May 2013, 9:22:56.014 pm
> UUID: f41c3215-fd9f-478a-a4db-0bea16b3b456
> Ancestors: System-fbs.534
>
> Environmentally-aware SystemNavigation didn't look at the metaclass heirarchy, so couldn't find class-side implementors, for instance.
>
> =============== Diff against System-fbs.534 ===============
>
> Item was changed:
>   ----- Method: MethodReference>>printOn: (in category 'printing') -----
>   printOn: aStream
> +       | actualClass |
>         "Print the receiver on a stream"
> +       actualClass := classSymbol asString.
> +       classIsMeta ifTrue: [actualClass := actualClass, ' class'].
> -
>         super printOn: aStream.
> +       aStream nextPutAll: ' ', actualClass, ' >> ', methodSymbol printString.!
> -       aStream nextPutAll: ' ', self actualClass name, ' >> ', methodSymbol!

I had intended to make this a separate commit. With Environments,
"actualClass" is broken because it means "look up this classSymbol in
Smalltalk globals". The tests are all Environment-specific (as is
right and proper), so this just makes the MethodReference print
properly again. (Without this change you'd see something like 'a
MethodReference (nil >> #foo)'.)

However, going forwards we probably want to make a MethodReference
Environment-aware, by adding the Environment within which this
referenced method lives.

Then #actualClass will look something like this:

actualClass
    ^ self environment at: classSymbol ifPresent: [ :actualClass |
        classIsMeta
            ifTrue: [ actualClass classSide ]
            ifFalse: [ actualClass ] ]

(Or maybe we should rather use the as-yet-unwritten
#valueOf:ifPresent:, rather than the legacy Dictionary protocol).

frank