[squeak-dev] The Trunk: System-ar.150.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] The Trunk: System-ar.150.mcz

commits-2
Andreas Raab uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ar.150.mcz

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

Name: System-ar.150
Author: ar
Time: 19 September 2009, 8:38:45 am
UUID: 1d2fb2dc-3bf6-a74b-98aa-72d55f8ff6a0
Ancestors: System-ar.149

Remove obsolete WiW references.

=============== Diff against System-ar.149 ===============

Item was changed:
  ----- Method: SystemDictionary>>majorShrink (in category 'shrinking') -----
  majorShrink
  "Undertake a major shrinkage of the image.
  This method throws out lots of the system that is not needed
  for, eg, operation in a hand-held PC. majorShrink produces a
  999k image in Squeak 2.8
  Smalltalk majorShrink; abandonSources; lastRemoval"
  | oldDicts newDicts |
  self isMorphic
  ifTrue: [^ self error: 'You can only run majorShrink in MVC'].
  Project current isTopProject
  ifFalse: [^ self error: 'You can only run majorShrink in the top project'].
  (self confirm: 'All sub-projects will be deleted from this image.
  You should already have made a backup copy,
  or you must save with a different name after shrinking.
  Shall we proceed to discard most of the content in this image?')
  ifFalse: [^ self inform: 'No changes have been made.'].
  "Remove all projects but the current one. - saves 522k"
  ProjectView
  allInstancesDo: [:pv | pv controller closeAndUnscheduleNoTerminate].
  Project current setParent: Project current.
- MorphWorldView
- allInstancesDo: [:pv | pv topView controller closeAndUnscheduleNoTerminate].
  self
  at: #Wonderland
  ifPresent: [:cls | cls removeActorPrototypesFromSystem].
  Player freeUnreferencedSubclasses.
  MorphicModel removeUninstantiatedModels.
  Utilities classPool at: #ScrapsBook put: nil.
  Utilities zapUpdateDownloader.
  ProjectHistory currentHistory initialize.
  Project rebuildAllProjects.
  "Smalltalk discardVMConstruction."
  "755k"
  self discardSoundSynthesis.
  "544k"
  self discardOddsAndEnds.
  "227k"
  self discardNetworking.
  "234k"
  "Smalltalk discard3D."
  "407k"
  self discardFFI.
  "33k"
  self discardMorphic.
  "1372k"
  Symbol rehash.
  "40k"
  "Above by itself saves about 4,238k"
  "Remove references to a few classes to be deleted, so that they
  won't leave obsolete versions around."
  ChangeSet class compile: 'defaultName
  ^ ''Changes'' ' classified: 'initialization'.
  ScreenController removeSelector: #openChangeManager.
  ScreenController removeSelector: #exitProject.
  ScreenController removeSelector: #openProject.
  ScreenController removeSelector: #viewImageImports.
  "Now delete various other classes.."
  SystemOrganization removeSystemCategory: 'Graphics-Files'.
  SystemOrganization removeSystemCategory: 'System-Object Storage'.
  self removeClassNamed: #ProjectController.
  self removeClassNamed: #ProjectView.
  "Smalltalk removeClassNamed: #Project."
  self removeClassNamed: #Component1.
  self removeClassNamed: #FormSetFont.
  self removeClassNamed: #FontSet.
  self removeClassNamed: #InstructionPrinter.
  self removeClassNamed: #ChangeSorter.
  self removeClassNamed: #DualChangeSorter.
  self removeClassNamed: #EmphasizedMenu.
  self removeClassNamed: #MessageTally.
  StringHolder class removeSelector: #originalWorkspaceContents.
  CompiledMethod removeSelector: #symbolic.
  RemoteString removeSelector: #makeNewTextAttVersion.
  Utilities class removeSelector: #absorbUpdatesFromServer.
  self removeClassNamed: #PenPointRecorder.
  self removeClassNamed: #Path.
  self removeClassNamed: #Base64MimeConverter.
  "Smalltalk removeClassNamed: #EToySystem. Dont bother - its
  very small and used for timestamps etc"
  self removeClassNamed: #RWBinaryOrTextStream.
  self removeClassNamed: #AttributedTextStream.
  self removeClassNamed: #WordNet.
  self removeClassNamed: #SelectorBrowser.
  TextStyle
  allSubInstancesDo: [:ts | ts
  newFontArray: (ts fontArray
  copyFrom: 1
  to: (2 min: ts fontArray size))].
  #(ListParagraph PopUpMenu StandardSystemView) do:[:className|
  Smalltalk at: className ifPresent:[:aClass| aClass initialize].
  ].
  ChangeSet noChanges.
  ChangeSet classPool
  at: #AllChangeSets
  put: (OrderedCollection with: ChangeSet current).
  SystemDictionary removeSelector: #majorShrink.
  [self removeAllUnSentMessages > 0]
  whileTrue: [Smalltalk unusedClasses
  do: [:c | (Smalltalk at: c) removeFromSystem]].
  SystemOrganization removeEmptyCategories.
  self
  allClassesDo: [:c | c zapOrganization].
  self garbageCollect.
  'Rehashing method dictionaries . . .'
  displayProgressAt: Sensor cursorPoint
  from: 0
  to: MethodDictionary instanceCount
  during: [:bar |
  oldDicts := MethodDictionary allInstances.
  newDicts := Array new: oldDicts size.
  oldDicts
  withIndexDo: [:d :index |
  bar value: index.
  newDicts at: index put: d rehashWithoutBecome].
  oldDicts elementsExchangeIdentityWith: newDicts].
  oldDicts := newDicts := nil.
  Project rebuildAllProjects.
  ChangeSet current initialize.
  "seems to take more than one try to gc all the weak refs in
  SymbolTable "
  3
  timesRepeat: [self garbageCollect.
  Symbol compactSymbolTable]!

