[DGD] Question concerning stack use between basic blocks

Carter Cheng cartercheng at gmail.com
Mon Dec 21 18:57:23 CET 2015


Thank you.

On Mon, Dec 21, 2015 at 2:52 PM, Felix A. Croes <felix at dworkin.nl> wrote:

> Carter Cheng <cartercheng at gmail.com> wrote:
>
> > Hello everyone,
> >
> > I was wondering if anyone knew what the behavior of the stack is between
> > basic blocks especially after branch merges. Is it in general safe to
> > assume that data on the stack after a branch instruction is subsequently
> > untouched? It would seem rather tricky to keep records of exactly what
> > values mean on the stack especially if the stack is manipulated in a
> > different fashion in two basic blocks the in the shared successor block
> the
> > data is still accessed in some fashion. I probably should check the
> source
> > but I was hoping to save a bit of time digging through the lpc compiler
> > code finding this.
>
> In DGD's VM, every instruction that accesses a value on the stack also
> pops it.  Different branches can (of course) put different values on the
> stack, but the number of values on the stack is the same for both branches
> of a merge point.
>
> Regards,
> Felix Croes
> ____________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd



More information about the DGD mailing list