Suppose you perform an operation via your domain key that alters your own PC. What instruction should be executed after the completion of the trap? How is this decision to be justfied semantically? How is one to get it right if one is doing a change on one's own domain and returning to a third party?
In wrestling through this, I was forced to introduce the notion of a "trapNextPC". The "trapNextPC" is the PC of the next instruction the INVOKER will execute if the IPC trap runs to completion. On entry to the IPC, the kernel sets trapNextPC to the instruction following the trap instruction. Any operation that sets the PC must alter this value as well to ensure that self-modification works correctly.
This implies that special care must be taken when setting the PC field of your own process via a slot manipulation. This case must be recognized as special, and the operation performed on the context structure instead.
shap