[squeak-dev] Re: What does 19th primitive (Simulation guard) do?
Igor Stasenko
siguctua at gmail.com
Sun Mar 11 08:38:50 UTC 2012
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 강진오 <jinoh67 at gmail.com>:
> I found that method in these methods:
> not method, but primitive
> 2012/3/11 강진오 <jinoh67 at gmail.com>
>>
>> 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.
More information about the Squeak-dev
mailing list
|