[Vm-dev] VM Maker: VMMaker.oscog-eem.3118.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Dec 5 17:44:27 UTC 2021
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3118.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3118
Author: eem
Time: 5 December 2021, 9:44:14.421853 am
UUID: 2b620c6a-372b-49a2-b4d2-5404fbf4afb1
Ancestors: VMMaker.oscog-eem.3117
Dual of VMMakerUI-eem.53
Simulator: move and refactor the window closing machinery. Fix closing the multi-threaded simulator and ensure debuggers in threads are also closed.
=============== Diff against VMMaker.oscog-eem.3117 ===============
Item was removed:
- ----- Method: CogVMSimulator>>close (in category 'initialize-release') -----
- close "close any files that ST may have opened, etc"
- pluginList do: [:assoc| | plugin | plugin := assoc value. plugin ~~ self ifTrue: [plugin close]].
- "Ugh; at least some of this code belongs in the UI..."
- displayView ifNotNil:
- [displayView activeHand removeEventListener: self].
- ActiveHand removeEventListener: self.
- World submorphs do:
- [:submorph|
- (submorph model isVMObjectInspector
- and: [submorph model coInterpreter == self]) ifTrue:
- [submorph delete].
- (submorph model isDebugger
- and: [(submorph model interruptedProcess suspendedContext ifNotNil:
- [:sctxt|
- sctxt findContextSuchThat:
- [:ctxt|
- (ctxt receiver == cogit
- and: [ctxt selector == #simulateCogCodeAt:])
- or: [ctxt receiver == self
- and: [ctxt selector == #interpret]]]]) notNil]) ifTrue:
- [submorph model windowIsClosing.
- submorph delete]]!
Item was removed:
- ----- Method: CogVMSimulator>>windowIsClosing (in category 'primitive support') -----
- windowIsClosing
- self threadManager ifNotNil:
- [:threadManager| threadManager shutdownModule].
- quitBlock ifNotNil:
- [:effectiveQuitBlock|
- quitBlock := nil. "stop recursion on explicit window close."
- [effectiveQuitBlock value]
- on: BlockCannotReturn
- do: [:ex|]] "Cause return from #test, et al"!
Item was removed:
- ----- Method: InterpreterSimulator>>openAsMorph (in category 'UI') -----
- openAsMorph
- "Open a morphic view on this simulation."
- | window localImageName |
- localImageName := imageName
- ifNotNil: [self localNameFor: imageName]
- ifNil: [' synthetic image'].
- window := (SystemWindow labelled: 'Simulation of ' , localImageName) model: self.
-
- window addMorph: (displayView := ImageMorph new image: displayForm)
- frame: (0 at 0 corner: 1 at 0.8).
-
- transcript := TranscriptStream on: (String new: 10000).
- window addMorph: (PluggableTextMorph on: transcript text: nil accept: nil
- readSelection: nil menu: #codePaneMenu:shifted:)
- frame: (0 at 0.8 corner: 0.7 at 1).
-
- window addMorph: (PluggableTextMorph on: self
- text: #byteCountText accept: nil) hideScrollBarsIndefinitely
- frame: (0.7 at 0.8 corner: 1 at 1).
-
- window openInWorld.
- ^window!
Item was removed:
- ----- Method: StackInterpreterSimulator>>close (in category 'initialize-release') -----
- close "close any files that ST may have opened, etc"
- pluginList do: [:assoc| | plugin | plugin := assoc value. plugin ~~ self ifTrue: [plugin close]].
- "Ugh; at least some of this code belongs in the UI..."
- displayView ifNotNil:
- [displayView activeHand removeEventListener: self].
- ActiveHand removeEventListener: self.
- World submorphs do:
- [:submorph|
- (submorph model isVMObjectInspector
- and: [submorph model coInterpreter == self]) ifTrue:
- [submorph delete].
- (submorph model isDebugger
- and: [(submorph model interruptedProcess suspendedContext ifNotNil:
- [:sctxt|
- sctxt findContextSuchThat:
- [:ctxt|
- ctxt receiver == self
- and: [ctxt selector == #run]]]) notNil]) ifTrue:
- [submorph model windowIsClosing.
- submorph delete]]!
Item was removed:
- ----- Method: StackInterpreterSimulator>>windowIsClosing (in category 'primitive support') -----
- windowIsClosing
- quitBlock ifNotNil:
- [:effectiveQuitBlock|
- quitBlock := nil. "stop recursion on explicit window close."
- [effectiveQuitBlock value]
- on: BlockCannotReturn
- do: [:ex|]] "Cause return from #test, et al"!
More information about the Vm-dev
mailing list