Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.378.mcz
==================== Summary ====================
Name: Compiler-eem.378
Author: eem
Time: 14 March 2018, 7:13:03.579626 pm
UUID: 9e96b6bb-8a69-4250-9b67-e61ce104cadc
Ancestors: Compiler-eem.377
Provide a full block extractor, e.g. to support InstructionStream>>blockMethodOrNil a la selectorToSendOrSelf.
Fix a typo.
=============== Diff against Compiler-eem.377 ===============
Item was added:
+ ----- Method: BytecodeEncoder class>>blockMethodOrNilFor:in:at: (in category 'instruction stream support') -----
+ blockMethodOrNilFor: anInstructionStream in: method at: pc
+ "If anInstructionStream is at a block creation bytecode then answer the block's
+ CompiledBlock, otherwise answer nil.
+ Subclasses override as appropriate."
+
+ ^nil!
Item was changed:
----- Method: BytecodeEncoder class>>createClosureCode (in category 'bytecode decoding') -----
createClosureCode
+ "Answer the create closure bytecode, if it exists in the encoder's bytecode set, or nil if not."
- "Answer the create closure bytecode, if it exists in the encoder's byetcode set, or nil if not."
^nil!
Item was added:
+ ----- Method: EncoderForSistaV1 class>>blockMethodOrNilFor:in:at: (in category 'instruction stream support') -----
+ blockMethodOrNilFor: anInstructionStream in: method at: pc
+ "If anInstructionStream is at a block creation bytecode then answer the block's
+ CompiledBlock, otherwise answer nil.
+
+ The complication is that for convenience we allow the pc to point to the
+ raw send bytecode after its extension(s), or at the extension(s) preceeding it.
+ 249 11111001 xxxxxxxx siyyyyyy push Closure Compiled block literal index xxxxxxxx (+ Extend A * 256) numCopied yyyyyy receiverOnStack: s = 1 ignoreOuterContext: i = 1"
+
+ | byte |
+ byte := method at: pc.
+ byte = 249 ifTrue:
+ ["it could be extended..."
+ ^self extensionsFor: pc in: method into:
+ [:extA :extB :nExtBytes|
+ method literalAt: (method at: pc + nExtBytes + 1) + (extA bitShift: 8) + 1]].
+ ^byte = 16rE0 ifTrue:
+ [self extensionsAt: pc in: method into:
+ [:extA :extB :nExtBytes|
+ (method at: pc + nExtBytes) = 249 ifTrue:
+ [method literalAt: (method at: pc + nExtBytes + 1) + (extA bitShift: 8) + 1]]]!
Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.1400.mcz
==================== Summary ====================
Name: Morphic-eem.1400
Author: eem
Time: 14 March 2018, 7:10:14.547591 pm
UUID: d4a50144-3d70-4ec6-95d4-5be59d2c0fbb
Ancestors: Morphic-mt.1399
Senders of userString such as Morph>>allStringsAfter: allow for the possibility of userString being nil. Indeed click on the background during new release image configuration and this will occur. So make TextMorph>>userString answer nil if it has no text as yet.
=============== Diff against Morphic-mt.1399 ===============
Item was changed:
----- Method: TextMorph>>userString (in category 'accessing') -----
userString
"Do I have a text string to be searched on?"
+ ^text ifNotNil: [:txt| txt string]!
- ^ text string!
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1006.mcz
==================== Summary ====================
Name: System-eem.1006
Author: eem
Time: 14 March 2018, 1:42:43.001695 pm
UUID: ed1f0de6-02eb-494d-8d50-3f65cd70bdaa
Ancestors: System-eem.1005
Have MethodReference>>compiledMethod answer nil when the method is no longer present, instead of throwing an error. Use this to make SystemNavigation>>allCallsOn:fromMethodReferences:sorted: more robust.
=============== Diff against System-eem.1005 ===============
Item was changed:
----- Method: MethodReference>>compiledMethod (in category 'accessing') -----
compiledMethod
+ ^self actualClass compiledMethodAt: methodSymbol ifAbsent: nil!
- ^ self actualClass compiledMethodAt: methodSymbol!
Item was changed:
----- Method: SystemNavigation>>allCallsOn:fromMethodReferences:sorted: (in category 'query') -----
allCallsOn: aLiteral fromMethodReferences: methodReferences sorted: sorted
"Answer a collection of all the methods implemented by behaviors that call on aLiteral even deeply embedded in literal arrays."
| result |
result := CompiledCode
scanBlocksForLiteral: aLiteral
do: [:primaryScanner :secondaryScanner | | thorough |
"Possibly search for literals embedded in literal arrays or pragmas, etc."
thorough := self class thoroughSenders.
methodReferences select:
[ :reference |
reference compiledMethod
+ ifNil: [false]
+ ifNotNil:
+ [:method|
+ method
+ refersTo: aLiteral
+ primaryBytecodeScanner: primaryScanner
+ secondaryBytecodeScanner: secondaryScanner
+ thorough: thorough]]].
- refersTo: aLiteral
- primaryBytecodeScanner: primaryScanner
- secondaryBytecodeScanner: secondaryScanner
- thorough: thorough]].
sorted ifTrue:
[result sort].
^result!
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.800.mcz
==================== Summary ====================
Name: Tools-eem.800
Author: eem
Time: 14 March 2018, 1:26:31.899555 pm
UUID: ef0a6927-db4f-4904-8604-9b23c32852f1
Ancestors: Tools-topa.799
Make local senders of... meaningful in MessageSets (e.g. Recent Submissions) when no method is selected, so that one can filter within a list browser.
=============== Diff against Tools-topa.799 ===============
Item was added:
+ ----- Method: MessageSet>>browseLocalSendersOfMessages (in category 'message functions') -----
+ browseLocalSendersOfMessages
+ "Override so that if no method is selected it searches for senders local to the current list."
+
+ self selectedClass ifNotNil:
+ [^super browseLocalSendersOfMessages].
+
+ self getSelectorAndSendQuery: #value:value:
+ to: [:literal :label|
+ self systemNavigation browseAllCallsOn: literal fromMethodReferences: messageList labelled: label]
+ with: { 'messages' }!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1160.mcz
==================== Summary ====================
Name: Kernel-eem.1160
Author: eem
Time: 14 March 2018, 1:18:41.442045 pm
UUID: 0a0fe6ff-b25f-435d-b991-ea7944c79aec
Ancestors: Kernel-eem.1159
An addition for class-side refactorings in StringHolder. (What the hell is StringHolder doing in Kernel? :-) )
=============== Diff against Kernel-eem.1159 ===============
Item was changed:
----- Method: StringHolder>>selectedClassName (in category 'accessing') -----
selectedClassName
"I may know what class is currently selected"
+ ^self selectedClass ifNotNil: [:selectedClass| selectedClass name]!
- self selectedClass ifNotNil: [^ self selectedClass name].
- ^ nil!
Item was added:
+ ----- Method: StringHolder>>selectedClassOrMetaClassName (in category 'accessing') -----
+ selectedClassOrMetaClassName
+ "I may know what class is currently selected"
+
+ ^self selectedClassOrMetaClass ifNotNil: [:selectedClass| selectedClass name]!