tim Rowledge uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-tpr.783.mcz
==================== Summary ====================
Name: Tools-tpr.783
Author: tpr
Time: 27 December 2017, 3:05:37.548886 pm
UUID: ec5d9e01-4d82-434d-8788-a3610092b229
Ancestors: Tools-tpr.782
Small tidy ups for subdirectory handling
=============== Diff against Tools-tpr.782 ===============
Item was changed:
----- Method: FileAbstractSelectionDialog>>hasMoreDirectories: (in category 'directory tree') -----
hasMoreDirectories: aDirectory
"The directory tree morph needs to know if a specific directory has subdirectories; we cache the answer to speed up later visits to the same directory"
^directoryCache at: aDirectory ifAbsentPut:[
+ [aDirectory hasSubDirectories] on: Error do:[:ex| true].
- [aDirectory directoryNames notEmpty] on: Error do:[:ex| true].
].!
Item was changed:
----- Method: FileAbstractSelectionDialog>>rootDirectoryList (in category 'directory tree') -----
rootDirectoryList
"Return a list of know root directories; forms the root nodes ot the directory tree morph"
| dirList dir |
+ dir := FileDirectory root.
+ dirList := self subDirectoriesOf: dir.
- dir := FileDirectory on: ''.
- dirList := dir directoryNames collect:[:each| dir directoryNamed: each]..
dirList isEmpty ifTrue:[dirList := Array with: FileDirectory default].
+ ^dirList ,(ServerDirectory servers values) "looks odd because #servers returns the Dictionary of known servers with local names instead of the actaul server directories"!
- ^dirList!
David T. Lewis uploaded a new version of 51Deprecated to project The Trunk:
http://source.squeak.org/trunk/51Deprecated-dtl.51.mcz
==================== Summary ====================
Name: 51Deprecated-dtl.51
Author: dtl
Time: 26 December 2017, 5:13:40.93924 pm
UUID: 96aaeb63-4a02-48bb-920d-45cf1fcca952
Ancestors: 51Deprecated-tpr.50
Remove unneeded references to global World (overlooked this commit to the 51Deprecated package).
=============== Diff against 51Deprecated-tpr.50 ===============
Item was changed:
----- Method: ExternalDropHandler class>>registerStandardExternalDropHandlers (in category '*51Deprecated') -----
registerStandardExternalDropHandlers
"ExternalDropHandler registerStandardExternalDropHandlers"
self registeredHandlers add: (
ExternalDropHandler
type: 'image/'
extension: nil
action: [:stream :pasteUp :event |
+ pasteUp addMorph: (Project current world drawingClass withForm: (Form fromBinaryStream: stream binary)) centeredNear: event position])!
- pasteUp addMorph: (World drawingClass withForm: (Form fromBinaryStream: stream binary)) centeredNear: event position])!
tim Rowledge uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-tpr.782.mcz
==================== Summary ====================
Name: Tools-tpr.782
Author: tpr
Time: 24 December 2017, 5:51:10.642614 pm
UUID: efa7a664-f28d-48b3-b2ca-db3519dd633a
Ancestors: Tools-tpr.781
Updates for file dialog stuff
Make DirectroyChooserDialog
a) return a Directory
b) return nil
- as appropriate
Adopt most of dtl's suggested changes
=============== Diff against Tools-tpr.781 ===============
Item was changed:
----- Method: DirectoryChooserDialog class>>openOn:label: (in category 'instance creation') -----
openOn: aDirectory label: labelString
"open a directory chooser starting with aDirectory"
+ "DirectoryChooserDialog openOn: FileDirectory default label: 'Choose the directory to use' "
+
+ ^super new
- ^DirectoryChooserDialog new
directory: aDirectory;
message: labelString;
getUserResponse!
Item was added:
+ ----- Method: DirectoryChooserDialog>>acceptFileName (in category 'initialize-release') -----
+ acceptFileName
+ "User clicked to accept the current state so save the directory and close the dialog"
+
+ finalChoice := directory.
+ self changed: #close!
Item was changed:
----- Method: DirectoryChooserDialog>>finalChoice (in category 'ui details') -----
finalChoice
"return the chosen directory that was saved by an accept click or nil; client must check for validity"
+ ^ finalChoice
+ ifNotNil: [self directory]!
- ^self directory fullName!
Item was changed:
----- Method: FileAbstractSelectionDialog>>cancelFileChooser (in category 'initialize-release') -----
cancelFileChooser
"User clicked to cancel the current state so nil the filename and close the dialog"
+ directory := finalChoice := fileName := nil.
- fileName := nil.
self changed: #close.!
Item was changed:
----- Method: FileAbstractSelectionDialog>>finalChoice (in category 'initialize-release') -----
finalChoice
"return the chosen directory/filename that was saved by an accept click or nil; client must check for validity"
+ ^ finalChoice
+ ifNotNil: [self directory fullNameFor: finalChoice]!
-
- ^self directory fullNameFor: finalChoice!
Item was changed:
FileAbstractSelectionDialog subclass: #FileChooserDialog
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Tools-FileDialogs'!
+ !FileChooserDialog commentStamp: 'dtl 12/21/2017 22:18' prior: 0!
- !FileChooserDialog commentStamp: 'tpr 11/21/2017 18:02' prior: 0!
A FileChooserDialog is a modal dialog to allow choosing a file. The full file name is returned, or nil if no selection was made.
Normal usage would be
+ myFilename := FileChooserDialog openOn: myApplicationDefaultDirectory pattern: '*.myapp' label: 'Choose the file to load'
- myFilename := FileChooserDialog openOn: myApplicationDefaultDirectory pattern: '*.myapp' message: 'Choose the file to load'
to find a file with a name matching *.myapp and with the directory initial choice set to myApplicationDefaultDirectory. Only filenames matching the pattern will appear in the file list view.
!
Item was changed:
----- Method: FileChooserDialog class>>openOn: (in category 'instance creation') -----
openOn: aDirectory
+ "Open a modal dialog to choose a file. Start the dialog with aDirectory selected
+ and files matching the default 'everything' pattern"
- "open a modal dialog to choose a file. Start the dialog with aDirectory selected and files matching the default 'everything' pattern"
+ "FileChooserDialog openOn: FileDirectory default"
+
+ ^self openOn: aDirectory pattern: nil label: nil
+ !
- ^self new directory: aDirectory;
- getUserResponse!
Item was added:
+ ----- Method: FileChooserDialog class>>openOn:pattern:label: (in category 'instance creation') -----
+ openOn: aDirectory pattern: matchString label: labelString
+ "Open a modal dialog to choose a file. Start the dialog with aDirectory selected
+ and files matching the matchString pattern. Set the user message to labelString."
+
+ "FileChooserDialog openOn: FileDirectory default pattern: '*.changes' label: 'Do something with the selected files' "
+
+ ^self new
+ directory: aDirectory;
+ pattern: matchString;
+ message: labelString;
+ getUserResponse!
Item was added:
+ ----- Method: FileChooserDialog class>>openOn:suffixList:label: (in category 'instance creation') -----
+ openOn: aDirectory suffixList: patternList label: labelString
+ "Open a modal dialog to choose a file. Start the dialog with aDirectory selected
+ and files matching the file name suffixes in patternList. Set the user message
+ to labelString."
+
+ "FileChooserDialog openOn: FileDirectory default suffixList: { '*.changes' . '*image' } label: 'Do something with the selected files' "
+
+ ^self new
+ directory: aDirectory;
+ suffixList: patternList;
+ message: labelString;
+ getUserResponse!
Item was changed:
----- Method: FileChooserDialog class>>openOnPattern:label: (in category 'instance creation') -----
+ openOnPattern: matchString label: labelString
+ "Open a modal dialog to choose a file. Start the dialog with a default directory
+ selected and with files matching the default 'everything' pattern Set the user
+ message to labelString"
- openOnPattern: patternList label: messageString
- "open a modal dialog to choose a file. Start the dialog with aDirectory selected and files matching the default 'everything' pattern"
+ "FileChooserDialog openOnPattern: '*.changes' label: 'Do something with the selected files' "
+
+ ^self openOn: nil pattern: matchString label: labelString
+ !
- ^self new
- pattern: patternList;
- message: messageString;
- getUserResponse!
Item was changed:
----- Method: FileChooserDialog class>>openOnSuffixList:label: (in category 'instance creation') -----
+ openOnSuffixList: patternList label: labelString
+ "Open a modal dialog to choose a file. Start the dialog with a default directory
+ selected and with files matching the file name suffixes in patternList. Set the
+ user message to labelString."
- openOnSuffixList: patternList label: messageString
- "open a modal dialog to choose a file. Start the dialog with aDirectory selected and files matching the default 'everything' pattern"
+ "FileChooserDialog openOnSuffixList: { '*.changes' . '*image' } label: 'Do something with the selected files' "
+
+ ^self openOn: nil suffixList: patternList label: labelString
+ !
- ^self new
- suffixList: patternList;
- message: messageString;
- getUserResponse!
Item was changed:
FileAbstractSelectionDialog subclass: #FileSaverDialog
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Tools-FileDialogs'!
+ !FileSaverDialog commentStamp: 'dtl 12/21/2017 22:47' prior: 0!
- !FileSaverDialog commentStamp: 'tpr 11/21/2017 17:53' prior: 0!
A FileSaverDialog is a modal dialog for choosing a file name to use for saving a file.
Users can enter a filename in the text input view that will
a) if it exists in the current directry listing, be selected
b) over ride any filenames in the current directory, providing a way to specify a completely new file.
This will not affect the selected directory path.
Normal usage would be
myFilename := FileSaverDialog openOnInitialFilename: myApp saveFileName
which would derive a directory, an initial filename and filename suffix from the given file name. Thus a typical application save might be
... openOnInitialFilename: '/home/pi/myApp/examplePicture.jpg'
and would set the initial directory to /home/pi/myapp, the initial filename to examplePicture.jpg and set a suffix pattern of 'jpg'. Only filenames with the specified suffix will appear in the file list view. It is possible to specify several suffices, (see #suffixList:) and use wildcards within the suffix.
myFilename := FileSaverDialog openOn: myApplicationDefaultDirectory initialFilename: 'foo.myapp'
would set directory initial choice set to myApplicationDefaultDirectory and ignore any directory found in the filename. It would be quite possible to choose a file from any other directory and with any other name that matches the suffix if the user wishes, so the file name must be carefully checked.
The full set of options would involve
myFilename := FileSaverDialog openOn: myApplicationDefaultDirectory initialFilename: 'foo.myapp' suffix: 'mya' message: 'Save your myApp file to ... '
+ It is also possible to set a more general pattern to match filenames against but since this seems less useful for normal application usage there are no convenience messages as yet.
- It is also possible to set a more general pattern to match filenames against but since this seems less useful for normal application usage ther are no convenience messages as yet.
See the class side methods for details. See my parent class for most implementation details!
Item was changed:
----- Method: FileSaverDialog class>>openOn: (in category 'instance creation') -----
openOn: aDirectory
+ "open a modal dialog to save a file. Start the dialog with aDirectory selected
+ and no suggested file name"
- "open a modal dialog to save a file. Start the dialog with aDirectory selected and no suggested file name"
+ "FileSaverDialog openOn: FileDirectory default"
- ^self new directory: aDirectory;
- getUserResponse
+ ^self openOn: aDirectory initialFilename: nil label: nil
!
Item was changed:
----- Method: FileSaverDialog class>>openOn:initialFilename: (in category 'instance creation') -----
openOn: aDirectory initialFilename: aString
+ "Open a modal dialog to save a file. Start the dialog with aDirectory selected
+ and aString as the suggested file name. Note that we set the directory after
+ the initialFilename becuase we want a specific directory and not neccesarily
+ the directory of the file."
- "open a modal dialog to save a file. Start the dialog with aDirectory selected and the suggested file name. Note that we set the directory after the initialFilename becuase we want a specific directory and not neccesarily the directory of the file"
+ "FileSaverDialog openOn: FileDirectory default initialFilename: 'aSuggestedFileName' "
- ^self new
- initialFilename: aString;
- directory: aDirectory;
- getUserResponse
+ ^self openOn: aDirectory initialFilename: aString label: nil
+ !
- !
Item was added:
+ ----- Method: FileSaverDialog class>>openOn:initialFilename:label: (in category 'instance creation') -----
+ openOn: aDirectory initialFilename: aString label: labelString
+ "Open a modal dialog to save a file. Start the dialog with aDirectory selected
+ and aString as the suggested file name. Set the user message to labelString.
+ Note that we set the directory after the initialFilename becuase we want a
+ specific directory and not neccesarily the directory of the file"
+
+ "FileSaverDialog openOn: FileDirectory default initialFilename: 'aSuggestedFileName' label: 'Select a flie and do something with it' "
+
+ ^self new
+ initialFilename: aString;
+ directory: aDirectory;
+ message: labelString;
+ getUserResponse
+
+ !
Item was changed:
----- Method: FileSaverDialog class>>openOnInitialFilename: (in category 'instance creation') -----
openOnInitialFilename: filenameString
+ "Open a modal dialog to save a file. Start the dialog with the default directory
+ selected and the suggested file name."
- "open a modal dialog to save a file. Start the dialog with the default directory selected and the suggested file name"
+ "FileSaverDialog openOnInitialFilename: 'aSuggestedFileName' "
-
- ^self new initialFilename: filenameString;
- getUserResponse
+ ^self openOn: nil initialFilename: filenameString label: nil
+ !
- !
Item was changed:
----- Method: FileSaverDialog class>>openOnInitialFilename:label: (in category 'instance creation') -----
openOnInitialFilename: filenameString label: labelString
+ "Open a modal dialog to save a file. Start the dialog with the default directory
+ selected and the suggested file name, set the user message to labelString"
- "open a modal dialog to save a file. Start the dialog with the default directory selected and the suggested file name, set the user message to labelString"
+ "FileSaverDialog openOnInitialFilename: 'aSuggestedFileName' label: 'Select a flie and do something with it' "
-
- ^self new
- initialFilename: filenameString;
- message: labelString;
- getUserResponse
+ ^self openOn: nil initialFilename: filenameString label: labelString
+ !
- !
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.360.mcz
==================== Summary ====================
Name: Compiler-eem.360
Author: eem
Time: 24 December 2017, 11:17:18.883597 am
UUID: 28fc60ef-5fe3-4e38-a15c-e266f8aa3f72
Ancestors: Compiler-mt.359
Fix the Decompiler to remove the nil node that it mistakenly generates following a returning if with a nil else. As a side-effect provide ParseNode>>nodesWithPreceedingStatementsDo:.
Recategorize the BlockNode>>statements accessors.
Fix a typo. Remove a trio of methods that are now in EToys.
=============== Diff against Compiler-mt.359 ===============
Item was changed:
+ ----- Method: BlockNode>>statements (in category 'accessing') -----
- ----- Method: BlockNode>>statements (in category 'equation translation') -----
statements
^statements!
Item was changed:
+ ----- Method: BlockNode>>statements: (in category 'accessing') -----
- ----- Method: BlockNode>>statements: (in category 'equation translation') -----
statements: val
statements := val!
Item was removed:
- ----- Method: MessageNode>>morphFromKeywords:arguments:on:indent: (in category 'tiles') -----
- morphFromKeywords: key arguments: args on: parent indent: ignored
-
- ^parent
- messageNode: self
- receiver: receiver
- selector: selector
- keywords: key
- arguments: args
- !
Item was added:
+ ----- Method: MethodNode>>preenNilNodeFollowingNilIfNode: (in category 'converting-private') -----
+ preenNilNodeFollowingNilIfNode: aNilIfMessageNode
+ self nodesDo:
+ [:node| | statements indices |
+ (node isBlockNode
+ and: [(statements := node statements) includes: aNilIfMessageNode]) ifTrue:
+ [indices := (2 to: statements size) reject:
+ [:i|
+ (statements at: i) == NodeNil
+ and: [(statements at: i - 1) isNilIf]].
+ node statements: (({1}, indices) collect: [:i| statements at: i])]]!
Item was changed:
----- Method: MethodNode>>preenTempsConflictingWithBlockNode: (in category 'converting-private') -----
preenTempsConflictingWithBlockNode: temps
+ "Push temps that conflict with other blocks down into their narrowest enclosing block scope."
- "Push temps that conflict with other bocks down into their narrowest enclosing block scope."
temps do:
[:tempVar|
(self accept: (NarrowerVariableScopeFinder new ofVariable: tempVar)) ifNotNil:
[:enclosingScope |
self assert: enclosingScope isBlockNode.
self nodesDo:
[:node|
((node == self or: [node isBlockNode])
and: [node temporaries includes: tempVar]) ifTrue:
[node temporaries: (node temporaries copyWithout: tempVar)]].
enclosingScope temporaries: enclosingScope temporaries, { tempVar }]]!
Item was changed:
----- Method: MethodNode>>preenableNodes (in category 'converting-private') -----
preenableNodes
"Answer a Dictionary from node or sequence of nodes to preen method selector for nodes
in the tree that require post-processing after either a format or a decompile. Such issues
are the variable for an ifNotNil: which is local to the ifNotNil: block but, due to the inlining
of ifNotNil: appears to be declared at the outer level, and, similarly, a temporary variable
that conflicts with one of the same name in a block when, were the variable declared
local to some inlined block it would no longer conflict. The resulting dictionary is used to
perform the value with the key (node or array) as argument to preen the tree."
| preenableNodes priorBlocks priorVariables |
preenableNodes := Dictionary new.
priorBlocks := OrderedCollection new.
priorVariables := Set new.
+ self nodesWithPreceedingStatementsDo:
+ [:node :preceedingStatementOrNil| | variable temps |
- self nodesDo:
- [:node| | variable temps |
(node isMessageNode
and: [node macroPrinter == #printIfNilNotNil:indent:
and: [node receiver isMessageNode
and: [node receiver selector key == #==
and: [node receiver receiver isAssignmentNode
and: [(variable := node receiver receiver variable) isTemp
and: [variable isRemote not
and: [variable isOnlySubnodeOf: node in: self]]]]]]]) ifTrue:
[preenableNodes at: node put: #preenIfNotNilNode:.
priorVariables add: variable].
node isBlockNode ifTrue:
[temps := OrderedCollection new.
node temporaries do:
[:temp|
priorBlocks do:
[:aBlock|
aBlock temporaries do:
[:priorTemp|
(priorVariables includes: priorTemp) ifFalse:
[priorTemp key = temp key ifTrue:
[temps addLast: priorTemp]]]]].
temps isEmpty ifFalse:
[preenableNodes at: temps put: #preenTempsConflictingWithBlockNode:].
+ priorBlocks addLast: node].
+ (node == NodeNil
+ and: [preceedingStatementOrNil notNil
+ and: [preceedingStatementOrNil isMessageNode
+ and: [preceedingStatementOrNil isNilIf]]]) ifTrue:
+ [preenableNodes at: preceedingStatementOrNil put: #preenNilNodeFollowingNilIfNode:]].
- priorBlocks addLast: node]].
^preenableNodes!
Item was added:
+ ----- Method: ParseNode>>nodesWithPreceedingStatementsDo: (in category 'visiting') -----
+ nodesWithPreceedingStatementsDo: aBinaryBlock
+ self accept: (ParseNodeWithPreceedingStatementEnumerator ofBlock: aBinaryBlock)!
Item was added:
+ ParseNodeEnumerator subclass: #ParseNodeWithPreceedingStatementEnumerator
+ instanceVariableNames: 'preceedingStatement'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Compiler-Support'!
Item was added:
+ ----- Method: ParseNodeWithPreceedingStatementEnumerator>>ofBlock: (in category 'initialize-release') -----
+ ofBlock: aBlock
+ "N.B. This enumerator visits a node before any of the node's children.
+ Hence, when enumewrating statements in a block, we can ensure that
+ the second argument to the block, the preceeding statement, is non-nil
+ only for top-level statements in the block by nilling out preceedingStatement
+ once the block is evaluated. Perhaps stronger would be to capture its value
+ in a temporary and nil it before evaluating, but this is good enough."
+ theBlock := [:node|
+ aBlock value: node value: preceedingStatement.
+ preceedingStatement := nil]!
Item was added:
+ ----- Method: ParseNodeWithPreceedingStatementEnumerator>>ofBlock:select: (in category 'initialize-release') -----
+ ofBlock: aBlock select: aSelectBlock
+ self ofBlock: aBlock.
+ theSelectBlock := aSelectBlock!
Item was added:
+ ----- Method: ParseNodeWithPreceedingStatementEnumerator>>visitBlockNode: (in category 'visiting') -----
+ visitBlockNode: aBlockNode
+ | savedPreceedingStatement |
+ (theSelectBlock isNil or: [theSelectBlock value: aBlockNode]) ifFalse:
+ [^nil].
+ theBlock value: aBlockNode.
+ savedPreceedingStatement := preceedingStatement.
+ preceedingStatement := nil.
+ [aBlockNode statements do:
+ [:statement|
+ statement accept: self.
+ preceedingStatement := statement]] ensure:
+ [preceedingStatement := savedPreceedingStatement]!
Item was removed:
- ----- Method: VariableNode>>currentValueIn: (in category 'tiles') -----
- currentValueIn: aContext
-
- aContext ifNil: [^nil].
- ^((self variableGetterBlockIn: aContext) ifNil: [^nil]) value printString
-
-
- !
Item was removed:
- ----- Method: VariableNode>>variableGetterBlockIn: (in category 'tiles') -----
- variableGetterBlockIn: aContext
-
- | temps tempIndex ivars |
-
- (self type = 4 and: [self key isVariableBinding]) ifTrue: [
- ^[self key value]
- ].
- aContext ifNil: [^nil].
- self isSelfPseudoVariable ifTrue: [^[aContext receiver]].
- self type = 1 ifTrue: [
- ivars := aContext receiver class allInstVarNames.
- tempIndex := ivars indexOf: self name ifAbsent: [^nil].
- ^[aContext receiver instVarAt: tempIndex]
- ].
- self type = 2 ifTrue: [
- temps := aContext tempNames.
- tempIndex := temps indexOf: self name ifAbsent: [^nil].
- ^[aContext tempAt: tempIndex]
- ].
- ^nil
- !
Eliot Miranda uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-eem.389.mcz
==================== Summary ====================
Name: Tests-eem.389
Author: eem
Time: 23 December 2017, 2:56:56.034589 pm
UUID: 2a2295d5-c146-4bd0-8082-b57e86c617a4
Ancestors: Tests-eem.388
Reenable the ImageSegmentTest if the VM is mature enough.
=============== Diff against Tests-eem.388 ===============
Item was changed:
----- Method: ImageSegmentTest class>>testSelectors (in category 'Accessing') -----
testSelectors
+ (Smalltalk isRunningSpur
+ and: [Smalltalk vmVMMakerVersion < 2295]) ifTrue:
+ "The ImageSegment Test is known to not work on older Spur VMs
+ with the prospect of crashing. #expectedFailures does not cut it here;
+ don't even try to run them"
+ [^#()].
+ ^super testSelectors!
- Smalltalk isRunningSpur ifTrue: [
- "The ImageSegment Test is known to not work on SPUR VMs
- with the prospect of crashing. #expectedFailure does not cut it here,
- don't even try to run them"
- ^ #()].
- ^ super testSelectors!
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.992.mcz
==================== Summary ====================
Name: System-eem.992
Author: eem
Time: 23 December 2017, 2:55:18.856019 pm
UUID: 55484fa8-616c-49ea-aa18-c8ba79a76369
Ancestors: System-tpr.991
Provide an accessor to the VMMaker version number from which the VM was generated.
=============== Diff against System-tpr.991 ===============
Item was added:
+ ----- Method: SmalltalkImage>>vmVMMakerVersion (in category 'system attributes') -----
+ vmVMMakerVersion
+ "Answer the version number of the VMMaker package from which the main VM was compiled."
+ "Smalltalk vmVMMakerVersion"
+
+ | vmMakerID |
+ vmMakerID := self vmVersion substrings detect: [:token| token beginsWith: 'VMMaker'].
+ ^Integer readFrom: (vmMakerID subStrings: '.') last!
Eliot Miranda uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-eem.388.mcz
==================== Summary ====================
Name: Tests-eem.388
Author: eem
Time: 23 December 2017, 11:08:38.390751 am
UUID: b2681f27-cd71-426b-ab2d-0d331cd9fb24
Ancestors: Tests-nice.387
DecompilerTests: WeakSet>>scanForLoadedSymbol: no longer fails. Ensure Decompiler >> #initSymbols: is recompiled if it hasn't been. Its original bytecodes do cause a decompiler failure. Perhaps this should be in Compiler, but the old version of the method is perfectly serviceable.
=============== Diff against Tests-nice.387 ===============
Item was added:
+ (PackageInfo named: 'Tests') preamble: '"below, add code to be run before the loading of this package"
+
+ "If recompiled, this method no longer creates an error if decompiled:"
+ ((''*| namedTemps i |*'' match: (Decompiler >> #initSymbols:) decompileString)
+ or: [''*| t2 t3 |*'' match: (Decompiler >> #initSymbols:) decompileString]) ifTrue:
+ [Decompiler recompile: #initSymbols: from: Decompiler]'!
Item was changed:
----- Method: DecompilerTests>>decompilerFailures (in category 'utilities') -----
decompilerFailures
"Here is the list of failures: either a syntax error, a hard error or some failure to decompile correctly.
Collected via
DecompilerTestFailuresCollector new computeFailures."
"class name, selector, error class name or nil"
^ #(
#(Behavior toolIconSelector: TestFailure)
#(BrowserCommentTextMorph showPane SyntaxErrorNotification)
#(CodeHolder getSelectorAndSendQuery:to:with: SyntaxErrorNotification)
#(DecompilerTests testDecompileUnreachableParameter Error)
#(HttpUrl checkAuthorization:retry: TestFailure)
#(MCConfigurationBrowser post SyntaxErrorNotification)
#(MVCToolBuilder setLayout:in: SyntaxErrorNotification) "same-name block-local temps in optimized blocks"
#(ParseNodeBuilder variable: TestFailure) "Almost fully returning if's result in a nil node."
#(PNGReadWriter copyPixelsGray: SyntaxErrorNotification)
#(ProtoObjectTest testIfNilIfNotNil SyntaxErrorNotification)
#(ProtoObjectTest testIfNotNil SyntaxErrorNotification)
#(ProtoObjectTest testIfNotNilIfNil SyntaxErrorNotification)
#(SHMCClassDefinition withAllSuperclassesDo: SyntaxErrorNotification) "same-name block-local temps in optimized blocks"
#(TextURL actOnClickFor: TestFailure)
#(TTContourConstruction segmentsDo: SyntaxErrorNotification) "Worth fixing; these two are mistaken conversion from a whileTrue: to a to:do: but the index is used outside the whileTrue:"
+ #(TTFontReader processHorizontalMetricsTable:length: SyntaxErrorNotification))!
- #(TTFontReader processHorizontalMetricsTable:length: SyntaxErrorNotification)
- #(WeakSet scanForLoadedSymbol: TestFailure))!