[Pkg] The Trunk: System-ul.607.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Oct 25 16:52:41 UTC 2013

Levente Uzonyi uploaded a new version of System to project The Trunk:

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

Name: System-ul.607
Author: ul
Time: 25 October 2013, 6:47:30.844 pm
UUID: 5d2174eb-547d-44d1-8466-98c855eff27e
Ancestors: System-cmm.606

ChangeRecord >> #fileIn: must use the environment to look up the methodClass.
RecentMessages >> #revertMostRecent must pass the environment to the changeRecord, otherwise it can't be filed in.

=============== Diff against System-cmm.606 ===============

Item was changed:
  ----- Method: ChangeRecord>>fileIn: (in category 'initialization') -----
  fileIn: anEnvironment
  	"File the receiver in.  If I represent a method or a class-comment, file the method in and make a note of it in the recent-submissions list; if I represent a do-it, then, well, do it; if I represent a reorganization then get organized!!"
  	Cursor read showWhile:
  		[| s cls aSelector |
  		type == #doIt
  				[((s := self string) beginsWith: '----') ifFalse: [Compiler evaluate: s]]
+ 				[cls := self methodClass: anEnvironment.
- 				[cls := self methodClass.
  				 type == #method ifTrue:
  					[[cls compile: self text classified: category withStamp: stamp notifying: nil]
  					on: EnvironmentRequest do: [:e | e resume: anEnvironment].
  					(aSelector := self methodSelector) ifNotNil:
  						[RecentMessages default recordSelector: aSelector forClass: cls inEnvironment: anEnvironment]].
  				 type == #classComment ifTrue:
  					[cls comment: self text stamp: stamp.
  					RecentMessages default recordSelector: #Comment forClass: cls inEnvironment: anEnvironment].
  				 type == #reorganize ifTrue:
  					[cls organization changeFromString: self text]]]!

Item was changed:
  ----- Method: RecentMessages>>revertMostRecent (in category 'accessing') -----
  	"If the most recent method submission was a method change, revert
  	that change, and if it was a submission of a brand-new method, 
  	remove that method."
  	| changeRecords lastSubmission theClass theSelector |
  	methodReferences ifEmpty: [ ^ Beeper beep ].
  	lastSubmission := self mostRecent.
  	theClass := lastSubmission actualClass ifNil: [ ^ Beeper beep ].
  	theSelector := lastSubmission methodSymbol.
  	changeRecords := theClass changeRecordsAt: theSelector.
  	changeRecords isEmptyOrNil ifTrue: [ ^ Beeper beep ].
  	changeRecords size = 1
  		ifTrue: [ "method has no prior version, so reverting in this case means removing"
  			theClass removeSelector: theSelector ]
+ 		ifFalse: [ changeRecords second fileIn: lastSubmission environment ]
- 		ifFalse: [ changeRecords second fileIn ]

More information about the Packages mailing list