What does 19th primitive (Simulation guard) do?

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

What does 19th primitive (Simulation guard) do?

강진오
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?


Reply | Threaded
Open this post in threaded view
|

Re: What does 19th primitive (Simulation guard) do?

강진오
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?



Reply | Threaded
Open this post in threaded view
|

Re: What does 19th primitive (Simulation guard) do?

Igor Stasenko
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.

Reply | Threaded
Open this post in threaded view
|

Re: What does 19th primitive (Simulation guard) do?

강진오
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.

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.




Reply | Threaded
Open this post in threaded view
|

Re: What does 19th primitive (Simulation guard) do?

강진오
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.

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.




Reply | Threaded
Open this post in threaded view
|

Re: What does 19th primitive (Simulation guard) do?

강진오
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.

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.