Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.821.mcz
==================== Summary ====================
Name: Tools-eem.821
Author: eem
Time: 16 June 2018, 2:35:48.93167 pm
UUID: bfb6adeb-a9c8-44a3-bd7e-fe35f317872d
Ancestors: Tools-eem.820
Correct pc range computation for full blocks. "self method" answers the home metyhod, and hence confuses things horribly when using full blocks. This is a slip; I had added the method argument but not used it in all cases. Doh!
=============== Diff against Tools-eem.820 ===============
Item was removed:
- ----- Method: DebuggerMethodMap>>rangeForPC:contextIsActiveContext: (in category 'private but obsolete') -----
- rangeForPC: contextsConcretePC contextIsActiveContext: contextIsActiveContext
- "Answer the indices in the source code for the supplied pc.
- If the context is the actve context (is at the hot end of the stack)
- then its pc is the current pc. But if the context isn't, because it is
- suspended sending a message, then its current pc is the previous pc."
-
- | pc i end |
- pc := self method abstractPCForConcretePC: (contextIsActiveContext
- ifTrue: [contextsConcretePC]
- ifFalse: [(self method pcPreviousTo: contextsConcretePC)
- ifNotNil: [:prevpc| prevpc]
- ifNil: [contextsConcretePC]]).
- (self abstractSourceMap includesKey: pc) ifTrue:
- [^self abstractSourceMap at: pc].
- sortedSourceMap ifNil:
- [sortedSourceMap := self abstractSourceMap associations
- replace: [ :each | each copy ];
- sort].
- sortedSourceMap isEmpty ifTrue: [^1 to: 0].
- i := sortedSourceMap findNearbyBinaryIndex: [:assoc| pc - assoc key].
- i < 1 ifTrue: [^1 to: 0].
- i > sortedSourceMap size ifTrue:
- [end := sortedSourceMap inject: 0 into:
- [:prev :this | prev max: this value last].
- ^end+1 to: end].
- ^(sortedSourceMap at: i) value
-
- "| method source scanner map |
- method := DebuggerMethodMap compiledMethodAt: #rangeForPC:contextIsActiveContext:.
- source := method getSourceFromFile asString.
- scanner := InstructionStream on: method.
- map := method debuggerMap.
- Array streamContents:
- [:ranges|
- [scanner atEnd] whileFalse:
- [| range |
- range := map rangeForPC: scanner pc contextIsActiveContext: true.
- ((map abstractSourceMap includesKey: scanner abstractPC)
- and: [range first ~= 0]) ifTrue:
- [ranges nextPut: (source copyFrom: range first to: range last)].
- scanner interpretNextInstructionFor: InstructionClient new]]"!
Item was changed:
----- Method: DebuggerMethodMap>>rangeForPC:in:contextIsActiveContext: (in category 'source mapping') -----
rangeForPC: contextsConcretePC in: method contextIsActiveContext: contextIsActiveContext
"Answer the indices in the source code for the supplied pc.
If the context is the actve context (is at the hot end of the stack)
then its pc is the current pc. But if the context isn't, because it is
suspended sending a message, then its current pc is the previous pc."
| pc i end |
+ pc := method abstractPCForConcretePC: (contextIsActiveContext
- pc := self method abstractPCForConcretePC: (contextIsActiveContext
ifTrue: [contextsConcretePC]
+ ifFalse: [(method pcPreviousTo: contextsConcretePC)
- ifFalse: [(self method pcPreviousTo: contextsConcretePC)
ifNotNil: [:prevpc| prevpc]
ifNil: [contextsConcretePC]]).
(self abstractSourceMap includesKey: pc) ifTrue:
[^self abstractSourceMap at: pc].
sortedSourceMap ifNil:
[sortedSourceMap := self abstractSourceMap associations
replace: [ :each | each copy ];
sort].
sortedSourceMap isEmpty ifTrue: [^1 to: 0].
i := sortedSourceMap findNearbyBinaryIndex: [:assoc| pc - assoc key].
i < 1 ifTrue: [^1 to: 0].
i > sortedSourceMap size ifTrue:
[end := sortedSourceMap inject: 0 into:
[:prev :this | prev max: this value last].
^end+1 to: end].
^(sortedSourceMap at: i) value
"| method source scanner map |
method := DebuggerMethodMap compiledMethodAt: #rangeForPC:in:contextIsActiveContext:.
source := method getSourceFromFile asString.
scanner := InstructionStream on: method.
map := method debuggerMap.
Array streamContents:
[:ranges|
[scanner atEnd] whileFalse:
[| range |
range := map rangeForPC: scanner pc in: method contextIsActiveContext: true.
((map abstractSourceMap includesKey: scanner abstractPC)
and: [range first ~= 0]) ifTrue:
[ranges nextPut: (source copyFrom: range first to: range last)].
scanner interpretNextInstructionFor: InstructionClient new]]"!
Item was changed:
----- Method: DebuggerMethodMapForFullBlockCompiledMethods>>rangeForPC:in:contextIsActiveContext: (in category 'source mapping') -----
rangeForPC: contextsConcretePC in: method contextIsActiveContext: contextIsActiveContext
"Answer the indices in the source code for the supplied pc.
If the context is the actve context (is at the hot end of the stack)
then its pc is the current pc. But if the context isn't, because it is
suspended sending a message, then its current pc is the previous pc."
| pc i end mapForMethod sortedMap |
+ pc := method abstractPCForConcretePC: (contextIsActiveContext
- pc := self method abstractPCForConcretePC: (contextIsActiveContext
ifTrue: [contextsConcretePC]
+ ifFalse: [(method pcPreviousTo: contextsConcretePC)
- ifFalse: [(self method pcPreviousTo: contextsConcretePC)
ifNotNil: [:prevpc| prevpc]
ifNil: [contextsConcretePC]]).
((mapForMethod := self abstractSourceMapForMethod: method) includesKey: pc) ifTrue:
[^mapForMethod at: pc].
sortedSourceMap ifNil:
[sortedSourceMap := IdentityDictionary new].
sortedMap := sortedSourceMap
at: method
ifAbsentPut: [mapForMethod associations
replace: [ :each | each copy ];
sort].
sortedMap isEmpty ifTrue: [^1 to: 0].
i := sortedMap findNearbyBinaryIndex: [:assoc| pc - assoc key].
i < 1 ifTrue: [^1 to: 0].
i > sortedMap size ifTrue:
[end := sortedMap inject: 0 into:
[:prev :this | prev max: this value last].
^end+1 to: end].
^(sortedMap at: i) value
"| method source scanner map |
method := DebuggerMethodMapForFullBlockCompiledMethods compiledMethodAt: #rangeForPC:in:contextIsActiveContext:.
source := method getSourceFromFile asString.
scanner := InstructionStream on: method.
map := method debuggerMap.
Array streamContents:
[:ranges|
[scanner atEnd] whileFalse:
[| range |
range := map rangeForPC: scanner pc in: method contextIsActiveContext: true.
((map abstractSourceMap includesKey: scanner abstractPC)
and: [range first ~= 0]) ifTrue:
[ranges nextPut: (source copyFrom: range first to: range last)].
scanner interpretNextInstructionFor: InstructionClient new]]"!
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-hjh.1453.mcz
==================== Summary ====================
Name: Morphic-hjh.1453
Author: hjh
Time: 14 June 2018, 8:47:23.595445 am
UUID: 709cc547-ea46-426f-86a7-e014af1a5f6b
Ancestors: Morphic-cbc.1452
Moved Morph>>beTransparent to 'accessing'
Added guard in MorphicProject>>updateLocaleDependents to check for the presence of Etoys
Fix comment in Morph>>saveOnFile (SmartRefStream)
This change makes 'New MorphicProject' work after unloading Etoys (Preference okToReinitializeFlaps not enabled )
=============== Diff against Morphic-cbc.1452 ===============
Item was added:
+ ----- Method: Morph>>beTransparent (in category 'accessing') -----
+ beTransparent
+ self color: Color transparent!
Item was changed:
----- Method: Morph>>saveOnFile (in category 'fileIn/out') -----
saveOnFile
+ "Ask the user for a filename and save myself on a SmartRefStream file. Writes out the version and class structure. The file is fileIn-able. UniClasses will be filed out."
- "Ask the user for a filename and save myself on a SmartReferenceStream file. Writes out the version and class structure. The file is fileIn-able. UniClasses will be filed out."
| aFileName |
aFileName := ('my {1}.morph' translated format: {self class name}) asFileName. "do better?"
aFileName := UIManager default saveFilenameRequest: 'File name?' translated
initialAnswer: aFileName.
aFileName ifNil: [^ Beeper beep].
self allMorphsDo: [:m | m prepareToBeSaved].
self saveOnFileNamed: aFileName!
Item was changed:
----- Method: MorphicProject>>updateLocaleDependents (in category 'language') -----
updateLocaleDependents
"Set the project's natural language as indicated"
+ (self world respondsTo: #isTileScriptingElement) ifTrue: "Etoys present" [
ActiveWorld allTileScriptingElements do: [:viewerOrScriptor |
+ viewerOrScriptor localeChanged]].
- viewerOrScriptor localeChanged].
Flaps disableGlobalFlaps: false.
(Preferences eToyFriendly or: [
(Smalltalk classNamed: 'SugarNavigatorBar') ifNotNil: [:c | c showSugarNavigator] ifNil: [false]])
ifTrue: [
Flaps addAndEnableEToyFlaps.
ActiveWorld addGlobalFlaps]
ifFalse: [Flaps enableGlobalFlaps].
(Project current isFlapIDEnabled: 'Navigator' translated)
ifFalse: [Flaps enableDisableGlobalFlapWithID: 'Navigator' translated].
ScrapBook default emptyScrapBook.
MenuIcons initializeTranslations.
super updateLocaleDependents.
"self setFlaps.
self setPaletteFor: aLanguageSymbol."
!
Eliot Miranda uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-TonelReaderTest.684.mcz
==================== Summary ====================
Name: Monticello-TonelReaderTest.684
Author: TonelReaderTest
Time: 15 June 2018, 12:39:16.107577 pm
UUID: fafb033d-9440-4a4a-bdb6-a6d6f7eb4b6a
Ancestors: Monticello-dtl.683
Add MCMethodDefinition>>protocol, a much better selectror name than category.
=============== Diff against Monticello-dtl.683 ===============
Item was added:
+ ----- Method: MCMethodDefinition>>protocol (in category 'accessing') -----
+ protocol
+ "Answer in which protocol (conceptual groups of methods) the receiver is grouped into."
+ ^category!
Eliot Miranda uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-eem.684.mcz
==================== Summary ====================
Name: Monticello-eem.684
Author: eem
Time: 15 June 2018, 1:08:30.353809 pm
UUID: edb03d67-d035-4a12-a5d8-8351848c9e0a
Ancestors: Monticello-dtl.683
Add MCMethodDefinition>>protocol, a much better message name than "category".
=============== Diff against Monticello-dtl.683 ===============
Item was added:
+ ----- Method: MCMethodDefinition>>protocol (in category 'accessing') -----
+ protocol
+ "Answer in which protocol (conceptual groups of methods) the receiver is grouped into."
+ ^category!
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.820.mcz
==================== Summary ====================
Name: Tools-eem.820
Author: eem
Time: 14 June 2018, 4:02:54.342614 pm
UUID: 7c6f4563-ffe9-4fa7-ac3c-eccfbd88b635
Ancestors: Tools-nice.819
Provide concretePCForAbstractPC:, the inverse of abstractPCForConcretePC:. Used by the TempScopeEditor
=============== Diff against Tools-nice.819 ===============
Item was added:
+ ----- Method: CompiledCode>>concretePCForAbstractPC: (in category '*Tools-Debugger-support') -----
+ concretePCForAbstractPC: abstractPCQuery
+ "Answer the concretePC matching abstractPC."
+
+ | abstractPC scanner client endPC |
+ self flag: 'belongs in DebuggerMethodMap?'.
+ abstractPC := 1.
+ scanner := InstructionStream on: self.
+ client := InstructionClient new.
+ "cache endPC for methods with embedded source; finding out the endPC is very slow in this case..."
+ endPC := self endPC.
+ [abstractPC >= abstractPCQuery ifTrue:
+ [^scanner pc].
+ abstractPC := abstractPC + 1.
+ scanner interpretNextInstructionFor: client.
+ scanner pc < endPC] whileTrue.
+ ^endPC!
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.400.mcz
==================== Summary ====================
Name: Tests-ul.400
Author: ul
Time: 14 June 2018, 11:55:26.048374 pm
UUID: 4c2d51f0-2dc3-4f2f-8ba9-87f1ee697845
Ancestors: Tests-ul.399
do not nag the user about setting the author initials #4
=============== Diff against Tests-ul.399 ===============
Item was changed:
----- Method: MethodReferenceTest>>setUp (in category 'running') -----
setUp
| g p |
env := Environment withName: 'test'.
g := self createClass: #Griffle.
p := self createClass: #Plonk.
+ g compileSilently: 'foo ^ 1'.
- g compile: 'foo ^ 1'.
g organization classify: #foo under: #accessing.
+ g class compileSilently: 'classFoo ^ 1'.
+ g compileSilently: 'bar ^ 1'.
+ p compileSilently: 'foo ^ 2'.
- g class compile: 'classFoo ^ 1'.
- g compile: 'bar ^ 1'.
- p compile: 'foo ^ 2'.
self createClass: #Unused.!