What does the following primitive do? newProcess "Answer a Process running the code in the receiver. The process is not scheduled." <primitive: 19> "Simulation guard" ^Process forContext: [self value. Processor terminateActive] asContext priority: Processor activePriority I found that method in these methods: BlockClosure newProcess {scheduling} BlockClosure newProcessWith: {scheduling} BlockContext newProcess {scheduling} BlockContext newProcessWith: {scheduling} ControlManager activeController: {accessing} ControlManager scheduleActive: {scheduling} Debugger class openContext:label:contents: {class initialization} Debugger class openInterrupt:onProcess: {opening} SyntaxError class open: {instance creation} It seems the methods works even though I delete the primitive. I couldn't find any documentation about it, so what does the primitive do? Can any methods contain the primitive?
|
I found that method in these methods: not method, but primitive 2012/3/11 강진오 <[hidden email]>
|
This is a primitive which does nothing, just always fails.
They are there in some key methods to guard against simulation: when you debugging and try to step in into those methods , a debugger will stop with error. For example try to debug following: [ 1+ 1] newProcess Yes, we should review the places where simulation cannot run. I do not see why #newProcess needs to be guarded against simulation. The code in it does nothing special, which cannot be simulated. 2012/3/11 강진오 <[hidden email]>: > I found that method in these methods: > not method, but primitive > 2012/3/11 강진오 <[hidden email]> >> >> What does the following primitive do? >> >> newProcess >> "Answer a Process running the code in the receiver. The process is not >> scheduled." >> <primitive: 19> "Simulation guard" >> ^Process >> forContext: >> [self value. >> Processor terminateActive] asContext >> priority: Processor activePriority >> >> I found that method in these methods: >> >> BlockClosure newProcess {scheduling} >> BlockClosure newProcessWith: {scheduling} >> BlockContext newProcess {scheduling} >> BlockContext newProcessWith: {scheduling} >> ControlManager activeController: {accessing} >> ControlManager scheduleActive: {scheduling} >> Debugger class openContext:label:contents: {class initialization} >> Debugger class openInterrupt:onProcess: {opening} >> SyntaxError class open: {instance creation} >> >> It seems the methods works even though I delete the primitive. >> I couldn't find any documentation about it, so what does the primitive do? >> Can any methods contain the primitive? > > > > > -- Best regards, Igor Stasenko. |
Thanks, I'll delete <primitive: 19> in calling of forContext:priority:
2012/3/11 Igor Stasenko <[hidden email]> This is a primitive which does nothing, just always fails. |
In reply to this post by Igor Stasenko
I debuged it, and It shows "Code simulation error"
2012/3/11 Igor Stasenko <[hidden email]> This is a primitive which does nothing, just always fails. |
In reply to this post by Igor Stasenko
I proceed on the code simulation error, it continued fine
2012/3/11 Igor Stasenko <[hidden email]> This is a primitive which does nothing, just always fails. |
Free forum by Nabble | Edit this page |