The Trunk: Tools-ar.149.mcz

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

The Trunk: Tools-ar.149.mcz

commits-2
Andreas Raab uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ar.149.mcz

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

Name: Tools-ar.149
Author: ar
Time: 22 December 2009, 1:02:22 am
UUID: bbe591e6-55df-4b48-9f65-89cf3feff4a5
Ancestors: Tools-nice.148

CompiledMethodTrailer phase 3.

=============== Diff against Tools-nice.148 ===============

Item was changed:
  ----- Method: ChangeList>>restoreDeletedMethod (in category 'viewing access') -----
  restoreDeletedMethod
  "If lostMethodPointer is not nil, then this is a version browser for a method that has been removed.  In this case we want to establish a sourceCode link to prior versions.  We do this by installing a dummy method with the correct source code pointer prior to installing this version."
  | dummyMethod class selector |
+ dummyMethod := CompiledMethod toReturnSelfTrailerBytes:
+ (CompiledMethodTrailer new sourcePointer: lostMethodPointer).
- dummyMethod := CompiledMethod toReturnSelf setSourcePointer: lostMethodPointer.
  class := (changeList at: listIndex) methodClass.
  selector := (changeList at: listIndex) methodSelector.
  class addSelectorSilently: selector withMethod: dummyMethod.
  (changeList at: listIndex) fileIn.
  "IF for some reason, the dummy remains, remove it, but (N.B.!!) we might not get control back if the compile (fileIn above) fails."
  (class compiledMethodAt: selector) == dummyMethod
  ifTrue: [class basicRemoveSelector: selector].
  ^ true!

Item was changed:
  ----- Method: ChangeSorter>>browseVersions (in category 'message list') -----
  browseVersions
  "Create and schedule a changelist browser on the versions of the
  selected message."
  | class selector method category pair sourcePointer |
 
  (selector := self selectedMessageName) ifNil: [^ self].
  class := self selectedClassOrMetaClass.
  (class includesSelector: selector)
  ifTrue: [method := class compiledMethodAt: selector.
  category := class whichCategoryIncludesSelector: selector.
  sourcePointer := nil]
  ifFalse: [pair := myChangeSet methodInfoFromRemoval: {class name. selector}.
  pair ifNil: [^ nil].
  sourcePointer := pair first.
+ method := CompiledMethod toReturnSelfTrailerBytes:
+ (CompiledMethodTrailer new sourcePointer: sourcePointer).
- method := CompiledMethod toReturnSelf setSourcePointer: sourcePointer.
  category := pair last].
  VersionsBrowser
  browseVersionsOf: method
  class: self selectedClass meta: class isMeta
  category: category selector: selector
  lostMethodPointer: sourcePointer.
  !