Item was removed:
- ----- Method: Project>>enterAsActiveSubprojectWithin: (in category 'menu messages') -----
- enterAsActiveSubprojectWithin: enclosingWorld
-
- "Install my ChangeSet, Transcript, and scheduled views as current globals.
-
- If returningFlag is true, we will return to the project from whence the current project was entered; don't change its previousProject link in this case.
- If saveForRevert is true, save the ImageSegment of the project being left.
- If revertFlag is true, make stubs for the world of the project being left.
- If revertWithoutAsking is true in the project being left, then always revert."
-
- "Experimental mods for initial multi-project work:
- 1. assume in morphic (this eliminated need for <showZoom>)
- 2. assume <saveForRevert> is false (usual case) - removed <old>
- 3. assume <revertFlag> is false
- 4. assume <revertWithoutAsking> is false - <forceRevert> now auto false <seg> n.u.
- 5. no zooming
- 6. assume <projectsSentToDisk> false - could be dangerous here
- 7. assume no isolation problems (isolationHead ==)
- 8. no closing scripts
- "
-
- self isCurrentProject ifTrue: [^ self].
-
- guards ifNotNil: [
- guards := guards reject: [:obj | obj isNil].
- guards do: [:obj | obj okayToEnterProject ifFalse: [^ self]]
- ].
-
- "CurrentProject makeThumbnail."
- "--> Display bestGuessOfCurrentWorld triggerClosingScripts."
- CurrentProject displayDepth: Display depth.
-
- displayDepth == nil ifTrue: [displayDepth := Display depth].
- "Display newDepthNoRestore: displayDepth."
-
- "(world hasProperty: #letTheMusicPlay)
- ifTrue: [world removeProperty: #letTheMusicPlay]
- ifFalse: [Smalltalk at: #ScorePlayer ifPresent: [:playerClass |
- playerClass allSubInstancesDo: [:player | player pause]]]."
-
- "returningFlag
- ifTrue: [nextProject := CurrentProject]
- ifFalse: [previousProject := CurrentProject]."
-
- "CurrentProject saveState."
- "CurrentProject := self."
- "Smalltalk newChanges: changeSet."
- "TranscriptStream newTranscript: transcript."
- "Sensor flushKeyboard."
- "recorderOrNil := Display pauseMorphicEventRecorder."
-
- "Display changeMorphicWorldTo: world."  "Signifies Morphic"
- world
- installAsActiveSubprojectIn: enclosingWorld
- titled: self name.
-
- "recorderOrNil ifNotNil: [recorderOrNil resumeIn: world]."
- world triggerOpeningScripts.
- self removeParameter: #exportState.
- "self spawnNewProcessAndTerminateOld: true"!