The Trunk: System-eem.1152.mcz

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

The Trunk: System-eem.1152.mcz

commits-2
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1152.mcz

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

Name: System-eem.1152
Author: eem
Time: 15 April 2020, 4:11:22.143513 pm
UUID: 3e0d01fb-556b-4a58-926d-417c7b193a4e
Ancestors: System-mt.1151

Change some SystemNavigation methods to use selectorsDo:; messagesDo: should be deprecated at some point.

=============== Diff against System-mt.1151 ===============

Item was changed:
  ----- Method: SystemNavigation>>allUnimplementedCalls (in category 'query') -----
  allUnimplementedCalls
  "Answer a collection of each message that is sent by an expression in a method but is not implemented by any object in the system."
 
  | result implementedMessages |
  implementedMessages := self allImplementedMessages.
  result := OrderedCollection new.
  self allSelectorsAndMethodsDo: [ :behavior :selector :method |
+ method selectorsDo: [ :each |
- method messagesDo: [ :each |
  (implementedMessages includes: each) ifFalse: [
  result add: (String streamContents: [ :stream |
  stream
  nextPutAll: behavior name;
  space;
  nextPutAll: selector;
  space;
  nextPutAll: 'calls: ';
  nextPutAll: each ]) ] ] ].
  ^result!

Item was changed:
  ----- Method: SystemNavigation>>allUnimplementedNonPrimitiveCalls (in category 'query') -----
  allUnimplementedNonPrimitiveCalls
  "Answer an collection of each message that is sent by an expression in a method but is not implemented by any object in the system. This list won't include primitive methods."
 
  | result implementedMessages |
  implementedMessages := self allImplementedMessages.
  result := OrderedCollection new.
  self allSelectorsAndMethodsDo: [ :behavior :selector :method |
  method primitive = 0 ifTrue: [
+ method selectorsDo: [ :each |
- method messagesDo: [ :each |
  (implementedMessages includes: each) ifFalse: [
  result add: (String streamContents: [ :stream |
  stream
  nextPutAll: behavior name;
  space;
  nextPutAll: selector;
  space;
  nextPutAll: 'calls: ';
  nextPutAll: each ]) ] ] ] ].
  ^result!

Item was changed:
  ----- Method: SystemNavigation>>unimplemented (in category 'query') -----
  unimplemented
  "Answer an collection of each message that is sent by an expression in a method but is not implemented by any object in the system."
 
  | implemented unimplemented |
  implemented := self allImplementedMessages.
  unimplemented := IdentityDictionary new.
  self allSelectorsAndMethodsDo: [ :behavior :selector :method |
+ method selectorsDo: [ :each |
- method messagesDo: [ :each |
  | entry |
  (implemented includes: each) ifFalse: [
  entry := unimplemented
  at: each
  ifPresent: [ :oldEntry |
  oldEntry copyWith: behavior name, '>', selector ]
  ifAbsent: [
  { behavior name, '>', selector } ].
  unimplemented at: each put: entry ] ] ].
  ^unimplemented!