[squeak-dev] The Trunk: Tools-eem.833.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Oct 17 16:19:39 UTC 2018


Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.833.mcz

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

Name: Tools-eem.833
Author: eem
Time: 17 October 2018, 9:19:18.006868 am
UUID: df9e1979-bd01-4f51-9e12-40fd3b872978
Ancestors: Tools-cmm.831

Fix a bug with DebuggerMethodMap and full blocks (Sista V1 bytecode set).  DebuggerMethodMap must be careful to use the right kind iof dictionry (Dictionary vs IdentityDictionary) for mapping startKeys to block starts and block starts to temps.  startKeys may be values (startpc with embedded blocks) or objects (initialPC and block itself for full blocks).  And blockExtentsToTempRefs must always be a Dictionary ince block extents are ranges.

[N.B. Tools-eem.832 contained a broken fix for this bug, sending the message homeMethod to aContext, instead of aContext home method]

=============== Diff against Tools-cmm.831 ===============

Item was changed:
  ----- Method: DebuggerMethodMapForClosureCompiledMethods>>privateTempRefsForContext:startKeysToBlockExtents: (in category 'private') -----
  privateTempRefsForContext: aContext startKeysToBlockExtents: theContextsStartKeysToBlockExtents
  	"Answer the sequence of temps in scope in aContext in the natural order,
  	 outermost arguments and temporaries first, innermost last.  Each temp is
  	 a pair of the temp's name followed by a reference.  The reference can be
  		integer - index of temp in aContext
  		#( indirectionVectorIndex tempIndex ) - remote temp in indirectionVector at index in aContext
  		#( outer. temp reference ) - a temp reference in an outer context."
  	blockExtentsToTempRefs ifNil:
  		[blockExtentsToTempRefs := (aContext method holdsTempNames
  										ifTrue: [aContext method]
  										ifFalse: [methodNode]) blockExtentsToTempsMap.
+ 		 blockExtentsToTempRefs
+ 			ifNil: ["an empty method.  shouldn't be able to step into here but it
+ 				  can happen in weird circumstances (i.e. with MethodWrapper)."
+ 				blockExtentsToTempRefs := Dictionary new.
+ 				blockExtentsToTempRefs
+ 					at: (theContextsStartKeysToBlockExtents at: aContext startKey)
+ 					put: {}]
+ 			ifNotNil:
+ 				[(blockExtentsToTempRefs isKindOf: IdentityDictionary) ifTrue:
+ 					[blockExtentsToTempRefs := Dictionary withAll: blockExtentsToTempRefs associations]].
+ 		 startKeysToTempRefs := aContext home method newBlockStartMap].
- 		 blockExtentsToTempRefs ifNil:
- 			["an empty method.  shouldn't be able to step into here but it
- 			  can happen in weird circumstances (i.e. with MethodWrapper)."
- 			blockExtentsToTempRefs := Dictionary new.
- 			blockExtentsToTempRefs
- 				at: (theContextsStartKeysToBlockExtents at: aContext startKey)
- 				put: {}].
- 		 startKeysToTempRefs := Dictionary new].
  	^startKeysToTempRefs
  		at: aContext startKey
  		ifAbsentPut:
  			[| localRefs |
  			 localRefs := blockExtentsToTempRefs at: (theContextsStartKeysToBlockExtents at: aContext startKey) ifAbsent: [#()].
  			 aContext outerContext
  				ifNil: [localRefs]
  				ifNotNil:
  					[:outer| | outerTemps |
  					"Present temps in the order outermost to innermost left-to-right, but replace
  					 copied outermost temps with their innermost copies"
  					 outerTemps := (self
  										privateTempRefsForContext: outer
  										startKeysToBlockExtents: theContextsStartKeysToBlockExtents) collect:
  						[:outerPair|
  						localRefs
  							detect: [:localPair| outerPair first = localPair first]
  							ifNone: [{ outerPair first. { #outer. outerPair last } }]].
  					outerTemps,
  					 (localRefs reject: [:localPair| outerTemps anySatisfy: [:outerPair| localPair first = outerPair first]])]]!



More information about the Squeak-dev mailing list