[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using libjit for stack based VM
From: |
Tom Tromey |
Subject: |
Re: Using libjit for stack based VM |
Date: |
Thu, 22 Jul 2021 11:13:25 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
>> My main problem (and the reason to send the email before) is how to
>> create 'common' value for branches as you have noticed.
The best thing to do is to design your bytecode so that, at any given
opcode, the stack depth is constant. Then you can convert your runtime
stack into a set of local variables, and simply avoid doing any
bookkeeping for the stack.
The JVM (which is maybe where your example came from?) guarantees this.
Tom