[squeak-dev] The Trunk: System-mt.1135.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Feb 21 15:35:53 UTC 2020


Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1135.mcz

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

Name: System-mt.1135
Author: mt
Time: 21 February 2020, 4:35:48.109211 pm
UUID: f31d494b-5adf-4849-a047-bac3376f3e6b
Ancestors: System-mt.1134, System-ct.1132, System-ct.1134

Two more fixes from Christoph (ct). Thanks!

=============== Diff against System-mt.1134 ===============

Item was changed:
  ----- Method: ChangeSet class>>scanVersionsOf:class:meta:category:selector: (in category 'scanning') -----
+ scanVersionsOf: method class: class meta: meta category: category selector: selector
+ 
+ 	| changeList cat position sourceFilesCopy file |
- scanVersionsOf: method class: class meta: meta category: cat selector: selector
- 	| position prevPos prevFileIndex preamble tokens sourceFilesCopy stamp changeList file |
  	changeList := OrderedCollection new.
+ 	cat := category ifNil: [''].
  	position := method filePosition.
+ 	sourceFilesCopy := SourceFiles collect: [:x |
+ 		x ifNotNil: [x readOnlyCopy]].
+ 	method fileIndex isZero ifTrue: [^ nil].
- 	sourceFilesCopy := SourceFiles collect:[:x | x ifNotNil:[x readOnlyCopy]].
- 	method fileIndex = 0 ifTrue: [^ nil].
  	file := sourceFilesCopy at: method fileIndex.
+ 	[position notNil and: [file notNil]] whileTrue: [
+ 		| preamble prevFileIndex prevPos stamp tokens |
- 	[position notNil & file notNil] whileTrue:[
  		preamble := method getPreambleFrom: file at: (0 max: position - 3).
+ 		"Preamble is likely a linked method preamble, if we're in a changes file (not the sources file).
+ 		Try to parse it for prior source position and file index."
- 		"Preamble is likely a linked method preamble, if we're in
- 			a changes file (not the sources file).  Try to parse it
- 			for prior source position and file index"
  		prevPos := nil.
  		stamp := ''.
+ 		tokens := (preamble findString: 'methodsFor:' startingAt: 1) > 0
+ 			ifTrue: [[Scanner new scanTokens: preamble] ifError: [#()]]
+ 			ifFalse: [#() "ie cant be back ref"].
- 		(preamble findString: 'methodsFor:' startingAt: 1) > 0
- 			ifTrue: [tokens := [Scanner new scanTokens: preamble] on: Error do:[#()]]
- 			ifFalse: [tokens := Array new  "ie cant be back ref"].
  		((tokens size between: 7 and: 8)
+ 			and: [(tokens at: tokens size - 5) = #methodsFor:])
+ 			ifTrue: [
+ 				(tokens at: tokens size - 3) = #stamp:
+ 					ifTrue: [ "New format gives change stamp and unified prior pointer"
+ 						stamp := tokens at: tokens size - 2.
+ 						prevPos := tokens last.
+ 						prevFileIndex := sourceFilesCopy fileIndexFromSourcePointer: prevPos.
+ 						prevPos := sourceFilesCopy filePositionFromSourcePointer: prevPos]
+ 					ifFalse: [ "Old format gives no stamp; prior pointer in two parts"
+ 						prevPos := tokens at: tokens size - 2.
+ 						prevFileIndex := tokens last].
+ 				cat := tokens at: tokens size - 4.
+ 				(prevPos = 0 or: [prevFileIndex = 0]) ifTrue: [prevPos := nil]].
- 			and: [(tokens at: tokens size-5) = #methodsFor:]) ifTrue:[
- 				(tokens at: tokens size-3) = #stamp: ifTrue:[
- 					"New format gives change stamp and unified prior pointer"
- 					stamp := tokens at: tokens size-2.
- 					prevPos := tokens last.
- 					prevFileIndex := sourceFilesCopy fileIndexFromSourcePointer: prevPos.
- 					prevPos := sourceFilesCopy filePositionFromSourcePointer: prevPos.
- 				] ifFalse: ["Old format gives no stamp; prior pointer in two parts"
- 					prevPos := tokens at: tokens size-2.
- 					prevFileIndex := tokens last.
- 				].
- 				(prevPos = 0 or: [prevFileIndex = 0]) ifTrue: [prevPos := nil]
- 			].
  		((tokens size between: 5 and: 6)
+ 			and: [(tokens at: tokens size - 3) = #methodsFor:])
+ 			ifTrue: [
+ 				(tokens at: tokens size - 1) = #stamp:
+ 					ifTrue: [ "New format gives change stamp and unified prior pointer"
+ 						stamp := tokens at: tokens size].
+ 				cat := tokens at: tokens size - 2].
+  		changeList add: (ChangeRecord new
+ 			file: file position: position type: #method
+ 			class: class name category: cat meta: meta stamp: stamp).
- 			and: [(tokens at: tokens size-3) = #methodsFor:]) ifTrue:[
- 				(tokens at: tokens size-1) = #stamp: ifTrue: [
- 					"New format gives change stamp and unified prior pointer"
- 					stamp := tokens at: tokens size.
- 			]
- 		].
-  		changeList add: (ChangeRecord new file: file position: position type: #method
- 						class: class name category: cat meta: meta stamp: stamp).
  		position := prevPos.
+ 		prevPos ifNotNil: [file := sourceFilesCopy at: prevFileIndex]].
+ 	sourceFilesCopy do: [:x | x ifNotNil: [x close]]. self flag: #ct "ensure?".
+ 	^ changeList!
- 		prevPos notNil ifTrue:[file := sourceFilesCopy at: prevFileIndex].
- 	].
- 	sourceFilesCopy do: [:x | x ifNotNil:[x close]].
- 	^changeList!

Item was changed:
  ----- Method: Utilities class>>initializeCommonRequestStrings (in category 'common requests') -----
  initializeCommonRequestStrings
  	"Initialize the common request strings, a directly-editable list of expressions that can be evaluated from the 'do...' menu."
  
  	CommonRequestStrings := StringHolder new contents: 
  'Utilities emergencyCollapse.
  Utilities closeAllDebuggers.
  RecentMessages default revertMostRecent.
  -
  MCFileBasedRepository flushAllCaches
  -
  Sensor keyboard.
  ParagraphEditor abandonChangeText.
  Cursor normal show.
  -
  CommandHistory resetAllHistory.
  Project allInstancesDo: [:p | p displayDepth: 16].
  ScriptingSystem inspectFormDictionary.
  Form fromUser bitEdit.
  Display border: (0 at 0 extent: 640 at 480) width: 2.
  -
  Undeclared inspect.
  Undeclared removeUnreferencedKeys; inspect.
  Transcript clear.
+ GIFReadWriter grabScreenAndSaveOnDisk.
- Utilities grabScreenAndSaveOnDisk.
  FrameRateMorph new openInHand.
  -
  Utilities reconstructTextWindowsFromFileNamed: ''TW''.
  Utilities storeTextWindowContentsToFileNamed: ''TW''.
  ChangeSet removeEmptyUnnamedChangeSets.
  ChangesOrganizer reorderChangeSets.
  -
  ActiveWorld installVectorVocabulary.
  ActiveWorld abandonVocabularyPreference.'
  
  "Utilities initializeCommonRequestStrings"!



More information about the Squeak-dev mailing list