[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] POP/PUSH miscounts

From: Werner LEMBERG
Subject: Re: [ft-devel] POP/PUSH miscounts
Date: Thu, 11 Aug 2016 07:31:57 +0200 (CEST)

> I think I found a few pop-push miscounts in the bytecode interpreter.
> Please review the patch below.

Thanks!  I've applied the right changes :-)

> Also, not included in the patch, GETVARIATION should have negative
> opcode length, as it pushes variable amount.

No, `opcode_length' is for opcodes that move a variable amount of
bytecode data *in the data stream* to the stack.  This is not the case
for GETVARIATION, since it moves just a single opcode (namely itself).

There is a single opcode that pushes a variable amount of data to the
stack, namely GETVARIATION, and it has to check the available stack
size by itself (which it already does).

> GETDATA seems to pop without pushing anything back.

Currently, it's exactly the opposite in FreeType's code: it pushes
without popping.  Due to the findings of Hin-Tak we have to probably
change that, making it both popping and pushing a single element.

> RAW pushes without popping.  ADJUST pops three without pushing.


> PUSHB and PUSHW seems to pop one too, which I do not quite get.

Where do you see that?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]