[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pkl: Re-implement `strace` instruction
From: |
Mohammad-Reza Nabipoor |
Subject: |
Re: [PATCH] pkl: Re-implement `strace` instruction |
Date: |
Thu, 2 Dec 2021 00:05:07 +0330 |
On Wed, Dec 01, 2021 at 09:17:42PM +0100, Jose E. Marchesi wrote:
>
>
> What is the purpose of this rewrite?
>
1. The old impl uses `1024 * sizeof(pvm_val)` of stack
2. Thanks to the `JITTER_AT_DEPTH_STACK` we don't need to alter the
PVM stack. We can look at the desired element without moving things
around.
> >
> > The following expression will be soon replaced by
> > `JITTER_NUMBER_OF_ELEMENTS_STACK ()` (when Luca implements it):
>
> Isn't that the depth at the top?
>
Currently, jitter only gives us pointers to stack entries (an opaque pointer),
thanks to canary, we know where's the beginning of the stack and we can do
the arithmetic to get the number of elements on the stack.
Without it, there's no mechanism to get the depth.