[Pkg] The Trunk: EToys-eem.299.mcz

commits at source.squeak.org commits at source.squeak.org
Thu May 25 22:34:11 UTC 2017

Eliot Miranda uploaded a new version of EToys to project The Trunk:

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

Name: EToys-eem.299
Author: eem
Time: 25 May 2017, 3:33:43.83519 pm
UUID: df231eba-abab-41c8-b8ad-3234acf71771
Ancestors: EToys-ul.298

forgetDoIts is no longer necessary.

=============== Diff against EToys-ul.298 ===============

Item was changed:
  ----- Method: DialectParser class>>test (in category 'as yet unclassified') -----
  test    "DialectParser test"
  "PrettyPrints the source for every method in the system in the alternative syntax, and then compiles that source and verifies that it generates identical code.  No changes are actually made to the system.  At the time of this writing, only two methods caused complaints (reported in Transcript and displayed in browse window after running):
  	BalloonEngineSimulation circleCosTable and
  	BalloonEngineSimulation circleSinTable.
  These are not errors, but merely a case of Floats embedded in literal arrays, and thus not specially checked for roundoff errors.
  Note that if an error or interruption occurs during execution of this method, the alternativeSyntax preference will be left on.
  NOTE:  Some methods may not compare properly until the system has been recompiled once.  Do this by executing...
  		Smalltalk recompileAllFrom: 'AARDVAARK'.
  	 | newCodeString methodNode oldMethod newMethod badOnes n heading |
  	Preferences enable: #printAlternateSyntax.
  	badOnes := OrderedCollection new.
  	Transcript clear.
- 	Smalltalk forgetDoIts.
  'Formatting and recompiling all classes...'
  displayProgressAt: Sensor cursorPoint
  from: 0 to: CompiledMethod instanceCount
  during: [:bar | n := 0.
  	Smalltalk allClassesDo:  "{MethodNode} do:"  "<- to check one class"
  		[:nonMeta |  "Transcript cr; show: nonMeta name."
  		{nonMeta. nonMeta class} do:
  		[:cls |
  		cls selectors do:
  			[:selector | (n := n+1) \\ 100 = 0 ifTrue: [bar value: n].
  			newCodeString := (cls compilerClass new)
  				format: (cls sourceCodeAt: selector)
  				in: cls notifying: nil decorated: Preferences colorWhenPrettyPrinting.
  			heading := cls organization categoryOfElement: selector.
  			methodNode := cls compilerClass new
  						compile: newCodeString
  						in: cls notifying: (SyntaxError new category: heading)
  						ifFail: [].
  			newMethod := methodNode generate: CompiledMethodTrailer empty.
  			oldMethod := cls compiledMethodAt: selector.
  			"Transcript cr; show: cls name , ' ' , selector."
  			oldMethod = newMethod ifFalse:
  				[Transcript cr; show: '***' , cls name , ' ' , selector.
  				oldMethod size = newMethod size ifFalse:
  					[Transcript show: ' difft size'].
  				oldMethod header = newMethod header ifFalse:
  					[Transcript show: ' difft header'].
  				oldMethod literals = newMethod literals ifFalse:
  					[Transcript show: ' difft literals'].
  				Transcript endEntry.
  				badOnes add: cls name , ' ' , selector]]]].
  	self systemNavigation browseMessageList: badOnes sort name: 'Formatter Discrepancies'.
  	Preferences disable: #printAlternateSyntax.

Item was changed:
  ----- Method: SystemDictionary>>abandonTempNames (in category '*Etoys-Squeakland-shrinking') -----
  	"Replaces every method by a copy with no source pointer or
  	encoded temp names."
  	"Smalltalk abandonTempNames"
  	| oldMethods newMethods n m |
+ 	self garbageCollect.
- 	self forgetDoIts; garbageCollect.
  	oldMethods := OrderedCollection new.
  	newMethods := OrderedCollection new.
  	n := 0.
  	'Removing temp names to save space...'
  		displayProgressAt: Sensor cursorPoint
  		from: 0
  		to: CompiledMethod instanceCount
  		during: [:bar | self systemNavigation
  				allBehaviorsDo: [:cl | cl selectors
  						do: [:sel | 
  							bar value: (n := n + 1).
  							m := cl compiledMethodAt: sel.
  							oldMethods addLast: m.
  								addLast: (m copyWithTrailerBytes: #(0 ))]]].
  	oldMethods asArray elementsExchangeIdentityWith: newMethods asArray.
  	SmalltalkImage current closeSourceFiles.
  	self flag: #shouldUseAEnsureBlockToBeSureThatTheFileIsClosed.
  	"sd: 17 April 2003"
  	Preferences disable: #warnIfNoChangesFile.
  	Preferences disable: #warnIfNoSourcesFile!

More information about the Packages mailing list