Is 'self halt.' in BlockContext taboo?

Marcus Denker denker at iam.unibe.ch
Thu Jun 10 07:35:23 UTC 2004


Hi,


Yes, known problem. The vm has a buggy primitiveYield. So a simple fix 
is to
just uncomment the call to that primtive in ProcessorScheduler>>yield

     Marcus


Am 10.06.2004 um 08:43 schrieb Kouji takahashi:

> Hi, Is this a known problem? Am I doing wrong?
> What can I do for the community?
>
> 'halt' in BlockContext behaves strangely Squeak3.7beta [latest update: 
> #5948] on MacOSX10.3.4.
> VM is Squeak3.7.3Beta4.app and just downloaded image.
>
> Open workspace in new Morphic project and  printIt( or evaluate) next 
> code give different results.
> [ self halt. 1] value
>
> No response(GUI still responds, but unstable. No Debugger appeared. No 
> result printed.) .
> GUI freeze(without debugLog. 0.0% CPU usage. cmnd-. has no effect).
> Debugger open as I expected (when proceed, print 1 as result).
>
> ===== SqueakDebug.log
> Halt
> 10 June 2004 10:26:11 am
>
> VM: Mac OS - a SmalltalkImage
> Image: Squeak3.7beta [latest update: #5948]
>
> SecurityManager state:
> Restricted: false
> FileAccess: true
> SocketAccess: true
> Working Dir PBG4:Squeak3.7b-5948 Folder
> Trusted Dir PBG4:Squeak3.7b-5948 Folder
> Untrusted Dir foobar:tooBar:forSqueak:bogus
>
> UndefinedObject(Object)>>halt
>         Receiver: nil
>         Arguments and temporary variables:
>
>         Receiver's instance variables:
> nil
> [] in UndefinedObject>>DoIt {[:a :b |  self halt.  sum := a + b.  sum]}
>         Arguments and temporary variables:
>                 a:      1
>                 b:      2
>                 sum:    nil
>
> UndefinedObject>>DoIt
>         Receiver: nil
>         Arguments and temporary variables:
>                 a:      1
>                 b:      2
>                 sum:    nil
>         Receiver's instance variables:
> nil
> Compiler>>evaluate:in:to:notifying:ifFail:logged:
>         Receiver: a Compiler
>         Arguments and temporary variables:
>                 textOrStream:   a ReadWriteStream '[ :a :b | |sum| 
> self halt. sum _ a + b. sum] v...etc...
>                 aContext:       nil
>                 receiver:       nil
>                 aRequestor:     a TextMorphEditor
>                 failBlock:      [] in 
> TextMorphEditor(ParagraphEditor)>>evaluateSelection 
> {[FakeClas...etc...
>                 logFlag:        true
>                 methodNode:     DoIt
>         ^ [:a :b |
>         | sum |
>         self halt.
>         sum := a + b.
>         sum]
>                 valu...etc...
>                 method:         a CompiledMethod (754)
>                 value:  nil
>                 selector:       #DoIt
>         Receiver's instance variables:
>                 sourceStream:   a ReadWriteStream '[ :a :b | |sum| 
> self halt. sum _ a + b. sum] v...etc...
>                 requestor:      a TextMorphEditor
>                 class:  UndefinedObject
>                 context:        nil
>                 parserClass:    Parser
>                 cacheDoItNode:  true
>
>
> --- The full stack ---
> UndefinedObject(Object)>>halt
> [] in UndefinedObject>>DoIt {[:a :b |  self halt.  sum := a + b.  sum]}
> UndefinedObject>>DoIt
> Compiler>>evaluate:in:to:notifying:ifFail:logged:
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> [] in TextMorphEditor(ParagraphEditor)>>evaluateSelection {[rcvr class 
> evaluatorClass new   evaluate: self selectionAsStream   in: ctxt...]}
> BlockContext>>on:do:
> TextMorphEditor(ParagraphEditor)>>evaluateSelection
> TextMorphEditor(ParagraphEditor)>>printIt
> [] in TextMorphEditor(ParagraphEditor)>>printIt: {[self printIt]}
> TextMorphEditor(Controller)>>terminateAndInitializeAround:
> TextMorphEditor(ParagraphEditor)>>printIt:
> TextMorphEditor(ParagraphEditor)>>dispatchOnCharacter:with:
> TextMorphEditor>>dispatchOnCharacter:with:
> TextMorphEditor(ParagraphEditor)>>readKeyboard
> TextMorphEditor>>readKeyboard
> [] in TextMorphForEditView(TextMorph)>>keyStroke: {[editor 
> readKeyboard]}
> TextMorphForEditView(TextMorph)>>handleInteraction:fromEvent:
> TextMorphForEditView>>handleInteraction:fromEvent:
> TextMorphForEditView(TextMorph)>>keyStroke:
> TextMorphForEditView>>keyStroke:
> TextMorphForEditView(TextMorph)>>handleKeystroke:
> KeyboardEvent>>sentTo:
> TextMorphForEditView(Morph)>>handleEvent:
> TextMorphForEditView(Morph)>>handleFocusEvent:
> [] in HandMorph>>sendFocusEvent:to:clear: {[ActiveHand := self.  
> ActiveEvent := anEvent.  result := focusHolder     han...]}
> [] in PasteUpMorph>>becomeActiveDuring: {[aBlock value]}
> BlockContext>>on:do:
> PasteUpMorph>>becomeActiveDuring:
> HandMorph>>sendFocusEvent:to:clear:
> HandMorph>>sendEvent:focus:clear:
> HandMorph>>sendKeyboardEvent:
> HandMorph>>handleEvent:
> HandMorph>>processEvents
> [] in WorldState>>doOneCycleNowFor: {[:h |  ActiveHand := h.  h 
> processEvents.  capturingGesture := capturingGest...]}
> Array(SequenceableCollection)>>do:
> WorldState>>handsDo:
> WorldState>>doOneCycleNowFor:
> WorldState>>doOneCycleFor:
> PasteUpMorph>>doOneCycle
> [] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor 
> yield.  false] whileFalse.  nil]}
> [] in BlockContext>>newProcess {[self value.  Processor 
> terminateActive]}
>
>
> -------------------------------
> ^. .^    Kouji Takahashi  <tako at aquilax.co.jp>
>  ='=     Tel +81-3-3986-4834    Fax +81-3-5992-0792
>
>
>




More information about the Squeak-dev mailing list